-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Miri detects a violation of stacked borrows in slice::sort_unstable with -Zmiri-track-raw-pointers #91306
Comments
cc @rust-lang/miri |
FWIW, I have now detected this bug through the tests in |
Looks like the problem is in this line: rust/library/core/src/slice/sort.rs Line 112 in 18fb97e
|
Actually, just to be sure, @RalfJung are we interested in patching out all such instances of this in std/alloc/core? I know I personally would like the standard library to be clean against Miri with |
So far we fixed various issues of this sort that people noticed, but there was never a concerted effort to find all of them. So they were not deliberately left in, just not found yet. Whether we want to fix them all is up to @rust-lang/libs who ultimately decide about the std library implementation. |
Similar to #78749?
I tried this code:
MIRIFLAGS="-Zmiri-track-raw-pointers" cargo +nightly miri run
I expected to see this happen: Miri does not detect UB
Instead, this happened: Miri detects UB (experimentally)
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: