Skip to content

Commit c99e110

Browse files
committed
Modify upcall_fail so that failing tasks relinquish control to the scheduler
This is sufficient to let unsupervised tasks that don't allocate fail without crashing or leaking.
1 parent 01a52d7 commit c99e110

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/rt/rust_upcall.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ upcall_fail(rust_task *task,
221221
LOG_UPCALL_ENTRY(task);
222222
LOG_ERR(task, upcall, "upcall fail '%s', %s:%" PRIdPTR, expr, file, line);
223223
task->fail();
224+
task->die();
225+
task->notify_tasks_waiting_to_join();
226+
task->yield(4);
224227
}
225228

226229
/**

0 commit comments

Comments
 (0)