diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-10-24 12:45:34 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2024-10-24 12:45:34 +0200 |
commit | 885143fa77599c44bfdd4e8e6b6987b7824db6ba (patch) | |
tree | 1e4879ca3c41c5b5b94aacdb5cd5b83da0483542 /gcc/fortran/options.cc | |
parent | f6fbc0d2422ce9bea6a23226f4a13a76ffd1784b (diff) | |
download | gcc-885143fa77599c44bfdd4e8e6b6987b7824db6ba.zip gcc-885143fa77599c44bfdd4e8e6b6987b7824db6ba.tar.gz gcc-885143fa77599c44bfdd4e8e6b6987b7824db6ba.tar.bz2 |
asan: Fix up build_check_stmt gsi handling [PR117209]
gsi_safe_insert_before properly updates gsi_bb in gimple_stmt_iterator
in case it splits objects, but unfortunately build_check_stmt was in
some places (but not others) using a copy of the iterator rather than
the iterator passed from callers and so didn't propagate that to callers.
I guess it didn't matter much before when it was just using
gsi_insert_before as that really didn't change the iterator.
The !before_p case is apparently dead code, nothing is calling it with
before_p=false since around 4.9.
2024-10-24 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/117209
* asan.cc (maybe_cast_to_ptrmode): Formatting fix.
(build_check_stmt): Don't copy *iter into gsi, perform all
the updates on iter directly.
* gcc.dg/asan/pr117209.c: New test.
Diffstat (limited to 'gcc/fortran/options.cc')
0 files changed, 0 insertions, 0 deletions