I'm looking to use Clang's leak/address sanitizer on my shared library, which is loaded from JVM or dotnet
(Linux) at runtime, so I can't recompile the binary.
Using LD_PRELOAD
makes for a very noisy output, a lot (presumably false positive?) leaks get reported from the JVM itself. The sanitizer outright crashes when LD_PRELOAD
ing for dotnet
.
Is there any way to statically link the sanitizer into the shared library (or dynamically without LD_PRELOAD
)?