-
-
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
WeakKeyDict is unsound #38727
Comments
If trying the reproducer, make sure to try after 59aedd1. Without that, the reproducer needs to be written somewhat differently. |
I can't reproduce on master (macOS). |
Fails reliably for me on both linux and macOS master. What output of |
|
Do I need to run it in a file? |
No, I just paste it into the REPL and it fails. What commit are you on exactly? |
Tried it loaded from a file, same result. |
Maybe something specific about the macOS system you're testing on? |
Shouldn't be, although it's somewhat sensitive to collection intervals. What happens if you runs bar twice and also what exact commit did you try? |
I get |
I also get |
My bad — I was on a branch so when I did |
The underlying issues was addressed with the change in WeakRef semantics in JuliaLang#38180. However, we still want the test. Closes JuliaLang#38727
This is reduced from #38712 (comment). See that analysis for what happens in the original case. The short version is that there is a window of opportunity where the only reference to a value is weak, so finalizers can get scheduled, and then then a root can be re-established which causes much confusion. The below code illustrates the issue. This will return a
foo(-1)
because of this issue, which is illegal. It should either returnfoo(1)
ormissing
.The text was updated successfully, but these errors were encountered: