]> git.ipfire.org Git - thirdparty/gcc.git/commit
asan: Fix ICE during instrumentation of returns_twice calls [PR112709]
authorJakub Jelinek <jakub@redhat.com>
Wed, 13 Mar 2024 08:19:05 +0000 (09:19 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 13 Mar 2024 08:19:05 +0000 (09:19 +0100)
commit6586359e8e4c611dd96129b5d4f24023949ac3fc
treed79148d8e7d22b190bc0ed6b766137f0ebedcd8f
parent364c684c474841e3c9c04e025a5c1bca49705c86
asan: Fix ICE during instrumentation of returns_twice calls [PR112709]

The following patch on top of the previously posted ubsan/gimple-iterator
one handles asan the same.  While the case of returning by hidden reference
is handled differently because of the first recently posted asan patch,
this deals with instrumentation of the aggregates returned in registers
case as well as instrumentation of loads from aggregate memory in the
function arguments of returns_twice calls.

2024-03-13  Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/112709
* asan.cc (maybe_create_ssa_name, maybe_cast_to_ptrmode,
build_check_stmt, maybe_instrument_call, asan_expand_mark_ifn): Use
gsi_safe_insert_before instead of gsi_insert_before.

* gcc.dg/asan/pr112709-2.c: New test.
gcc/asan.cc
gcc/testsuite/gcc.dg/asan/pr112709-2.c [new file with mode: 0644]