mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #82720 from al45tair/eng/PR-154837649
[Backtracing][Linux] Ignore `SHT_NULL` sections.
This commit is contained in:
@@ -1475,6 +1475,11 @@ final class ElfImage<SomeElfTraits: ElfTraits>
|
||||
let stringSect = ElfStringSection(source: stringSource)
|
||||
|
||||
for shdr in sectionHeaders {
|
||||
// All other fields are undefined for SHT_NULL
|
||||
if shdr.sh_type == .SHT_NULL {
|
||||
continue
|
||||
}
|
||||
|
||||
guard let name = stringSect.getStringAt(index: Int(shdr.sh_name)) else {
|
||||
continue
|
||||
}
|
||||
@@ -1612,6 +1617,11 @@ final class ElfImage<SomeElfTraits: ElfTraits>
|
||||
let stringSect = ElfStringSection(source: stringSource)
|
||||
|
||||
for shdr in sectionHeaders {
|
||||
// All other fields are undefined for SHT_NULL
|
||||
if shdr.sh_type == .SHT_NULL {
|
||||
continue
|
||||
}
|
||||
|
||||
guard let sname
|
||||
= stringSect.getStringAt(index: Int(shdr.sh_name)) else {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user