% 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
Originally reported on Google Code with ID 147
Reported by
konstantin.s.serebryany
on 2013-01-29 09:08:04