mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
dwarf: fix LineNumberProgram check
- tolerate out-of-order DW_AT_ranges closes #8421
This commit is contained in:
parent
93cf9560b1
commit
746f65f8b3
@ -208,7 +208,7 @@ const LineNumberProgram = struct {
|
||||
}
|
||||
|
||||
pub fn checkLineMatch(self: *LineNumberProgram) !?debug.LineInfo {
|
||||
if (self.target_address >= self.prev_address and self.target_address < self.address) {
|
||||
if (self.prev_address > 0 and self.target_address >= self.prev_address and self.target_address < self.address) {
|
||||
const file_entry = if (self.prev_file == 0) {
|
||||
return error.MissingDebugInfo;
|
||||
} else if (self.prev_file - 1 >= self.file_entries.items.len) {
|
||||
|
||||
@ -20,11 +20,6 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
|
||||
,
|
||||
},
|
||||
.ReleaseSafe = .{
|
||||
.exclude = struct {
|
||||
pub fn exclude() bool {
|
||||
return if (std.builtin.object_format == .elf) true else false;
|
||||
}
|
||||
},
|
||||
.exclude_os = .{
|
||||
.windows, // segfault
|
||||
},
|
||||
@ -74,11 +69,6 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
|
||||
,
|
||||
},
|
||||
.ReleaseSafe = .{
|
||||
.exclude = struct {
|
||||
pub fn exclude() bool {
|
||||
return if (std.builtin.object_format == .elf) true else false;
|
||||
}
|
||||
},
|
||||
.exclude_os = .{
|
||||
.windows, // segfault
|
||||
},
|
||||
@ -145,11 +135,6 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
|
||||
,
|
||||
},
|
||||
.ReleaseSafe = .{
|
||||
.exclude = struct {
|
||||
pub fn exclude() bool {
|
||||
return if (std.builtin.object_format == .elf) true else false;
|
||||
}
|
||||
},
|
||||
.exclude_os = .{
|
||||
.windows, // segfault
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user