ASAN: handle addressable params (PR sanitize/81040).
authorMartin Liska <mliska@suse.cz>
Mon, 3 Jul 2017 11:48:47 +0000 (13:48 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 3 Jul 2017 11:48:47 +0000 (11:48 +0000)
commitda4029679e2be30dc78f3f3a016226f6e2299abb
tree87b35ad9ae9f27b7dc9ca3acafa2088e9bff3d82
parentb6d447f20948b35804fd780f8f1a237c9d36826f
ASAN: handle addressable params (PR sanitize/81040).

2017-07-03  Martin Liska  <mliska@suse.cz>

PR sanitize/81040
* g++.dg/asan/function-argument-1.C: New test.
* g++.dg/asan/function-argument-2.C: New test.
* g++.dg/asan/function-argument-3.C: New test.
2017-07-03  Martin Liska  <mliska@suse.cz>

PR sanitize/81040
* sanopt.c (rewrite_usage_of_param): New function.
(sanitize_rewrite_addressable_params): Likewise.
(pass_sanopt::execute): Call rewrite_usage_of_param.

From-SVN: r249903
gcc/ChangeLog
gcc/doc/extend.texi
gcc/sanopt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/asan/function-argument-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/asan/function-argument-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/asan/function-argument-3.C [new file with mode: 0644]