Defending in-process memory abuse with mitigation and testing