diff options
author | Max Ostapenko <m.ostapenko@partner.samsung.com> | 2015-11-23 11:15:13 +0200 |
---|---|---|
committer | Maxim Ostapenko <chefmax@gcc.gnu.org> | 2015-11-23 11:15:13 +0200 |
commit | b59e2a4903fa1ac8c3b34338a62b1e3fb15c3792 (patch) | |
tree | f7c62c92ce48c00bad27d1fa88ecde0728255afa /gcc/asan.c | |
parent | 16310b3fff2282f0d7e332c8fdb9d69952c920b4 (diff) | |
download | gcc-b59e2a4903fa1ac8c3b34338a62b1e3fb15c3792.zip gcc-b59e2a4903fa1ac8c3b34338a62b1e3fb15c3792.tar.gz gcc-b59e2a4903fa1ac8c3b34338a62b1e3fb15c3792.tar.bz2 |
libsanitizer merge from upstream r253555, compiler part.
gcc/
* opts.c (finish_options): Allow -fsanitize-recover=address for
userspace sanitization.
* asan.c (asan_expand_check_ifn): Redefine recover_p.
* doc/invoke.texi (fsanitize-recover): Update documentation.
gcc/testsuite/
* c-c++-common/asan/halt_on_error-1.c: New test.
* c-c++-common/asan/halt_on_error-2.c: Likewise.
From-SVN: r230741
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2533,9 +2533,11 @@ asan_expand_check_ifn (gimple_stmt_iterator *iter, bool use_calls) { gimple *g = gsi_stmt (*iter); location_t loc = gimple_location (g); - - bool recover_p - = (flag_sanitize & flag_sanitize_recover & SANITIZE_KERNEL_ADDRESS) != 0; + bool recover_p; + if (flag_sanitize & SANITIZE_USER_ADDRESS) + recover_p = (flag_sanitize_recover & SANITIZE_USER_ADDRESS) != 0; + else + recover_p = (flag_sanitize_recover & SANITIZE_KERNEL_ADDRESS) != 0; HOST_WIDE_INT flags = tree_to_shwi (gimple_call_arg (g, 0)); gcc_assert (flags < ASAN_CHECK_LAST); |