Demonstrate how naive lifetime extension leads to segfaults
In order to restore safety, we'll have to add safeguards forbidding mutation of `RustSet` from Python if an iterator still references it. It's easy to trigger the segfault by freeing the underlying buffers, but in principle, even adding more data to the set could end up the same, by reallocating elsewhere and freeing the original buffer. At this point, this is also first evidence that we met the goal of avoiding the copy of the data.
Please register or sign in to comment