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 /lib/std/debug.zig | |
| parent | c1a30bd0d876330ce7a241fc297c66577ae7e6aa (diff) | |
| download | zig-bfbbda77517ec83ef7cfacced651acc9d85b8bb0.tar.gz zig-bfbbda77517ec83ef7cfacced651acc9d85b8bb0.zip | |
compiler: fix new panic handler in release builds
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index b7d877bfaf..ae8ec072df 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -355,7 +355,7 @@ pub fn relocateContext(dest: *ThreadContext) void { /// The value which is placed on the stack to make a copy of a `ThreadContext`. const ThreadContextBuf = if (ThreadContext == noreturn) void else ThreadContext; /// The pointer through which a `ThreadContext` is received from callers of stack tracing logic. -const ThreadContextPtr = if (ThreadContext == noreturn) noreturn else *const ThreadContext; +pub const ThreadContextPtr = if (ThreadContext == noreturn) noreturn else *const ThreadContext; /// Capture the current context. The register values in the context will reflect the /// state after the platform `getcontext` function returns. @@ -1297,7 +1297,7 @@ fn handleSegfaultPosix(sig: i32, info: *const posix.siginfo_t, ctx_ptr: ?*anyopa if (ThreadContext == noreturn) return handleSegfault(addr, name, null); // Some kernels don't align `ctx_ptr` properly, so we'll copy it into a local buffer. - var copied_ctx: ThreadContextBuf = undefined; + var copied_ctx: posix.ucontext_t = undefined; const orig_ctx: *align(1) posix.ucontext_t = @ptrCast(ctx_ptr); copied_ctx = orig_ctx.*; if (builtin.os.tag.isDarwin() and builtin.cpu.arch == .aarch64) { |
