[all-commits] [llvm/llvm-project] aa1cf3: [IR] Fix PoisoningVH relocation of a poisoned hand...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat May 30 09:23:47 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa1cf3205e63c1944238b41408fb3425fc585c61
https://github.com/llvm/llvm-project/commit/aa1cf3205e63c1944238b41408fb3425fc585c61
Author: Fangrui Song <i at maskray.me>
Date: 2026-05-30 (Sat, 30 May 2026)
Changed paths:
M llvm/include/llvm/IR/ValueHandle.h
M llvm/unittests/IR/ValueHandleTest.cpp
Log Message:
-----------
[IR] Fix PoisoningVH relocation of a poisoned handle (#200540)
In LLVM_ENABLE_ABI_BREAKING_CHECKS builds, when poisoned (`deleted()` or
`allUsesReplacedWith()`), a PoisoningVH is removed from its use list but
keeps its raw value pointer for identity, so its PrevPtr/Next are left
stale.
PoisoningVH has no move constructor, so relocating a value that embeds
one
falls back to the copy constructor, where `setRawValPtr` relinks with
the stale pointers and corrupts the use list.
This is a latent bug for any relocation of a PoisoningVH handle
but becomes load-bearing for #199615 , which relocating erase exercises
it via ScalarEvolution's BackedgeTakenInfo (its ExitNotTakenInfo holds a
PoisoningVH<BasicBlock>).
Fix by special casing the `Poisoned` case.
Aided By Claude Opus 4.8
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list