diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-08-03 01:05:13 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-03 01:05:13 +0900 |
| commit | 814b31eb2edad670f86174a60841cceea5886fa1 (patch) | |
| tree | d9f219b006cce573dd400d2de3128977144a0fdf /src/test/codegen/src-hash-algorithm | |
| parent | 8c331ee4709c73b23f0f4c7525661ea7d47c8467 (diff) | |
| parent | 99398dd2fd46c24857707ee5db8c7a90f0811850 (diff) | |
| download | rust-814b31eb2edad670f86174a60841cceea5886fa1.tar.gz rust-814b31eb2edad670f86174a60841cceea5886fa1.zip | |
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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
