Created
June 28, 2019 22:01
-
-
Save emekoi/30a54b32684f3d4e6444105baabff928 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% catchsegv zig run test.zig (master x!?) error: Error | |
run.exe caused an Access Violation at location 000000013FB269DB in module run.exe Reading from location FFFFFFFFFFFFFFFF. | |
AddrPC Params | |
000000013FB269DB 000000004D430001 000000000118E6AE 0000000000000002 run.exe!std.mem.eql [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\mem.zig @ 328] | |
326: if (a.len != b.len) return false; | |
327: for (a) |item, index| { | |
> 328: if (b[index] != item) return false; | |
329: } | |
330: return true; | |
000000013FB2898D 000000000118E868 AAAAAAAAAAAAAAAA 000000000118E864 run.exe!std.coff.Coff::std.coff.Coff.getSection [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\coff.zig @ 177] | |
175: pub fn getSection(self: *Coff, comptime name: []const u8) ?*Section { | |
176: for (self.sections.toSlice()) |*sec| { | |
> 177: if (mem.eql(u8, sec.header.name[0..name.len], name)) { | |
178: return sec; | |
179: } | |
000000013FB26054 00000000004C004A 0000000077AC39F0 0000000000056000 run.exe!std.coff.Coff::std.coff.Coff.getPdbPath [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\coff.zig @ 111] | |
109: pub fn getPdbPath(self: *Coff, buffer: []u8) !usize { | |
110: try self.loadSections(); | |
> 111: const header = (self.getSection(".rdata") orelse return error.MissingCoffSection).header; | |
112: | |
113: // The linker puts a chunk that contains the .pdb path right after the | |
000000013FB23BE0 000000000118F4E8 000000013FB7F0E0 000000013FB35260 run.exe!std.debug.openSelfDebugInfoWindows [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\debug.zig @ 823] | |
821: | |
822: var path_buf: [windows.MAX_PATH]u8 = undefined; | |
> 823: const len = try di.coff.getPdbPath(path_buf[0..]); | |
824: const raw_path = path_buf[0..len]; | |
825: | |
000000013FB23406 0000000000000000 0000000000000000 0000000000000000 run.exe!std.debug.openSelfDebugInfo [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\debug.zig @ 790] | |
788: return error.MissingDebugInfo; | |
789: if (windows.is_the_target) { | |
> 790: return openSelfDebugInfoWindows(allocator); | |
791: } | |
792: if (os.darwin.is_the_target) { | |
000000013FB22411 000000000118F6F0 000000013FB405DD 0000000000000000 run.exe!std.debug.getSelfDebugInfo [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\debug.zig @ 73] | |
71: return info; | |
72: } else { | |
> 73: self_debug_info = try openSelfDebugInfo(getDebugInfoAllocator()); | |
74: return &self_debug_info.?; | |
75: } | |
000000013FB21D11 0000000000000000 0000000000000000 0000000000000000 run.exe!std.debug.dumpStackTrace [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\debug.zig @ 158] | |
156: return; | |
157: } | |
> 158: const debug_info = getSelfDebugInfo() catch |err| { | |
159: stderr.print("Unable to dump stack trace: Unable to open debug info: {}\n", @errorName(err)) catch return; | |
160: return; | |
000000013FB40453 0000000000000000 0000000000000000 0000000000000000 run.exe!std.special.WinMainCRTStartup [C:\msys64\home\Ikem\projects\zig\build\lib\zig\std\special\start.zig @ 64] | |
62: _ = @import("start_windows_tls.zig"); | |
63: } | |
> 64: std.os.windows.kernel32.ExitProcess(callMain()); | |
65: } | |
66: | |
000000007784570D 0000000000000000 0000000000000000 0000000000000000 kernel32.dll!BaseThreadInitThunk | |
0000000077AA385D 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!RtlUserThreadStart | |
[1] 2499 segmentation fault catchsegv zig run test.zig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% zig run test.zig (master x!?) error: Error | |
[1] 2490 segmentation fault zig run test.zig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reduced case | |
pub fn main() !void { | |
return error.Error; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment