From: shuai xi <aha...@gm...> - 2018-07-30 04:13:55
|
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 |