% 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
Original issue reported on code.google.com by
konstant...@gmail.com
on 29 Jan 2013 at 9:08Attachments: