authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-08 23:26:19-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-08 23:26:19-05:00
log7a4f7042583e0d19e41e3add77b011416b537405
tree47811ac59403946425d3c3660de655999b02a2c2
parentfe4963412f939d4f72eb5f0153a253116206749b
signature Commit is signed but in an unrecognized format.

windows-specific fixes


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/debug.zig+4-4
......@@ -2469,10 +2469,10 @@ extern fn handleSegfaultLinux(sig: i32, info: *const os.siginfo_t, ctx_ptr: *con
24692469stdcallcc fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) c_long {
24702470 const exception_address = @ptrToInt(info.ExceptionRecord.ExceptionAddress);
24712471 switch (info.ExceptionRecord.ExceptionCode) {
2472 windows.EXCEPTION_DATATYPE_MISALIGNMENT => panicExtra(null, exception_address, "Unaligned Memory Access"),
2473 windows.EXCEPTION_ACCESS_VIOLATION => panicExtra(null, exception_address, "Segmentation fault at address 0x{x}", info.ExceptionRecord.ExceptionInformation[1]),
2474 windows.EXCEPTION_ILLEGAL_INSTRUCTION => panicExtra(null, exception_address, "Illegal Instruction"),
2475 windows.EXCEPTION_STACK_OVERFLOW => panicExtra(null, exception_address, "Stack Overflow"),
2472 windows.EXCEPTION_DATATYPE_MISALIGNMENT => panicExtra(null, exception_address, "Unaligned Memory Access", .{}),
2473 windows.EXCEPTION_ACCESS_VIOLATION => panicExtra(null, exception_address, "Segmentation fault at address 0x{x}", .{info.ExceptionRecord.ExceptionInformation[1]}),
2474 windows.EXCEPTION_ILLEGAL_INSTRUCTION => panicExtra(null, exception_address, "Illegal Instruction", .{}),
2475 windows.EXCEPTION_STACK_OVERFLOW => panicExtra(null, exception_address, "Stack Overflow", .{}),
24762476 else => return windows.EXCEPTION_CONTINUE_SEARCH,
24772477 }
24782478}