Open 24ae4267-5921-45a9-a006-c88f1b8f1b03 opened 4 years ago
I'm unlikely to have the time for this in the short term -- for now, I'm just using Scudo's .so for this :-) I do think having a just-GWP-ASAN .so would be valuable though.
If you'd be interested in contributing by the way, more than happy to help with reviews :)
I agree - I think it's a worthwhile addition to have some c/c++ malloc wrappers and distribute a gwp_asan.so.
There is some increased performance overhead from interposing the symbols like this, we require a dlopen(RTLD_NEXT) on first call to malloc/free/etc., and indirect overhead from there, but that may be acceptable to users.
I can't promise anything at this stage unfortunately, but will definitely bear this in mind.
Extended Description
It'd be very useful if GWP-ASAN included a .so that could trivially be LD_PRELOAD'd to override malloc/free to use GWP-ASAN + fallback to libc's malloc.
This would specifically make using GWP-ASAN in contexts such as server-software, where the person doing the deployment uses OS provided libraries such as OpenSSL or binaries like Python, and simply wants to easily apply GWP-ASAN across their fleet.