diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-09-10 12:53:03 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-09-30 13:44:52 +0100 |
| commit | bfbbda77517ec83ef7cfacced651acc9d85b8bb0 (patch) | |
| tree | 1b7e28ae7fcb0541f8cce15b36fd4fbabfcdd719 /src | |
| parent | c1a30bd0d876330ce7a241fc297c66577ae7e6aa (diff) | |
| download | zig-bfbbda77517ec83ef7cfacced651acc9d85b8bb0.tar.gz zig-bfbbda77517ec83ef7cfacced651acc9d85b8bb0.zip | |
compiler: fix new panic handler in release builds
Diffstat (limited to 'src')
| -rw-r--r-- | src/crash_report.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crash_report.zig b/src/crash_report.zig index c696c42cfc..8c686459fe 100644 --- a/src/crash_report.zig +++ b/src/crash_report.zig @@ -17,7 +17,7 @@ pub const debug = struct { /// crash earlier than that. pub var zig_argv0: []const u8 = "zig"; -fn handleSegfaultImpl(addr: ?usize, name: []const u8, opt_ctx: ?*std.debug.ThreadContext) noreturn { +fn handleSegfaultImpl(addr: ?usize, name: []const u8, opt_ctx: ?std.debug.ThreadContextPtr) noreturn { @branchHint(.cold); dumpCrashContext() catch {}; std.debug.defaultHandleSegfault(addr, name, opt_ctx); @@ -56,6 +56,7 @@ pub const AnalyzeBody = if (build_options.enable_debug_extensions) struct { current = ab.parent; } } else struct { + const current: ?noreturn = null; // Dummy implementation, with functions marked `inline` to avoid interfering with tail calls. pub inline fn push(_: AnalyzeBody, _: *Sema, _: *Sema.Block, _: []const Zir.Inst.Index) void {} pub inline fn pop(_: AnalyzeBody) void {} @@ -75,6 +76,7 @@ pub const CodegenFunc = if (build_options.enable_debug_extensions) struct { current = null; } } else struct { + const current: ?noreturn = null; // Dummy implementation pub fn start(_: *const Zcu, _: InternPool.Index) void {} pub fn stop(_: InternPool.Index) void {} |
