[Ardour-Dev] AddressSanitizer can't simply find debug symbols

Roman Evstifeev someuniquename at gmail.com
Mon Nov 9 13:26:05 PST 2015


Hi. I bumped into this error, when starting ardour session:

==6373== ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs
operator delete []) on 0x600400797910
    #0 0x7f5dcca4322a (/usr/lib64/libasan.so.0.0.0+0x1222a)
    #1 0x7f5da98dfdb6 (/usr/lib64/ladspa/cmt.so+0x10db6)
0x600400797910 is located 0 bytes inside of 8-byte region
[0x600400797910,0x600400797918)
allocated by thread T0 here:
    #0 0x7f5dcca46bfa (/usr/lib64/libasan.so.0.0.0+0x15bfa)
    #1 0x7f5dc4d4c929 (/lib64/libc-2.19.so+0x81929)
==6373== HINT: if you don't care about these warnings you may set
ASAN_OPTIONS=alloc_dealloc_mismatch=0
==6373== ABORTING

This is a possible bug in ladspa-cmt package, and i was trying to get
more info what is wrong with that. The report provided above is not
very useful, as there is only offset in the binary shown, and no debug
symbols.

On my system debug symbols are installed as separate files (separate
packages) for ardour and this problematic ladspa-cmt library. May this
be a problem for address sanitiser? Anyone else having this behavior
with built-in debug symbols too?

I managed to find a contrived solution: You need this python script
https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py
and then you shoud launch ardour with following cmdline:

ardour4 2>&1 | ./asan_symbolize.py | c++filt

Only then you will get actual problem places in the source code in the
error message:

==5484== ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs
operator delete []) on 0x60040079dfb0
    #0 0x7fda7b27922a in operator delete[](void*) ??:0:0
    #1 0x7fda54216db6 in CMT_Descriptor::~CMT_Descriptor()
/usr/src/debug/cmt/src/cmt.cpp:35:0
0x60040079dfb0 is located 0 bytes inside of 8-byte region
[0x60040079dfb0,0x60040079dfb8)
allocated by thread T0 here:
    #0 0x7fda7b27cbfa in malloc ??:0:0
    #1 0x7fda73582929 in __GI___strdup ??:0:0
==5484== HINT: if you don't care about these warnings you may set
ASAN_OPTIONS=alloc_dealloc_mismatch=0
==5484== ABORTING

So why this addres sanitizer can't find symbols by itself? Am i
missing something? Or this is by design?


More information about the Ardour-Dev mailing list