authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2022-08-11 11:04:26+02:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2022-08-11 11:05:53+02:00
log7d6a7f513b0053be4e1629de492cbde9215c442c
tree75d0f4d8a18fdcc9c6da3ba677a02a55f4bab199
parent9f1f60fd4311b37493a5297ccaac167d0270f521
signaturelock-open Commit is signed but in an unrecognized format.

std: Don't pass undefined memory to the kernel in os.abort()


1 files changed, 2 insertions(+), 3 deletions(-)

lib/std/os.zig+2-3
...@@ -476,9 +476,8 @@ pub fn abort() noreturn {...@@ -476,9 +476,8 @@ pub fn abort() noreturn {
476 // Install default handler so that the tkill below will terminate.476 // Install default handler so that the tkill below will terminate.
477 const sigact = Sigaction{477 const sigact = Sigaction{
478 .handler = .{ .sigaction = SIG.DFL },478 .handler = .{ .sigaction = SIG.DFL },
479 .mask = undefined,479 .mask = empty_sigset,
480 .flags = undefined,480 .flags = 0,
481 .restorer = undefined,
482 };481 };
483 sigaction(SIG.ABRT, &sigact, null) catch |err| switch (err) {482 sigaction(SIG.ABRT, &sigact, null) catch |err| switch (err) {
484 error.OperationNotSupported => unreachable,483 error.OperationNotSupported => unreachable,