Skip to content

Commit 0e84b09

Browse files
committed
add missing root
1 parent 85d13db commit 0e84b09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gf.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ static jl_value_t *lookup_match(jl_value_t *a, jl_value_t *b, jl_tuple_t **penv,
823823
jl_value_t *ti = jl_type_intersection_matching(a, b, penv, tvars);
824824
if (ti == (jl_value_t*)jl_bottom_type)
825825
return ti;
826+
JL_GC_PUSH1(&ti);
826827
assert(jl_is_tuple(*penv));
827828
jl_value_t **ee = (jl_value_t**)alloca(sizeof(void*) * jl_tuple_len(*penv));
828829
int n=0;
@@ -854,8 +855,10 @@ static jl_value_t *lookup_match(jl_value_t *a, jl_value_t *b, jl_tuple_t **penv,
854855
issue #5254
855856
*/
856857
if (val == (jl_value_t*)jl_bottom_type) {
857-
if (!jl_subtype(a, ti, 0))
858+
if (!jl_subtype(a, ti, 0)) {
859+
JL_GC_POP();
858860
return (jl_value_t*)jl_bottom_type;
861+
}
859862
}
860863
}
861864
}
@@ -865,6 +868,7 @@ static jl_value_t *lookup_match(jl_value_t *a, jl_value_t *b, jl_tuple_t **penv,
865868
memcpy(en->data, ee, n*sizeof(void*));
866869
*penv = en;
867870
}
871+
JL_GC_POP();
868872
return ti;
869873
}
870874

0 commit comments

Comments
 (0)