ASAN: emit line information of stack variables.
authorMartin Liska <mliska@suse.cz>
Tue, 9 Oct 2018 08:34:52 +0000 (10:34 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 9 Oct 2018 08:34:52 +0000 (08:34 +0000)
commit2c73950deda1f9e594ce1a397e911b38bccb9b52
tree4c400d5a0fb24f258d13e7c90d176dc402ad9ba9
parent9d44426f78d05a7c6bbf8327804c69e51e8de39b
ASAN: emit line information of stack variables.

2018-10-09  Martin Liska  <mliska@suse.cz>

* asan.c (asan_emit_stack_protection): If a stack variable
is located in a same file as current function, then emit
line info into variable definition string.
2018-10-09  Martin Liska  <mliska@suse.cz>

* c-c++-common/asan/pr64820.c: Add line number to scanned
pattern.
* c-c++-common/asan/use-after-return-1.c: Likewise.
* g++.dg/asan/function-argument-1.C (main): Likewise.
* g++.dg/asan/function-argument-2.C (main): Likewise.
* g++.dg/asan/function-argument-3.C (main): Likewise.
* g++.dg/asan/use-after-scope-1.C (main): Likewise.
* g++.dg/asan/use-after-scope-2.C (main): Likewise.
* g++.dg/asan/use-after-scope-types-1.C (main): Likewise.
* g++.dg/asan/use-after-scope-types-2.C (main): Likewise.
* g++.dg/asan/use-after-scope-types-3.C (main): Likewise.
* g++.dg/asan/use-after-scope-types-4.C (main): Likewise.
* g++.dg/asan/use-after-scope-types-5.C (main): Likewise.
* gcc.dg/asan/pr78541.c (main): Likewise.
* gcc.dg/asan/use-after-scope-1.c (main): Likewise.
* gcc.dg/asan/use-after-scope-10.c (main): Likewise.
* gcc.dg/asan/use-after-scope-2.c (main): Likewise.
* gcc.dg/asan/use-after-scope-3.c (main): Likewise.
* gcc.dg/asan/use-after-scope-5.c (main): Likewise.
* gcc.dg/asan/use-after-scope-9.c (main): Likewise.

From-SVN: r264951
22 files changed:
gcc/ChangeLog
gcc/asan.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/pr64820.c
gcc/testsuite/c-c++-common/asan/use-after-return-1.c
gcc/testsuite/g++.dg/asan/function-argument-1.C
gcc/testsuite/g++.dg/asan/function-argument-2.C
gcc/testsuite/g++.dg/asan/function-argument-3.C
gcc/testsuite/g++.dg/asan/use-after-scope-1.C
gcc/testsuite/g++.dg/asan/use-after-scope-2.C
gcc/testsuite/g++.dg/asan/use-after-scope-types-1.C
gcc/testsuite/g++.dg/asan/use-after-scope-types-2.C
gcc/testsuite/g++.dg/asan/use-after-scope-types-3.C
gcc/testsuite/g++.dg/asan/use-after-scope-types-4.C
gcc/testsuite/g++.dg/asan/use-after-scope-types-5.C
gcc/testsuite/gcc.dg/asan/pr78541.c
gcc/testsuite/gcc.dg/asan/use-after-scope-1.c
gcc/testsuite/gcc.dg/asan/use-after-scope-10.c
gcc/testsuite/gcc.dg/asan/use-after-scope-2.c
gcc/testsuite/gcc.dg/asan/use-after-scope-3.c
gcc/testsuite/gcc.dg/asan/use-after-scope-5.c
gcc/testsuite/gcc.dg/asan/use-after-scope-9.c