@@ -1562,17 +1562,15 @@ static void gc_mark_task_stack(jl_task_t *ta, int d)
15621562 if (ta == jl_current_task ) {
15631563 gc_mark_stack ((jl_value_t * )ta , jl_pgcstack , 0 , d );
15641564 }
1565- else if (ta == jl_root_task ) {
1565+ else if (! ta -> copy_stack ) {
15661566 gc_mark_stack ((jl_value_t * )ta , ta -> gcstack , 0 , d );
15671567 }
1568- else if (ta -> stkbuf != NULL && ta -> stkbuf != (void * )(intptr_t )-1 ) {
15691568#ifdef COPY_STACKS
1569+ else if (ta -> stkbuf != NULL && ta -> stkbuf != (void * )(intptr_t )- 1 ) {
15701570 ptrint_t offset = (char * )ta -> stkbuf + ta -> ssize - (char * )jl_stackbase ;
1571- #else
1572- ptrint_t offset = 0 ;
1573- #endif
15741571 gc_mark_stack ((jl_value_t * )ta , ta -> gcstack , offset , d );
15751572 }
1573+ #endif
15761574}
15771575
15781576NOINLINE static void gc_mark_task (jl_task_t * ta , int d )
@@ -1808,7 +1806,7 @@ double clock_now(void);
18081806
18091807extern jl_module_t * jl_old_base_module ;
18101808extern jl_array_t * jl_module_init_order ;
1811- extern jl_value_t * jl_unprotect_stack_func ;
1809+ extern jl_value_t * jl_task_cleanup_func ;
18121810
18131811static int inc_count = 0 ;
18141812static int quick_count = 0 ;
@@ -1846,7 +1844,7 @@ static void pre_mark(void)
18461844 }
18471845
18481846 jl_mark_box_caches ();
1849- gc_push_root (jl_unprotect_stack_func , 0 );
1847+ gc_push_root (jl_task_cleanup_func , 0 );
18501848 gc_push_root (jl_bottom_func , 0 );
18511849 gc_push_root (jl_typetype_type , 0 );
18521850
0 commit comments