From 91210867f42256b42c060f1dc6a7f07a456f889f Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Thu, 8 Jan 2026 21:33:44 -0700 Subject: [PATCH] Patch: GC preserve a Task's Scope on task start --- src/task.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/task.c b/src/task.c index 019a301b1f062..4c8680c40416b 100644 --- a/src/task.c +++ b/src/task.c @@ -1216,6 +1216,8 @@ CFI_NORETURN jl_ptls_t ptls = ct->ptls; jl_value_t *res; assert(ptls->finalizers_inhibited == 0); + jl_value_t *scope = ct->scope; + JL_GC_PUSH1(&scope); #ifdef MIGRATE_TASKS jl_task_t *pt = ptls->previous_task;