diff options
author | Vitaly Buka <vitalybuka@google.com> | 2024-08-13 02:56:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 11:56:02 +0200 |
commit | 5ce47a5813506e08daddc1e3d59b06f7a452c300 (patch) | |
tree | e8f629f33a3814524603ef757d0d5c57a4d2628b /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 93f5c61d04fbef877dd9ac74511bb76093cc66cf (diff) | |
download | llvm-5ce47a5813506e08daddc1e3d59b06f7a452c300.zip llvm-5ce47a5813506e08daddc1e3d59b06f7a452c300.tar.gz llvm-5ce47a5813506e08daddc1e3d59b06f7a452c300.tar.bz2 |
Reland "[Support] Assert that DomTree nodes share parent" (#102782)
A dominance query of a block that is in a different function is
ill-defined, so assert that getNode() is only called for blocks that are
in the same function.
There are three cases, where this behavior did occur. LoopFuse didn't
explicitly do this, but didn't invalidate the SCEV block dispositions,
leaving dangling pointers to free'ed basic blocks behind, causing
use-after-free. We do, however, want to be able to dereference basic
blocks inside the dominator tree, so that we can refer to them by a
number stored inside the basic block.
Reverts #102780
Reland #101198
Fixes #102784
Co-authored-by: Alexis Engelke <engelke@in.tum.de>
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
0 files changed, 0 insertions, 0 deletions