Skip to content

Commit ae53238

Browse files
authored
Merge pull request #39065 from fingolfin/mh/jl_new_task-stack-alloc
Fix jl_new_task to avoid allocating stack twice
2 parents 770d0d5 + d4119a2 commit ae53238

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/task.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion
679679
else {
680680
t->bufsz = JL_STACK_SIZE;
681681
}
682+
t->stkbuf = NULL;
682683
}
683684
else {
684685
// user requested dedicated stack of a certain size
@@ -704,7 +705,6 @@ JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion
704705
t->sticky = 1;
705706
t->gcstack = NULL;
706707
t->excstack = NULL;
707-
t->stkbuf = NULL;
708708
t->started = 0;
709709
t->prio = -1;
710710
t->tid = -1;

0 commit comments

Comments
 (0)