viralcode / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
1 stars 0 forks source link

ASAN fails to link programs with -O0 #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As described in 
http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer#Getting ,
I checked out the sources and they compile my simple helloworld-style app fine 
with -O1/-O2:

$ ~/asan/asan_clang_Linux/bin/clang -O2 -fasan -g -m32 simple_oob.cpp -o 
simple_oob_asan
$ ~/asan/asan_clang_Linux/bin/clang -O1 -fasan -g -m32 simple_oob.cpp -o 
simple_oob_asan
$ ~/asan/asan_clang_Linux/bin/clang -O0 -fasan -g -m32 simple_oob.cpp -o 
simple_oob_asan
~/asan_clang_Linux/bin/../lib/libasan32.a(asan_rtl32.o): In function 
`Global::DescribeAddrIfMyRedZone(unsigned int)':
~/asan/asan_rtl.cc:305: undefined reference to `__asan_mapping_scale'
~/asan_clang_Linux/bin/../lib/libasan32.a(asan_rtl32.o): In function 
`AddrIsInLowMem':
~/asan/asan_mapping.h:60: undefined reference to `__asan_mapping_offset'
~/asan_clang_Linux/bin/../lib/libasan32.a(asan_rtl32.o): In function 
`AddrIsInHighMem':
~/asan/asan_mapping.h:68: undefined reference to `__asan_mapping_scale'
[many more...]
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Original issue reported on code.google.com by timurrrr on 11 Aug 2011 at 9:32

GoogleCodeExporter commented 9 years ago
This initially was a feature. Not sure we still need it.

Original comment by gli...@google.com on 12 Aug 2011 at 6:32

GoogleCodeExporter commented 9 years ago

Original comment by konstant...@gmail.com on 1 Dec 2011 at 6:09