Improve soundness of rustc_data_structures#97707
Conversation
|
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
|
Thanks @Nilstrieb. I'm not sure the title accurately represents the PR. I'd go for "Make |
|
It also makes a soundness fix in the second commit, so I think it's more accurate. But I can change it it if you want. |
|
Ok. The commit messages are clear enough anyway. |
|
📌 Commit e869dce8230e6779a0305fd3f393611b7a263fd9 has been approved by |
e869dce to
9fef644
Compare
|
@cjgillot I was able to run an additional test in miri by reducing the number thanks to Ralf, can you approve it again? |
|
@bors r=cjgillot |
|
📌 Commit 9fef644e7e5a5ded13ffefc35e80500c5769badd has been approved by |
Some tests took too long and owning_ref is fundamentally flawed, so don't run these tests or run them with a shorter N. This makes miri with `-Zmiri-strict-provenance` usable to find UB.
It creates the src pointer first, which is then invalidated by a unique borrow of the destination pointer. Swap the borrows around to fix this. Found with miri.
9fef644 to
7e3bee6
Compare
|
You have to approve that again, I fucked up my formatting :) |
|
@bors r=cjgillot |
|
📌 Commit 7e3bee6 has been approved by |
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#97609 (Iterate over `maybe_unused_trait_imports` when checking dead trait imports) - rust-lang#97688 (test const_copy to make sure bytewise pointer copies are working) - rust-lang#97707 (Improve soundness of rustc_data_structures) - rust-lang#97731 (Add regresion test for rust-lang#87142) - rust-lang#97735 (Don't generate "Impls on Foreign Types" for std) - rust-lang#97737 (Fix pretty printing named bound regions under -Zverbose) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Make it runnable in miri by adding some ignores and changing N in miri. Also fix a stacked borrows issue in sip128.