rust/library/alloc/src
Yuki Okushi 814b31eb2e
Rollup merge of #74762 - ssomers:btree_no_root_in_remove_kv_tracking, r=Mark-Simulacrum
BTreeMap::drain_filter should not touch the root during iteration

Although Miri doesn't point it out, I believe there is undefined behaviour using `drain_filter` when draining the 11th-last element from a tree that was larger. When this happens, the last remaining child nodes are merged, the root becomes empty and is popped from the tree. That last step establishes a mutable reference to the node elected root and writes a pointer in `node::Root`, while iteration continues to visit the same node.

This is mostly code from #74437, slightly adapted.
2020-08-03 01:05:13 +09:00
..
alloc mv std libs to library/ 2020-07-27 19:51:13 -05:00
collections Rollup merge of #74762 - ssomers:btree_no_root_in_remove_kv_tracking, r=Mark-Simulacrum 2020-08-03 01:05:13 +09:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw_vec mv std libs to library/ 2020-07-27 19:51:13 -05:00
rc mv std libs to library/ 2020-07-27 19:51:13 -05:00
sync mv std libs to library/ 2020-07-27 19:51:13 -05:00
alloc.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
borrow.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
boxed.rs Remove deprecated unstable {Box,Rc,Arc}::into_raw_non_null functions 2020-07-29 11:00:31 +02:00
fmt.rs Link to syntax section when referencing it 2020-07-29 10:43:40 +02:00
lib.rs Auto merge of #74373 - lcnr:array_chunks, r=withoutboats 2020-08-01 06:54:14 +00:00
macros.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw_vec.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
rc.rs Rollup merge of #74782 - vorner:weak-into-raw-cnt-doc, r=dtolnay 2020-07-30 13:04:29 -07:00
slice.rs add tracking issue 2020-08-01 07:49:24 +02:00
str.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
string.rs Explain why inline default ToString impl 2020-07-29 07:38:06 +00:00
sync.rs Rollup merge of #74782 - vorner:weak-into-raw-cnt-doc, r=dtolnay 2020-07-30 13:04:29 -07:00
task.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
tests.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
vec.rs Auto merge of #75033 - Manishearth:rollup-d8afil1, r=Manishearth 2020-08-02 01:04:54 +00:00