diff options
| author | bors <bors@rust-lang.org> | 2021-12-16 19:56:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-16 19:56:45 +0000 |
| commit | 5531927e8af9b99ad923af4c827c91038bca51ee (patch) | |
| tree | 29836a7c54f4ecd26ead12fdcd2a1d48811a26d3 /compiler/rustc_codegen_llvm/src/attributes.rs | |
| parent | 1d01550f7ea9fce1cf625128fefc73b9da3c1508 (diff) | |
| parent | 3a0fa0375d9ace4b0a06438e2c7ce2d52d11fc2e (diff) | |
| download | rust-5531927e8af9b99ad923af4c827c91038bca51ee.tar.gz rust-5531927e8af9b99ad923af4c827c91038bca51ee.zip | |
Auto merge of #91616 - saethlin:sort_unchecked-sb-fix, r=Mark-Simulacrum
Fix #91306 by deriving all access from a single *mut T Fixes #91306. The previous code is invalid because the first argument to `copy_nonoverlapping` is invalidated by the mutable borrow taken out to construct the second argument. I believe this patch fixes that, and this code should now pass Miri with `-Ztag-raw-pointers`, ~~but I'm currently stuck trying to run my reproducer with a this patched version of the standard library (alternatively, running Miri on the standard library tests itself would suffice).~~ Ralf walked me through this on Zulip. I've also added fixes for 7 more problems other than those I reported. Most of them are easy to hit by calling sort_unstable on random arrays. I don't have reproducers for every change, but they seem pretty clear-cut to me. But I did only start learning stacked borrows 2 days ago so that might be a large dash of Dunning-Kruger.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions
