re PR sanitizer/80797 (-fsanitize=null doesn't instrument &s->x)
authorMarek Polacek <polacek@redhat.com>
Thu, 18 May 2017 07:18:24 +0000 (07:18 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 18 May 2017 07:18:24 +0000 (07:18 +0000)
commit243c288370fe51ba55c3a9ee61eb2a1a62cb1279
tree61c04324127c01037d585d966283e4575d024204
parenta7ab66385376da4f0d9cbe48f191ddb8928fd06d
re PR sanitizer/80797 (-fsanitize=null doesn't instrument &s->x)

PR sanitizer/80797
* ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
(pass_ubsan::execute): Call gimple_assign_single_p instead of
gimple_assign_load_p.

* c-c++-common/ubsan/null-12.c: New test.

From-SVN: r248179
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/null-12.c [new file with mode: 0644]
gcc/ubsan.c