ramosian-glider / sanitizers

0 stars 0 forks source link

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

Open ramosian-glider opened 9 years ago

ramosian-glider commented 9 years ago

Originally reported on Google Code with ID 147


% 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. 

Reported by konstantin.s.serebryany on 2013-01-29 09:08:04


ramosian-glider commented 9 years ago

Reported by ramosian.glider on 2015-07-30 09:05:31

ramosian-glider commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:06:55