-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix inInference state corruption. #22313
Conversation
test/inference.jl
Outdated
@@ -855,4 +862,4 @@ let f, m | |||
Expr(:return, Expr(:call, Core._apply, :+, SSAValue(0))) | |||
] | |||
@test @inferred(f()) == 6 | |||
end | |||
end |
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.
My bad, introduced when fixing conflicts
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.
there's a fix needed to one of the staged tests too (to pass CI)
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.
Not sure what you mean. Is the fix needed due to an issue with my conflict resolution?
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.
no, just a change to another number to make the CI test pass
This led to non-idempotent irgen.
Rebased and updated failing staged function test. |
@@ -174,7 +174,7 @@ let gf_err, tsk = @async nothing # create a Task for yield to try to run | |||
end | |||
@test_throws ErrorException gf_err() | |||
@test_throws ErrorException gf_err() | |||
@test gf_err_ref[] == 3 | |||
@test gf_err_ref[] == 4 |
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.
why does this change?
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.
The value is unimportant, it just tells how many times we attempted to and failed to run the generated function and is useful for being aware of when it changes
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.
why does the number of times this attempted to and failed to run the generated function change then?
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.
We used to disable attempts to reinfer a function if it failed. This PR changes it to always attempt to reinfer a function.
This led to non-idempotent irgen.
Fixes #22290, caused by #21677.