Closed
Description
use std;
import std::vec;
fn main()
{
let vec[int] a = [0];
auto i = 20;
while (i > 0) {
a += a;
i -= 1;
}
}
I suspect, but haven't confirmed, the following:
If a vector that is in the process of self-appending (v += v) grows, we can realloc the existing vector pointer and invalidate the memory that is being copied.