Skip to content

Commit e89a2b8

Browse files
authored
Fix missing gc root in compile-all (#25128)
``` /home/keno/julia/src/precompile.c:191:5: note: GC frame changed here JL_GC_PUSH2(&p, &methsig); ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/keno/julia/src/precompile.c:193:5: note: Loop condition is true. Entering loop body while (!incr) { ^ /home/keno/julia/src/precompile.c:194:24: note: Started tracking value here jl_svec_t *p = jl_alloc_svec_uninit(l); ^~~~~~~~~~~~~~~~~~~~~~~ /home/keno/julia/src/precompile.c:195:9: note: Loop condition is true. Entering loop body for (i = 0, idx_ctr = 0, incr = 1; i < l; i++) { ^ /home/keno/julia/src/precompile.c:197:13: note: Taking false branch if (jl_is_uniontype(ty)) { ^ /home/keno/julia/src/precompile.c:195:9: note: Loop condition is false. Execution continues on line 217 for (i = 0, idx_ctr = 0, incr = 1; i < l; i++) { ^ /home/keno/julia/src/precompile.c:217:32: note: Passing non-rooted value as argument to function that may GC methsig = (jl_value_t*)jl_apply_tuple_type(p); ^ ~ ``` Essentially the same bug as #25123
1 parent 7eb3d90 commit e89a2b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/precompile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void _compile_all_union(jl_value_t *sig)
191191
JL_GC_PUSH2(&p, &methsig);
192192
int idx_ctr = 0, incr = 0;
193193
while (!incr) {
194-
jl_svec_t *p = jl_alloc_svec_uninit(l);
194+
p = jl_alloc_svec_uninit(l);
195195
for (i = 0, idx_ctr = 0, incr = 1; i < l; i++) {
196196
jl_value_t *ty = jl_svecref(sigbody->parameters, i);
197197
if (jl_is_uniontype(ty)) {

0 commit comments

Comments
 (0)