Enable -fsanitize-recover for KASan.
authorYury Gribov <y.gribov@samsung.com>
Tue, 28 Oct 2014 10:33:04 +0000 (10:33 +0000)
committerYury Gribov <ygribov@gcc.gnu.org>
Tue, 28 Oct 2014 10:33:04 +0000 (10:33 +0000)
commitfed4de37b870faad50374a63aa1cf68a97963da6
treed89db50eee01910485a109af95f83b25923b4462
parentfd960af2df5a437302039f248a542354ee4cddcf
Enable -fsanitize-recover for KASan.

2014-10-28  Yury Gribov  <y.gribov@samsung.com>

gcc/
* asan.c (report_error_func): Add noabort path.
(check_func): Ditto.  Formatting.
(asan_expand_check_ifn): Handle noabort path.
* common.opt (flag_sanitize_recover): Add SANITIZE_KERNEL_ADDRESS
to default value.
* doc/invoke.texi (-fsanitize-recover=): Mention KASan.
* opts.c (finish_options): Reword comment.
* sanitizer.def: Add noabort ASan builtins.

gcc/testsuite/
* c-c++-common/asan/kasan-recover-1.c: New test.
* c-c++-common/asan/kasan-recover-2.c: New test.
* c-c++-common/asan/instrument-with-calls-1.c: Get rid of -save-temps.
* c-c++-common/asan/instrument-with-calls-2.c: Likewise.
* c-c++-common/asan/instrument-with-calls-3.c: Likewise.
* c-c++-common/asan/kasan-recover-1.c: Likewise.
* c-c++-common/asan/kasan-recover-2.c: Likewise.
* c-c++-common/asan/no-asan-globals.c: Likewise.
* c-c++-common/asan/no-instrument-reads.c: Likewise.
* c-c++-common/asan/no-instrument-writes.c: Likewise.
* c-c++-common/asan/no-use-after-return.c: Likewise.

From-SVN: r216778
16 files changed:
gcc/ChangeLog
gcc/asan.c
gcc/common.opt
gcc/doc/invoke.texi
gcc/opts.c
gcc/sanitizer.def
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/instrument-with-calls-1.c
gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c
gcc/testsuite/c-c++-common/asan/instrument-with-calls-3.c
gcc/testsuite/c-c++-common/asan/kasan-recover-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/asan/kasan-recover-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/asan/no-asan-globals.c
gcc/testsuite/c-c++-common/asan/no-instrument-reads.c
gcc/testsuite/c-c++-common/asan/no-instrument-writes.c
gcc/testsuite/c-c++-common/asan/no-use-after-return.c