Skip to content

Commit e259cc0

Browse files
committed
Zero-out bootstrap_task
1 parent 6c4c259 commit e259cc0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,8 @@ void _julia_init(JL_IMAGE_SEARCH rel)
737737
// we need the `Task` type itself. We use stack-allocated "raw" `jl_task_t` struct to
738738
// workaround this chicken-and-egg problem. Note that this relies on GC to be turned
739739
// off just above as GC fails because we don't/can't allocate the type tag.
740-
jl_task_t bootstrap_task;
741-
bootstrap_task.gcstack = NULL;
740+
jl_task_t bootstrap_task = {0};
741+
assert(bootstrap_task.gcstack == NULL);
742742
jl_current_task = &bootstrap_task;
743743

744744
jl_resolve_sysimg_location(rel);

0 commit comments

Comments
 (0)