Skip to content

Commit 1870998

Browse files
committed
[LateLowerGCFrame] fix PlaceGCFrameReset for returns_twice
Using the right variable here should help quite a bit with the random GC segfaults we have seen. We already have the tests for this, but it is quite hard to make them just complex enough to trigger reliably. Fixes #57333
1 parent 20162ea commit 1870998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llvm-late-gc-lowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2291,7 +2291,7 @@ void LateLowerGCFrame::PlaceGCFrameStores(State &S, unsigned MinColorRoot,
22912291
const LargeSparseBitVector &NowLive = S.LiveSets[*rit];
22922292
// reset slots which are no longer alive
22932293
for (int Idx : *LastLive) {
2294-
if (Idx >= PreAssignedColors && !HasBitSet(NowLive, Idx)) {
2294+
if (Colors[Idx] >= PreAssignedColors && !HasBitSet(NowLive, Idx)) {
22952295
PlaceGCFrameReset(S, Idx, MinColorRoot, Colors, GCFrame,
22962296
S.ReverseSafepointNumbering[*rit]);
22972297
}

0 commit comments

Comments
 (0)