Hi all,

I'm recently learning the code of Address Sanitizer and know that the 
runtime library is responsible for replacing libc malloc/free with 
customized malloc/free to insert redzone before and after malloced area.

>From the code, I know that such a replacement is conducted by changing the 
runtime library load priority. By letting our runtime library being loaded 
before glibc, we are able to invoke our customized mallo and free.

However, we cannot call the default printf functions during runtime library 
implementation any more, cause printf will invoke malloc and then 
segmentation fault is triggered.

If we can rename our malloc/free to asan_malloc and asan_free, and change 
the call statement to malloc to asan_malloc during instrumentation? In that 
case, no need to reimplement those library functions depend on malloc? Is 
there any reason that we must replace it during runtime?

Thanks,
Wei

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/address-sanitizer/0ab35412-5692-4688-8c76-01867da36c2dn%40googlegroups.com.

Reply via email to