Skip to content

Commit 0b09af1

Browse files
committed
[Backtracing] Fix crash in CrashAsync test on Ubuntu 18.04.
This seems to be happening because we're hitting an invalid frame on the stack where the program counter value is read back as zero. If we find one of those, treat it as the end of our stack walk. rdar://110846253
1 parent 8caf999 commit 0b09af1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Backtracing/FramePointerUnwinder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public struct FramePointerUnwinder<C: Context, M: MemoryReader>: Sequence, Itera
161161
return nil
162162
}
163163

164-
if next <= fp {
164+
if next <= fp || pc == 0 {
165165
return nil
166166
}
167167

0 commit comments

Comments
 (0)