canistation / address-sanitizer

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

asan false positive with -static-libstdc++ and exceptions #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

% clang++ -O -fsanitize=address small_throw_test.cc -static-libstdc++  ; 
./a.out

==5551== ERROR: AddressSanitizer: stack-buffer-underflow ... 

The problem is that when we are linking libstdc++ statically, 
the interceptor for __cxa_throw does not kick in.
In most cases it is not a problem because we also instrument all calls to 
__cxa_throw at compile time, but if such a call was not instrumented
(as in this test), we get a false report. 

One solution would be to reimplement __cxa_throw in asan instead of 
wrapping the standard implementation, but that sounds too messy.

I am not going to act on this bug, unless we find a clean solution. 

Original issue reported on code.google.com by konstant...@gmail.com on 29 Jan 2013 at 9:08

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ramosian.glider@gmail.com on 30 Jul 2015 at 9:05

GoogleCodeExporter commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Original comment by ramosian.glider@gmail.com on 30 Jul 2015 at 9:06