Skip to content

Commit 2aa915d

Browse files
authored
Initialize big object header properly (#269)
Prevent uninitialized memory from causing an assertion failure.
1 parent 0f9190b commit 2aa915d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ STATIC_INLINE jl_value_t *jl_gc_big_alloc_inner(jl_ptls_t ptls, size_t sz)
10141014
memset(v, 0xee, allocsz);
10151015
#endif
10161016
v->sz = allocsz;
1017+
v->header = 0;
10171018
gc_big_object_link(ptls->gc_tls.heap.young_generation_of_bigvals, v);
10181019
return jl_valueof(&v->header);
10191020
}

0 commit comments

Comments
 (0)