[all-commits] [llvm/llvm-project] faa4c4: [RegAlloc] Fix use-after-free in `RegAllocBase::cl...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Thu Jul 31 21:08:18 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: faa4c4c2dc804c31845d8f036345fac00e016f2d
https://github.com/llvm/llvm-project/commit/faa4c4c2dc804c31845d8f036345fac00e016f2d
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-08-01 (Fri, 01 Aug 2025)
Changed paths:
M llvm/lib/CodeGen/RegAllocBase.cpp
A llvm/test/CodeGen/AMDGPU/use-after-free-after-cleanup-failed-vreg.ll
Log Message:
-----------
[RegAlloc] Fix use-after-free in `RegAllocBase::cleanupFailedVReg` (#151435)
#128400 introduced a use-after-free bug in
`RegAllocBase::cleanupFailedVReg` when removing intervals from regunits.
The issue is from the `InterferenceCache` in `RAGreedy`, which holds
`LiveRange*`. The current `InterferenceCache` APIs make it difficult to
update it, and there isn't a straightforward way to do that.
Since #128400 already mentions it's not clear about the necessity of
removing intervals from regunits, this PR avoids the issue by simply
skipping that step.
Fixes SWDEV-527146.
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