mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 22:33:08 +00:00
std: Don't pass undefined memory to the kernel in os.abort()
This commit is contained in:
parent
9f1f60fd43
commit
7d6a7f513b
@ -476,9 +476,8 @@ pub fn abort() noreturn {
|
|||||||
// Install default handler so that the tkill below will terminate.
|
// Install default handler so that the tkill below will terminate.
|
||||||
const sigact = Sigaction{
|
const sigact = Sigaction{
|
||||||
.handler = .{ .sigaction = SIG.DFL },
|
.handler = .{ .sigaction = SIG.DFL },
|
||||||
.mask = undefined,
|
.mask = empty_sigset,
|
||||||
.flags = undefined,
|
.flags = 0,
|
||||||
.restorer = undefined,
|
|
||||||
};
|
};
|
||||||
sigaction(SIG.ABRT, &sigact, null) catch |err| switch (err) {
|
sigaction(SIG.ABRT, &sigact, null) catch |err| switch (err) {
|
||||||
error.OperationNotSupported => unreachable,
|
error.OperationNotSupported => unreachable,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user