-
-
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
Infinite recursion in type intersection #30741
Comments
I've done the bisect and ended up with the following result:
|
I am still unable to produce a MWE, but I've managed to track down which line in my code that triggers the bug: https://github.com/JuliaAtoms/Atoms.jl/blob/02061421e7596b7e6c0aacc799835adb3d02408c/src/hydrogenic.jl#L97 |
I have what I think is a MWE for this error:
Fewer than 3 arguments in the function fails to produce the error. Any abstract type parameterized by T seems to produce the error. I can provide my backtrace if it's useful for comparison, but it's just lots and lots of calls to edit: This error does appear in v1.0.3 (through current master), so it's probably a different bug? Just the same symptoms of infinite recursion in type intersection. e̶d̶i̶t̶ ̶e̶d̶i̶t̶:̶ ̶I̶n̶ ̶t̶r̶y̶i̶n̶g̶ ̶t̶o̶ ̶s̶n̶e̶a̶k̶ ̶a̶r̶o̶u̶n̶d̶ ̶t̶h̶i̶s̶ ̶e̶r̶r̶o̶r̶,̶ ̶I̶'̶v̶e̶ ̶f̶o̶u̶n̶d̶ ̶t̶h̶a̶t̶ ̶i̶t̶ ̶o̶c̶c̶u̶r̶s̶ ̶p̶r̶e̶c̶i̶s̶e̶l̶y̶ ̶w̶h̶e̶n̶ ̶b̶o̶t̶h̶ ̶ e̶d̶i̶t̶ ̶3̶:̶ ̶i̶t̶'̶s̶ ̶m̶o̶r̶e̶ ̶c̶o̶m̶p̶l̶i̶c̶a̶t̶e̶d̶ ̶t̶h̶a̶n̶ ̶t̶h̶a̶t̶.̶ ̶ ̶M̶y̶ ̶n̶e̶w̶e̶r̶ ̶t̶e̶n̶t̶a̶t̶i̶v̶e̶ ̶h̶y̶p̶o̶t̶h̶e̶s̶i̶s̶ ̶i̶s̶ ̶t̶h̶a̶t̶ ̶a̶ ̶m̶e̶t̶h̶o̶d̶ ̶d̶e̶f̶i̶n̶i̶t̶i̶o̶n̶ ̶w̶h̶e̶r̶e̶ ̶t̶h̶e̶ ̶f̶i̶n̶a̶l̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶ ̶i̶s̶ ̶a̶b̶s̶t̶r̶a̶c̶t̶ ̶w̶i̶l̶l̶ ̶n̶o̶t̶ ̶p̶r̶o̶d̶u̶c̶e̶ ̶t̶h̶e̶ ̶e̶r̶r̶o̶r̶.̶ ̶(̶I̶ ̶n̶e̶e̶d̶e̶d̶ ̶t̶o̶ ̶g̶o̶ ̶u̶p̶ ̶t̶o̶ ̶4̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶s̶ ̶t̶o̶ ̶n̶o̶t̶i̶c̶e̶ ̶t̶h̶i̶s̶ ̶p̶a̶t̶t̶e̶r̶n̶.̶)̶ final edit: I have no idea what the rule is to make the method definition error. |
FYI, I've simplified my types so I no longer hit this problem in Atoms.jl. It's easy enough, however, to go back in time an create a Manifest.toml that will recreate the whole situation. Last failed build (for this reason) was https://travis-ci.org/JuliaAtoms/Atoms.jl/builds/487851549 Now I have new exciting failures!: #31115 |
The MWE above (with the 3 method |
I've created a gist that you can instantiate to reproduce the error consistently; tested on my Mac laptop and Linux desktop, both running Julia v1.1.0. |
This occurs on nightly since at least e51a707, but not v1.0.3. Apologies for not having a MWE, when trying to run
@code_typed
or@code_warntype
on the last line that triggers the error, I get aStackOverflowError
.When I run the following code
the last line triggers an infinite recursion in
subtype.c
, which breaks at some point, and then the code continues as nothing happened. On second run in the same Julia instance, the infinite recursion does not occur.Similar symptoms, not sure if related: #21696, #24254, #24942.
I will try to do a bisect.
The text was updated successfully, but these errors were encountered: