Skip to content

Commit de324af

Browse files
committed
Fix missing GC root
This is fairly obviously a typo, but a bit of a nasty one, because it means that `value` will be unrooted over the next `fieldref` (or potentially the svec allocation in grow to). Fixes #32751
1 parent 089cafc commit de324af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/builtins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ JL_CALLABLE(jl_f__apply)
603603
while (next != jl_nothing) {
604604
roots[stackalloc] = next;
605605
jl_value_t *value = jl_fieldref(next, 0);
606-
roots[stackalloc + 1] = next;
606+
roots[stackalloc + 1] = value;
607607
jl_value_t *state = jl_fieldref(next, 1);
608608
roots[stackalloc] = state;
609609
_grow_to(&roots[0], &newargs, &arg_heap, &n_alloc, n + precount + 1, extra);

0 commit comments

Comments
 (0)