Hello,

I want to kill a target binary immediately after memcheck finds an memory
error.

Is there any options to do that?

I checked options list but there seemed no option for that.

As another attempt, I tried to slightly modify source code in memcheck
(mc_errors.c) like this.

#include <stdlib.h>
void MC_(pp_Error) ( Error* err )
{
   const Bool xml  = VG_(clo_xml); /* a shorthand */
   MC_Error* extra = VG_(get_error_extra)(err);

   exit(0);      // this one line is added to kill both valgrind itself and
target as its child
   ...
}

but failed to build with the modification, emitting this error message:

Undefined symbols for architecture x86_64:
  "_exit", referenced from:


waiting for any comments or idea on this issue.

thanks.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to