std: make panic and abort for amdhsa call trap

This commit is contained in:
Robin Voetter 2023-07-01 21:23:45 +02:00
parent 13c0624f23
commit a1b583dc24
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -806,7 +806,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(),
.cuda, .amdhsa => std.os.abort(),
else => {
const first_trace_addr = ret_addr orelse @returnAddress();
std.debug.panicImpl(error_return_trace, first_trace_addr, msg);

View file

@ -613,7 +613,7 @@ pub fn abort() noreturn {
exit(127); // Pid 1 might not be signalled in some containers.
}
switch (builtin.os.tag) {
.uefi, .wasi, .cuda => @trap(),
.uefi, .wasi, .cuda, .amdhsa => @trap(),
else => system.abort(),
}
}