Commit 99daa7a9 by Martin Liska Committed by Martin Liska

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
parent b476f5dd
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> 2018-03-01 Richard Biener <rguenther@suse.de>
PR debug/84645 PR debug/84645
......
...@@ -1143,7 +1143,9 @@ sanitize_rewrite_addressable_params (function *fun) ...@@ -1143,7 +1143,9 @@ sanitize_rewrite_addressable_params (function *fun)
arg; arg = DECL_CHAIN (arg)) arg; arg = DECL_CHAIN (arg))
{ {
tree type = TREE_TYPE (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_CODE (TYPE_SIZE (type)) == INTEGER_CST)
{ {
TREE_ADDRESSABLE (arg) = 0; TREE_ADDRESSABLE (arg) = 0;
......
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> 2018-03-01 Richard Biener <rguenther@suse.de>
PR debug/84645 PR debug/84645
......
/* PR sanitizer/82484 */
/* { dg-do compile } */
void foo(volatile int *ptr);
void a (volatile int b) { foo(&b); }
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