1. 06 Jun, 2019 3 commits
    • Georges Racinet's avatar
      Demonstrate how naive lifetime extension leads to segfaults · fa1138b46f57
      Georges Racinet authored
      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.
      fa1138b46f57
    • Georges Racinet's avatar
      Sharing multiple reference by forcing the lifetime · 3160d97c8d3f
      Georges Racinet authored
      This should be the general principle, but this first implementation
      does not provide any safeguards. In particular, I expect that
      clearing or heavily resizing the underlying HashSet while an iterator
      has a reference on it should end up in segfaults.
      3160d97c8d3f
    • Georges Racinet's avatar
      Starting point · ae55368335ce
      Georges Racinet authored
      At this stage, we have a very minimal working Rust implementation for
      sets of integers in Rust, and we don't try and provide multiple references
      to it to the Python side.
      ae55368335ce