diff options
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 008b470fede..b0e13717b82 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -118,7 +118,12 @@ extern "C" CDECL void upcall_fail(char const *expr, char const *file, size_t line) { - rust_task *task = rust_get_current_task(); + rust_task *task = rust_try_get_current_task(); + if (task == NULL) { + // NOTE: Need to think about what to do here + printf("failure outside of a task"); + abort(); + } s_fail_args args = {task,expr,file,line}; UPCALL_SWITCH_STACK(task, &args, upcall_s_fail); } |
