rt: Don't log in the stack switching failure path
The runtime is in an uncertain state here and, instead of thinking about how to make the logger work correctly, let's just avoid it. Currently, it ends up hitting an assert saying that we can't log on the rust stack.
This commit is contained in:
parent
75cf13ec72
commit
9604544e23
1 changed files with 4 additions and 5 deletions
|
|
@ -71,8 +71,8 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
|
|||
try {
|
||||
task->call_on_c_stack(args, fn_ptr);
|
||||
} catch (...) {
|
||||
LOG_ERR(task, task, "Native code threw an exception");
|
||||
abort();
|
||||
// Logging here is not reliable
|
||||
assert(false && "Native code threw an exception");
|
||||
}
|
||||
|
||||
task->record_stack_limit();
|
||||
|
|
@ -96,9 +96,8 @@ upcall_call_shim_on_rust_stack(void *args, void *fn_ptr) {
|
|||
} catch (...) {
|
||||
// We can't count on being able to unwind through arbitrary
|
||||
// code. Our best option is to just fail hard.
|
||||
LOG_ERR(task, task,
|
||||
"Rust task failed after reentering the Rust stack");
|
||||
abort();
|
||||
// Logging here is not reliable
|
||||
assert(false && "Rust task failed after reentering the Rust stack");
|
||||
}
|
||||
|
||||
// FIXME: As above
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue