]> granicus.if.org Git - clang/commit
Enable -fsanitize=use-after-return by default under -fsanitize=address
authorKostya Serebryany <kcc@google.com>
Mon, 23 Sep 2013 09:52:37 +0000 (09:52 +0000)
committerKostya Serebryany <kcc@google.com>
Mon, 23 Sep 2013 09:52:37 +0000 (09:52 +0000)
commitd85ec0e85952959a39a54a3b58e641e34878aecf
tree52ac873376603bf784a99eb68648cd610982192f
parent25b24eb889d633c4666001af107d8eb5c45dd065
Enable -fsanitize=use-after-return by default under -fsanitize=address

Summary:
We enable ASAN's use-after-return instrumentation at compile-time,
but still keep it disabled at run-time.
This enables the users to flip the flag at run-time using environment variable
ASAN_OPTIONS=detect_stack_use_after_return=1 instead of using a separate build.
If UAR detection is disabled at run-time, this extra compile-time instrumentation
costs very small slowdown. On SPEC 2006 14 tests are not affected at all,
4 tests get ~ 1% slowdown and 453.povray gets 4%.

Reviewers: samsonov

Reviewed By: samsonov

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1741

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191186 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/SanitizerArgs.cpp
test/Driver/fsanitize.c