Skip to content

Commit 7d6a7f5

Browse files
committed
std: Don't pass undefined memory to the kernel in os.abort()
1 parent 9f1f60f commit 7d6a7f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/std/os.zig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,8 @@ pub fn abort() noreturn {
476476
// Install default handler so that the tkill below will terminate.
477477
const sigact = Sigaction{
478478
.handler = .{ .sigaction = SIG.DFL },
479-
.mask = undefined,
480-
.flags = undefined,
481-
.restorer = undefined,
479+
.mask = empty_sigset,
480+
.flags = 0,
482481
};
483482
sigaction(SIG.ABRT, &sigact, null) catch |err| switch (err) {
484483
error.OperationNotSupported => unreachable,

0 commit comments

Comments
 (0)