On 15.12.2015 14:05, Jacek Caban wrote: > Hi Vincent, > > On 12/15/15 7:20 AM, Vincent Torri wrote: >> Hello >> >> I am still working on Examine, my small valgrind-like memory leak >> detector (http://vtorri.github.io/examine/) and I have 2 questions. >> >> First, I recall that it works by doing DLL injection with >> CreateRemoteThread, and API hooking by patching the IAT. >> >> So Examine is working well, now, but I have 2 questions, about >> _strdup() and malloc() : >> >> 1) If I call malloc() in a program, it is detected by Examine. If I >> call _strdup(), malloc is not detected at all, while MSDN says that >> _strdup() "calls malloc to allocate storage space" (see >> https://msdn.microsoft.com/en-us/library/y471khhc.aspx). Does someone >> have an idea why malloc() is not catched ? > > You could have more luck by hot > patching malloc function itself, but I don't think it's the right solution.
AFAIK, gcc sanitizer does exactly that. Except that it was not ported to W32/gcc (it works only on POSIX/gcc or W32/MSVC). -- O< ascii ribbon - stop html email! - www.asciiribbon.org
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public