aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/SelfInfo.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-08-09 19:49:48 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-08-13 15:02:53 -0700
commitb5398180d6b362346522a6067d54b90b97e23dc2 (patch)
tree227d414866a1052fd4197bb0b32e74e173300ef9 /lib/std/debug/SelfInfo.zig
parent0b5ea2b902b5802786cac70740e93872d2a0973d (diff)
downloadzig-b5398180d6b362346522a6067d54b90b97e23dc2.tar.gz
zig-b5398180d6b362346522a6067d54b90b97e23dc2.zip
std.debug.Coverage.resolveAddressesDwarf: fix broken logic
The implementation assumed that compilation units did not overlap, which is not the case. The new implementation uses .debug_ranges to iterate over the requested PCs. This partially resolves #20990. The dump-cov tool is fixed but the same fix needs to be applied to `std.Build.Fuzz.WebServer` (sorting the PC list before passing it to be resolved by debug info). I am observing LLVM emit multiple 8-bit counters for the same PC addresses when enabling `-fsanitize-coverage=inline-8bit-counters`. This seems like a bug in LLVM. I can't fathom why that would be desireable.
Diffstat (limited to 'lib/std/debug/SelfInfo.zig')
-rw-r--r--lib/std/debug/SelfInfo.zig3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig
index 2d87243c5d..5d2dca960b 100644
--- a/lib/std/debug/SelfInfo.zig
+++ b/lib/std/debug/SelfInfo.zig
@@ -606,7 +606,6 @@ pub const Module = switch (native_os) {
.endian = .little,
.sections = sections,
.is_macho = true,
- .compile_units_sorted = false,
};
try Dwarf.open(&di, allocator);
@@ -996,7 +995,6 @@ fn readCoffDebugInfo(allocator: Allocator, coff_obj: *coff.Coff) !Module {
.endian = native_endian,
.sections = sections,
.is_macho = false,
- .compile_units_sorted = false,
};
try Dwarf.open(&dwarf, allocator);
@@ -1810,7 +1808,6 @@ fn unwindFrameMachODwarf(
var di: Dwarf = .{
.endian = native_endian,
.is_macho = true,
- .compile_units_sorted = false,
};
defer di.deinit(context.allocator);