Commit 6b98fab5 by Marat Zakirov Committed by Marat Zakirov

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
parent df4893c3
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> 2015-03-10 Jakub Jelinek <jakub@redhat.com>
PR target/65368 PR target/65368
......
...@@ -1820,6 +1820,8 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t, ...@@ -1820,6 +1820,8 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t,
{ {
if (DECL_THREAD_LOCAL_P (inner)) if (DECL_THREAD_LOCAL_P (inner))
return; return;
if (!ASAN_GLOBALS && is_global_var (inner))
return;
if (!TREE_STATIC (inner)) if (!TREE_STATIC (inner))
{ {
/* Automatic vars in the current function will be always /* Automatic vars in the current function will be always
......
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> 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65370 PR c++/65370
......
/* { 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" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment