-
Notifications
You must be signed in to change notification settings - Fork 114
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
lazy_static: very rare (?) BorrowMut panic #126
Comments
@carllerche is it possible for another thread to be executed by this line? Line 50 in 13b7dc4
If so, I think this bug arises when a different thread gets to run, and it initializes the value, so when we then continue to initialize the value, we end up dropping the value they inserted. That drop may be a drop of an |
The real lazy_static uses a lock to avoid races in initialization. We don't implement that lock yet, so our initialization can race. If we do, we should not crash like we did before. Fixes tokio-rs#126.
Can confirm that #128 fixes this. |
The real lazy_static uses a lock to avoid races in initialization. We don't implement that lock yet, so our initialization can race. If we do, we should not crash like we did before. Fixes #126.
After running loom for a very long time on the crossbeam Treiber stack example, I got this:
Will try to debug tomorrow, just wanted to leave a record of it.
The text was updated successfully, but these errors were encountered: