Skip to content

Commit c3b925c

Browse files
committed
[Linux][Backtracing] Fix incorrect line number generation.
The code that looks up line numbers wasn't respecting the end-sequence flag, so it could "find" a line number between the end of one sequence and the beginning of another. That was wrong. rdar://112595022
1 parent a73e98c commit c3b925c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stdlib/public/Backtracing/Elf.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,11 @@ class ElfImage<SomeImageSource: ImageSource,
16801680
done = true
16811681
}
16821682

1683-
prevState = state
1683+
if state.endSequence {
1684+
prevState = nil
1685+
} else {
1686+
prevState = state
1687+
}
16841688
}
16851689
}
16861690

0 commit comments

Comments
 (0)