mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 06:10:26 +08:00
Do not handled volatile arguments (PR sanitizer/82484).
2018-03-01 Martin Liska <mliska@suse.cz> PR sanitizer/82484 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle volatile arguments. 2018-03-01 Martin Liska <mliska@suse.cz> PR sanitizer/82484 * gcc.dg/asan/pr82484.c: New test. From-SVN: r258101
This commit is contained in:
parent
b476f5dd5d
commit
99daa7a9ee
@ -1,3 +1,9 @@
|
||||
2018-03-01 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitizer/82484
|
||||
* sanopt.c (sanitize_rewrite_addressable_params): Do not handle
|
||||
volatile arguments.
|
||||
|
||||
2018-03-01 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR debug/84645
|
||||
|
@ -1143,7 +1143,9 @@ sanitize_rewrite_addressable_params (function *fun)
|
||||
arg; arg = DECL_CHAIN (arg))
|
||||
{
|
||||
tree type = TREE_TYPE (arg);
|
||||
if (TREE_ADDRESSABLE (arg) && !TREE_ADDRESSABLE (type)
|
||||
if (TREE_ADDRESSABLE (arg)
|
||||
&& !TREE_ADDRESSABLE (type)
|
||||
&& !TREE_THIS_VOLATILE (arg)
|
||||
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST)
|
||||
{
|
||||
TREE_ADDRESSABLE (arg) = 0;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-03-01 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitizer/82484
|
||||
* gcc.dg/asan/pr82484.c: New test.
|
||||
|
||||
2018-03-01 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR debug/84645
|
||||
|
5
gcc/testsuite/gcc.dg/asan/pr82484.c
Normal file
5
gcc/testsuite/gcc.dg/asan/pr82484.c
Normal file
@ -0,0 +1,5 @@
|
||||
/* PR sanitizer/82484 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
void foo(volatile int *ptr);
|
||||
void a (volatile int b) { foo(&b); }
|
Loading…
x
Reference in New Issue
Block a user