aboutsummaryrefslogtreecommitdiff
path: root/gcc/asan.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-03-27 10:25:01 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2017-03-27 10:25:01 +0200
commit7cd200f63f80396e9ddfe163a3fed86fd2aed672 (patch)
tree9d890861f781d818c9cf51163d9891b54bed78b5 /gcc/asan.c
parent79f512ffebee22885684ff63bc3d66e7e6db9b4b (diff)
downloadgcc-7cd200f63f80396e9ddfe163a3fed86fd2aed672.zip
gcc-7cd200f63f80396e9ddfe163a3fed86fd2aed672.tar.gz
gcc-7cd200f63f80396e9ddfe163a3fed86fd2aed672.tar.bz2
re PR sanitizer/80168 (ICE in make_decl_rtl, at varasm.c:1311 w/ VLA and -fsanitize=address)
PR sanitizer/80168 * asan.c (instrument_derefs): Copy over last operand from original COMPONENT_REF to the new COMPONENT_REF with DECL_BIT_FIELD_REPRESENTATIVE. * ubsan.c (instrument_object_size): Likewise. * gcc.dg/asan/pr80168.c: New test. From-SVN: r246492
Diffstat (limited to 'gcc/asan.c')
-rw-r--r--gcc/asan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/asan.c b/gcc/asan.c
index a13679d..f1098cb 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1868,7 +1868,8 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t,
tree repr = DECL_BIT_FIELD_REPRESENTATIVE (TREE_OPERAND (t, 1));
instrument_derefs (iter, build3 (COMPONENT_REF, TREE_TYPE (repr),
TREE_OPERAND (t, 0), repr,
- NULL_TREE), location, is_store);
+ TREE_OPERAND (t, 2)),
+ location, is_store);
return;
}