re PR sanitizer/81094 (-fsanitize=object-size does not instrument aggregate call...
authorJakub Jelinek <jakub@redhat.com>
Fri, 16 Jun 2017 09:13:28 +0000 (11:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 16 Jun 2017 09:13:28 +0000 (11:13 +0200)
commitb783399af92647bd0765b9d51afab04dea31344b
treeba56515e1806cecd997677de49a2ab9d1d38b78a
parent6ec3c9c841aea8b492aa2fc0db5d3c734b643725
re PR sanitizer/81094 (-fsanitize=object-size does not instrument aggregate call arguments)

PR sanitizer/81094
* ubsan.c (instrument_null): Add T argument, use it instead
of computing it based on IS_LHS.
(instrument_object_size): Likewise.
(pass_ubsan::execute): Adjust instrument_null and
instrument_object_size callers to pass gimple_get_lhs or
gimple_assign_rhs1 result to it.  Use instrument_null instead of
calling get_base_address and instrument_mem_ref.  Handle
aggregate call arguments for object-size sanitization.

* c-c++-common/ubsan/object-size-11.c: New test.

From-SVN: r249239
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/object-size-11.c [new file with mode: 0644]
gcc/ubsan.c