-
-
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
Side-effectful foreach
callback mysteriously eliminated on nightly (miscompilation?)
#48807
Labels
Milestone
Comments
oscardssmith
added
bug
Indicates an unexpected problem or unintended behavior
compiler:effects
effect analysis
labels
Feb 27, 2023
Note: No need to build it yourself, you can download pre-built artifacts in CI.
|
Thanks so much for the bisect, @inkydragon ! |
aviatesk
added a commit
that referenced
this issue
Feb 28, 2023
We need to make sure that we widen both type and effects when bailing out inference. I wanted to make a simplified test case for this, but it turns out to be a bit tricky since it relies on the detail of union split and the bailing out logic. fix #48807
aviatesk
added a commit
that referenced
this issue
Mar 1, 2023
Since we allow overloading of the `bail_out_xxx` hooks, we need to make sure that we widen both type and effects to the top when bailing on inference regardless of the condition presumed by a hook. This commit particularly fixes the correctness of `bail_out_apply` (fixes #48807). I wanted to make a simplified test case for this, but it turns out to be a bit tricky since it relies on the details of multiple match analysis and the bail out logic.
aviatesk
added a commit
that referenced
this issue
Mar 1, 2023
Since we allow overloading of the `bail_out_xxx` hooks, we need to make sure that we widen both type and effects to the top when bailing on inference regardless of the condition presumed by a hook. This commit particularly fixes the correctness of `bail_out_apply` (fixes #48807). I wanted to make a simplified test case for this, but it turns out to be a bit tricky since it relies on the details of multiple match analysis and the bail out logic.
aviatesk
added a commit
that referenced
this issue
Mar 1, 2023
Since we allow overloading of the `bail_out_xxx` hooks, we need to make sure that we widen both type and effects to the top when bailing on inference regardless of the condition presumed by a hook. This commit particularly fixes the correctness of `bail_out_apply` (fixes #48807). I wanted to make a simplified test case for this, but it turns out to be a bit tricky since it relies on the details of multiple match analysis and the bail out logic.
aviatesk
added a commit
that referenced
this issue
Mar 1, 2023
Since we allow overloading of the `bail_out_xxx` hooks, we need to make sure that we widen both type and effects to the top when bailing on inference regardless of the condition presumed by a hook. This commit particularly fixes the correctness of `bail_out_apply` (fixes #48807). I wanted to make a simplified test case for this, but it turns out to be a bit tricky since it relies on the details of multiple match analysis and the bail out logic.
KristofferC
pushed a commit
that referenced
this issue
Mar 3, 2023
Since we allow overloading of the `bail_out_xxx` hooks, we need to make sure that we widen both type and effects to the top when bailing on inference regardless of the condition presumed by a hook. This commit particularly fixes the correctness of `bail_out_apply` (fixes #48807). I wanted to make a simplified test case for this, but it turns out to be a bit tricky since it relies on the details of multiple match analysis and the bail out logic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I discovered this while trying to determine why Flux's nightly CI was failing. Have only managed to reduce it to the following:
Expected output:
Actual output:
What makes this mysterious is what seemingly minor changes can restore the expected behaviour:
foreach
AbstractZero
+NoTangent
/ZeroTangent
. This only seems to work with the CRC types.ChainRulesCore.Tangent
, but I'm not sure if that indicates anything.Core.donotdelete(false)
in theforeach
callback. This suggests to me that the call to said callback is being completely eliminated somehow. Unfortunately Cthulhu won't let me descend into theCore._apply_iterate(Base.iterate, f, z)
call that would actually call said callback, so the best I have to go on here is the following remarks:Versioninfo:
The text was updated successfully, but these errors were encountered: