Closed
Description
rust/library/core/src/iter/adapters/zip.rs
Lines 296 to 301 in 312b894
rust/library/core/src/iter/adapters/zip.rs
Lines 235 to 244 in 312b894
Yet another soundness bug in Zip's TRA specialization. Line 300 is not called when line 298 panics. This leaves self.a_len
outdated, which results in calling __iterator_get_unchecked()
with an invalid index in line 242.
Here is a playground link that demonstrates creating two mutable references to the same memory location without unsafe code.