[llvm-commits] [PATCH] AddressSanitizer: allow disabling __cxa_throw at runtime

Kostya Serebryany kcc at google.com
Wed Dec 28 15:48:16 PST 2011

If we don't wrap __cxa_throw, we will have stack-buffer-overflow false
positives (the stack will be poisoned on entry and never unpoisoned on

Maybe, if we build asan-rt w/ exceptions (remove -fno-exceptions
from compiler-rt/make/config.mk) the bug will get fixed,
but I'd really like to find another solution (ideally, asan-rt should not
require libstdc++ at all, and on linux this seems to work)


On Wed, Dec 28, 2011 at 7:56 AM, Alexander Potapenko <glider at google.com>wrote:

> On Wed, Dec 28, 2011 at 5:18 PM, Alexander Potapenko <glider at google.com>
> wrote:
> > The attached patch introduces the wrap_cxa_throw flag that should help
> > us to build Chrome while
> > http://code.google.com/p/address-sanitizer/issues/detail?id=23 is not
> > fixed (tl;dr: wrapping __cxa_throw possibly affects stack unwinding
> > and exception handling).
> >
> Actually it looks like Chrome does not work with wrap___cxa_throw
> either, so we'll need to disable it on Mac.
> Kostya, is it safe to do so, or this will lead to false positives?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111228/b596f902/attachment.html>

More information about the llvm-commits mailing list