| ... | ... | @@ -138,15 +138,18 @@ fn getRandomBytesDevURandom(buf: []u8) !void { |
| 138 | 138 | /// it raises SIGABRT followed by SIGKILL and finally lo |
| 139 | 139 | pub fn abort() noreturn { |
| 140 | 140 | @setCold(true); |
| 141 | | if (builtin.link_libc) { |
| 142 | | system.abort(); |
| 143 | | } |
| 141 | // MSVCRT abort() sometimes opens a popup window which is undesirable, so |
| 142 | // even when linking libc on Windows we use our own abort implementation. |
| 143 | // See https://github.com/ziglang/zig/issues/2071 for more details. |
| 144 | 144 | if (windows.is_the_target) { |
| 145 | 145 | if (builtin.mode == .Debug) { |
| 146 | 146 | @breakpoint(); |
| 147 | 147 | } |
| 148 | 148 | windows.kernel32.ExitProcess(3); |
| 149 | 149 | } |
| 150 | if (builtin.link_libc) { |
| 151 | system.abort(); |
| 152 | } |
| 150 | 153 | if (builtin.os == .uefi) { |
| 151 | 154 | // TODO there must be a better thing to do here than loop forever |
| 152 | 155 | while (true) {} |