-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
#[once]
fixtures are unsound for types that are not Sync
#235
Comments
If bumping the MSRV to 1.70 (2023-06-01) is acceptable, the simple fix for this would be to use |
THX for reporting it!!! |
Sure, no problem: #237. |
Anyway, I run |
A
#[once]
fixture lets multiple threads access the same mutablestatic
variable concurrently via shared references. This is unsound when the value is!Sync
.Small reproducer:
Running this with
MIRIFLAGS="-Zmiri-num-cpus=2" cargo miri test
will show the UB:The text was updated successfully, but these errors were encountered: