mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Fix one more edge case
This commit is contained in:
parent
94f29ae117
commit
a5f18c2b2a
@ -131,6 +131,7 @@ pub fn dumpStackTraceFromBase(bp: usize, ip: usize) void {
|
||||
const tty_config = detectTTYConfig();
|
||||
printSourceAtAddress(debug_info, stderr, ip, tty_config) catch return;
|
||||
const first_return_address = @intToPtr(*const usize, bp + @sizeOf(usize)).*;
|
||||
if (first_return_address == 0) return; // The whole call stack may be optimized out
|
||||
printSourceAtAddress(debug_info, stderr, first_return_address - 1, tty_config) catch return;
|
||||
var it = StackIterator{
|
||||
.first_addr = null,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user