mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.debug.Info: make Mach-O source location resolution more resilient
`resolveAddresses` now also works if some calls to `getDwarfForAddress` fail with `error.MissingDebugInfo`; the affected source location is set to `.invalid`. This makes fuzzing work with `ReleaseSafe` for Mach-O.
This commit is contained in:
@@ -99,6 +99,10 @@ pub fn resolveAddresses(
|
||||
// due to split debug information. For now, we'll just resolve the addreses one by one.
|
||||
for (sorted_pc_addrs, output) |pc_addr, *src_loc| {
|
||||
const dwarf, const dwarf_pc_addr = mf.getDwarfForAddress(gpa, io, pc_addr) catch |err| switch (err) {
|
||||
error.MissingDebugInfo => {
|
||||
src_loc.* = .invalid;
|
||||
continue;
|
||||
},
|
||||
error.InvalidMachO, error.InvalidDwarf => return error.InvalidDebugInfo,
|
||||
else => |e| return e,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user