Commit 24c749473a
Changed files (2)
lib
lib/std/builtin.zig
@@ -833,6 +833,7 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr
// Didn't have boot_services, just fallback to whatever.
std.os.abort();
},
+ .cuda => std.os.abort(),
else => {
const first_trace_addr = ret_addr orelse @returnAddress();
std.debug.panicImpl(error_return_trace, first_trace_addr, msg);
lib/std/os.zig
@@ -500,10 +500,15 @@ pub fn abort() noreturn {
@breakpoint();
exit(1);
}
+ if (builtin.os.tag == .cuda) {
+ @"llvm.trap"();
+ }
system.abort();
}
+extern fn @"llvm.trap"() noreturn;
+
pub const RaiseError = UnexpectedError;
pub fn raise(sig: u8) RaiseError!void {