Commit 3e2ddbfdd7
2022-12-11 08:49:20
1 parent
6f39ce9Changed files (1)
lib
std
lib/std/debug.zig
@@ -1110,7 +1110,12 @@ fn readMachODebugInfo(allocator: mem.Allocator, macho_file: File) !ModuleDebugIn
else => {},
}
}
- assert(state == .oso_close);
+
+ switch (state) {
+ .init => return error.MissingDebugInfo,
+ .oso_close => {},
+ else => return error.InvalidDebugInfo,
+ }
const symbols = allocator.shrink(symbols_buf, symbol_index);