google / sanitizers

AddressSanitizer, ThreadSanitizer, MemorySanitizer
Other
11.5k stars 1.04k forks source link

==LeakSanitizer: Dynamic linker not found. TLS will not be handled correctly. #1124

Open edtbl76 opened 5 years ago

edtbl76 commented 5 years ago

I'm seeing this when I use libasan.so.4 (being installed from scl devtoolset-7) I'd just like more context?

The results of the leak detection are completely bogus, I'm assuming this has something to do with it.

kcc commented 5 years ago

that's with GCC, right? Clang uses static linkage for asan, and should not have this issue. (or will it?)

edtbl76 commented 5 years ago

@kcc Yes, I was using gcc, but devtoolset-7 actually has both. (specifically gcc 7.3.1)

I think you're correct about clang not having the issue.

For more context (sorry about that!), I'm debugging RocksDB JNI (adding -fsanitize=address at compile time). I think clang's support for compiling JNI is pretty hit or miss (or at least my experience has been) so I opted for gcc.

I set LD_PRELOAD=/usr/lib64/libasan.so.4 (provided as part of devtoolset-7) in order to work around the shadow memory collisions.

Kind of weird.