[PATCH] ASAN: do not rewrite param for DECL_NOT_GIMPLE_REG_P.

Martin Liška mliska@suse.cz
Mon May 11 11:26:17 GMT 2020


Hi.

Starting from r11-165-geb72dc663e9070b2 we should not rewrite parameters that
have DECL_NOT_GIMPLE_REG_P set to true.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2020-05-11  Martin Liska  <mliska@suse.cz>

	PR sanitizer/95033
	* sanopt.c (sanitize_rewrite_addressable_params):
	Do not rewrite for DECL_NOT_GIMPLE_REG_P.

gcc/testsuite/ChangeLog:

2020-05-11  Martin Liska  <mliska@suse.cz>

	PR sanitizer/95033
	* g++.dg/asan/function-argument-4.C: New test.
	* gcc.dg/asan/pr95033.c: New test.
---
  gcc/sanopt.c                                  |  1 +
  .../g++.dg/asan/function-argument-4.C         | 26 +++++++++++++++++++
  gcc/testsuite/gcc.dg/asan/pr95033.c           | 13 ++++++++++
  3 files changed, 40 insertions(+)
  create mode 100644 gcc/testsuite/g++.dg/asan/function-argument-4.C
  create mode 100644 gcc/testsuite/gcc.dg/asan/pr95033.c


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ASAN-do-not-rewrite-param-for-DECL_NOT_GIMPLE_REG_P.patch
Type: text/x-patch
Size: 1688 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200511/8e8b0b73/attachment-0001.bin>


More information about the Gcc-patches mailing list