mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.debug: try removing a probably-redundant condition
This commit is contained in:
parent
229f0a01b8
commit
2743fdb7ce
1 changed files with 1 additions and 14 deletions
|
|
@ -1285,20 +1285,7 @@ fn handleSegfaultPosix(sig: i32, info: *const posix.siginfo_t, ctx_ptr: ?*anyopa
|
|||
break :info .{ addr, name };
|
||||
};
|
||||
|
||||
// MLUGG TODO: this doesn't make any sense at all?
|
||||
const use_context = switch (native_arch) {
|
||||
.x86,
|
||||
.x86_64,
|
||||
.arm,
|
||||
.armeb,
|
||||
.thumb,
|
||||
.thumbeb,
|
||||
.aarch64,
|
||||
.aarch64_be,
|
||||
=> true,
|
||||
else => false,
|
||||
};
|
||||
if (ThreadContext == noreturn or !use_context) return handleSegfault(addr, name, null);
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue