use @returnAddress in panic handler

the current code causes the call to panic itself to show up in the stack
trace which is noisy
This commit is contained in:
xdBronch 2024-10-12 17:12:03 -04:00 committed by CJ van den Berg
parent 48634bb43b
commit b353308712

View file

@ -86,7 +86,7 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_
self.vx.deinit(self.allocator, self.tty.anyWriter());
self.tty.deinit();
}
return std.builtin.default_panic(msg, error_return_trace, ret_addr);
return std.builtin.default_panic(msg, error_return_trace, ret_addr orelse @returnAddress());
}
pub fn run(self: *Self) !void {