-
Notifications
You must be signed in to change notification settings - Fork 506
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
Undefined behavior: do_in_place_scope tries to drop scope when scope reference passed to user is still alive #1008
Comments
I have a bit of unsafe code in the linked project, but I believe none of those unsafe code are triggered in the unit test that triggers this UB. The error seems to suggest that |
I believe this is a variant of #938 and #952, especially #952 (comment). Basically, when we call any This should be ok in practice since rust-lang/rust#98017 stopped marking references to |
I hope that #1011 will fix this, but it would be great if you could test that with your minimal example, or even with your complete project. |
It seems miri no longer complains about the UB after using the commit in #1011 indeed. However I can't be sure since miri takes too long and never exits, but no errors are reported anymore. |
As my project is a bit complex, I have not been successful in creating a minimal reproducing example yet, but an unstripped example run can be found below.
GitHub CI run: https://github.com/SOF3/dynec/actions/runs/3861470087/jobs/6582464784#step:4:487
Source: https://github.com/SOF3/dynec/blob/2e83e3433b54977277a7ba340ac216a60b7da526/src/scheduler/executor.rs#L80-L121
Miri output:
The text was updated successfully, but these errors were encountered: