Hello developers:
I want to write a tool for valgrind base on memcheck. I use the  '_WRAP_
macros' to wrap malloc in libc, but there show me an error:

valgrind: m_redir.c:638 (vgPlain_redir_notify_new_DebugInfo): Assertion
'is_plausible_guest_addr(sym_avmas.main)' failed.
Segmentation fault (core dumped)

The code i add to 'mc_main.c' is:
long I_WRAP_SONAME_FNNAME_ZU(libcZdsoZd6,malloc) ( long n )
{
   char *  r;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   CALL_FN_W_W(r, fn, n);
   //cloak_malloc_addr = r;
   return r;
}

(I has already disable the malloc replacement by deleting
vgpreload_memcheck-amd64-linux.so.)

Thanks
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to