mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 21:11:19 +08:00
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
This commit is contained in:
parent
df4893c390
commit
6b98fab5f1
@ -1,3 +1,7 @@
|
||||
2015-03-11 Marat Zakirov <m.zakirov@samsung.com>
|
||||
|
||||
* asan.c (instrument_derefs): Disable instrumentation on asan-globals=0.
|
||||
|
||||
2015-03-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/65368
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,7 @@
|
||||
2015-03-11 Marat Zakirov <m.zakirov@samsung.com>
|
||||
|
||||
* c-c++-common/asan/no-asan-check-glob.c: New test.
|
||||
|
||||
2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/65370
|
||||
|
13
gcc/testsuite/c-c++-common/asan/no-asan-check-glob.c
Normal file
13
gcc/testsuite/c-c++-common/asan/no-asan-check-glob.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* { dg-options "--param asan-globals=0 -fdump-tree-asan" } */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-skip-if "" { *-*-* } { "-O0" } { "*" } } */
|
||||
|
||||
extern int a;
|
||||
|
||||
int foo ()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "ASAN_CHECK" 0 "asan1" } } */
|
||||
/* { dg-final { cleanup-tree-dump "asan1" } } */
|
Loading…
x
Reference in New Issue
Block a user