When you load lib asan ,then it fails with below error : Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
I loaded library using LD_PRELOAD ,then starting the process it fails as above mentioned error.
Thanks in advance.
I found a cause for this for 32-bit targets that isn't mentioned in the AddressSanitizer FAQ. If your stack size is unlimited (i.e. you've run ulimit -s unlimited
), then a huge amount of address space is reserved at the top of the process mapping for the stack to grow into. This means that the dynamic linker, vdso, libasan.so and other shared libraries are loaded at 0x2aaab000 and below (for me on x86) which conflicts with the address range that ASAN wishes to use.
This is not seen often since the default soft stack limit on Linux is 8192 which leaves plenty of address space below the shared libraries for ASAN. The fix is to set a more appropriate stack size limit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With