]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #82554 - SkiFire13:fix-string-retain-unsoundness, r=m-ou-se
authorDylan DPC <dylan.dpc@gmail.com>
Mon, 22 Mar 2021 01:20:27 +0000 (02:20 +0100)
committerGitHub <noreply@github.com>
Mon, 22 Mar 2021 01:20:27 +0000 (02:20 +0100)
commitda143d38e4e47f53c4745a037563f34d7f3ea6e3
treedf67533b7cff66ddb141e8227965e9700c38578b
parent29a53e6e69d5684a598770652e9c170dd4d149d8
parentc89e64363ba25a4bf487d71a4ad6e9a8cbe40384
Rollup merge of #82554 - SkiFire13:fix-string-retain-unsoundness, r=m-ou-se

Fix invalid slice access in String::retain

As noted in #78499, the previous fix was technically still unsound because it accessed elements of a slice outside its bounds (even though they were still inside the same allocation). This PR addresses that concern by switching to a dropguard approach.
library/alloc/src/string.rs