-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Run bevy_ecs in miri on CI #1529
Comments
Makes sense to me! Given that miri is pretty slow and the change frequency of bevy_ecs internals is also low, I'm thinking this should probably be a periodic test (daily?). I ran miri prior to creating #1525. I'll do it again before merging. On A few days ago I also ran miri on the async-channel crate's tests, which passed. So it's unclear if this is a bevy-call-context issue that exposes a problem in async-channel, a bevy issue, or a miri bug (the error says the rule is experimental). Additionally, if the test above is commented out, miri has an internal compiler error on another test (which seems to be an indicator that bevy's Future code can't be tested by miri yet): |
Could you report an issue on rust-lang/rust for the ICE? |
Sure thing! |
Looks like a dupe of rust-lang/miri#1038 |
I would love to try and get |
rust-lang/miri#1038 is fixed now, btw. :) |
# Objective Fixes bevyengine#1529 Run bevy_ecs in miri ## Solution - Don't set thread names when running in miri rust-lang/miri/issues/1717 - Update `event-listener` to `2.5.2` as previous versions have UB that is detected by miri: [event-listener commit](smol-rs/event-listener@1fa31c5) - Ignore memory leaks when running in miri as they are impossible to track down rust-lang/miri/issues/1481 - Make `table_add_remove_many` test less "many" because miri is really quite slow :) - Make CI run `RUSTFLAGS="-Zrandomize-layout" MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-tag-raw-pointers -Zmiri-disable-isolation" cargo +nightly miri test -p bevy_ecs`
# Objective Fixes bevyengine#1529 Run bevy_ecs in miri ## Solution - Don't set thread names when running in miri rust-lang/miri/issues/1717 - Update `event-listener` to `2.5.2` as previous versions have UB that is detected by miri: [event-listener commit](smol-rs/event-listener@1fa31c5) - Ignore memory leaks when running in miri as they are impossible to track down rust-lang/miri/issues/1481 - Make `table_add_remove_many` test less "many" because miri is really quite slow :) - Make CI run `RUSTFLAGS="-Zrandomize-layout" MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-tag-raw-pointers -Zmiri-disable-isolation" cargo +nightly miri test -p bevy_ecs`
What problem does this solve or what need does it fill?
Bevy_ecs contains a lot of unsafe code. Unsafe code in Bevy has been proven to be unsound on multiple occasions.
What solution would you like?
Run the bevy_ecs test suite in miri to detect UB. Preferably miri would also manually be run on #1525 before it is merged.
What alternative(s) have you considered?
The text was updated successfully, but these errors were encountered: