diff options
author | Marat Zakirov <m.zakirov@samsung.com> | 2015-03-11 07:39:20 +0000 |
---|---|---|
committer | Marat Zakirov <mzakirov@gcc.gnu.org> | 2015-03-11 07:39:20 +0000 |
commit | 6b98fab5f1ae21b76813630539e500e04c8a6952 (patch) | |
tree | b7ac247a1b8f48f68300cd97f4da28af2d003a78 /gcc/asan.c | |
parent | df4893c3907ab9ec2174d73dacfe7bc542ed61d6 (diff) | |
download | gcc-6b98fab5f1ae21b76813630539e500e04c8a6952.zip gcc-6b98fab5f1ae21b76813630539e500e04c8a6952.tar.gz gcc-6b98fab5f1ae21b76813630539e500e04c8a6952.tar.bz2 |
asan.c (instrument_derefs): Disable instrumentation on asan-globals=0.
2015-03-11 Marat Zakirov <m.zakirov@samsung.com>
* asan.c (instrument_derefs): Disable instrumentation on asan-globals=0.
* c-c++-common/asan/no-asan-check-glob.c: New test.
From-SVN: r221345
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1820,6 +1820,8 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t, { if (DECL_THREAD_LOCAL_P (inner)) return; + if (!ASAN_GLOBALS && is_global_var (inner)) + return; if (!TREE_STATIC (inner)) { /* Automatic vars in the current function will be always |