Skip to content

Commit 2300577

Browse files
committed
[Backtracing] Fix symbol lookup on Linux.
Also removed a spurious `print()` that got left in by accident, and disabled the `CodableBacktrace.swift` test on Linux since we need Foundation and we don't have it there. rdar://124913332
1 parent ca233af commit 2300577

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

stdlib/public/RuntimeModule/Backtrace.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,6 @@ extension Backtrace {
415415
memoryReader: memoryReader)
416416

417417
if let limit = limit {
418-
print("limit = \(limit), offset = \(offset), top = \(top)")
419-
420418
let limited = LimitSequence(unwinder,
421419
limit: limit,
422420
offset: offset,

stdlib/public/RuntimeModule/Elf.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,13 +1156,13 @@ struct ElfSymbolTable<SomeElfTraits: ElfTraits>: ElfSymbolTableProtocol {
11561156
nextValue = _symbols[mid + 1].value
11571157
}
11581158

1159-
if symbol.value <= address && nextValue >= address {
1159+
if symbol.value <= address && nextValue > address {
11601160
var ndx = mid
11611161
while ndx > 0 && _symbols[ndx - 1].value == address {
11621162
ndx -= 1
11631163
}
11641164
return _symbols[ndx]
1165-
} else if symbol.value < address {
1165+
} else if symbol.value <= address {
11661166
min = mid + 1
11671167
} else if symbol.value > address {
11681168
max = mid

test/Backtracing/CodableBacktrace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// REQUIRES: executable_test
77
// REQUIRES: backtracing
8-
// REQUIRES: OS=macosx || OS=linux-gnu
8+
// REQUIRES: OS=macosx
99

1010
// UNSUPPORTED: use_os_stdlib
1111
// UNSUPPORTED: back_deployment_runtime

0 commit comments

Comments
 (0)