Skip to content

Commit

Permalink
missing gc-root store in subtype (#56472)
Browse files Browse the repository at this point in the history
Fixes #56141
Introduced by #52228 (a624d44)
  • Loading branch information
vtjnash authored Nov 7, 2024
1 parent 22c5bdc commit 671cd5e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/subtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -4700,12 +4700,12 @@ static jl_value_t *insert_nondiagonal(jl_value_t *type, jl_varbinding_t *troot,
jl_value_t *n = jl_unwrap_vararg_num(type);
if (widen2ub == 0)
widen2ub = !(n && jl_is_long(n)) || jl_unbox_long(n) > 1;
jl_value_t *newt;
JL_GC_PUSH2(&newt, &n);
newt = insert_nondiagonal(t, troot, widen2ub);
if (t != newt)
jl_value_t *newt = insert_nondiagonal(t, troot, widen2ub);
if (t != newt) {
JL_GC_PUSH1(&newt);
type = (jl_value_t *)jl_wrap_vararg(newt, n, 0, 0);
JL_GC_POP();
JL_GC_POP();
}
}
else if (jl_is_datatype(type)) {
if (jl_is_tuple_type(type)) {
Expand Down Expand Up @@ -4742,7 +4742,7 @@ static jl_value_t *_widen_diagonal(jl_value_t *t, jl_varbinding_t *troot) {
static jl_value_t *widen_diagonal(jl_value_t *t, jl_unionall_t *u, jl_varbinding_t *troot)
{
jl_varbinding_t vb = { u->var, NULL, NULL, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, troot };
jl_value_t *nt;
jl_value_t *nt = NULL;
JL_GC_PUSH2(&vb.innervars, &nt);
if (jl_is_unionall(u->body))
nt = widen_diagonal(t, (jl_unionall_t *)u->body, &vb);
Expand Down

0 comments on commit 671cd5e

Please sign in to comment.