-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing gc-root store in subtype #56472
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could maybe use a comment that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The type is an argument, so you cannot overwrite it, and the gc verifier would probably catch that mistake anyways |
||
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)) { | ||
|
@@ -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); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just an optimization? Or is this the actual fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a similar fix, though not actually the one that crashed