Commit 7d6a7f513b

Isaac Freund <mail@isaacfreund.com>
2022-08-11 11:04:26
std: Don't pass undefined memory to the kernel in os.abort()
1 parent 9f1f60f
Changed files (1)
lib
std
lib/std/os.zig
@@ -476,9 +476,8 @@ pub fn abort() noreturn {
         // Install default handler so that the tkill below will terminate.
         const sigact = Sigaction{
             .handler = .{ .sigaction = SIG.DFL },
-            .mask = undefined,
-            .flags = undefined,
-            .restorer = undefined,
+            .mask = empty_sigset,
+            .flags = 0,
         };
         sigaction(SIG.ABRT, &sigact, null) catch |err| switch (err) {
             error.OperationNotSupported => unreachable,