Skip to content

Release v0.2.0

Choose a tag to compare

@frengor frengor released this 25 May 11:59
· 168 commits to main since this release
v0.2.0
1fd29cb
  • Finalization is now optional behind the feature finalization (enabled by default).
    It's still necessary to implement the Finalize trait, even though finalization isn't enabled, in order to avoid issues when multiple crates enables different features (see here for an example of such an issue). If finalization is not enabled, simply the implementation of Finalize won't ever be called.
  • Renamed state::execution_count to state::executions_count.
  • The state::allocated_bytes and state::executions_count functions now return a Result.
  • Huge improvements and optimizations (from -6% to -18%, see benchmarks).

Fixes:

  • Fixed unsoundness when using new_cyclic: it was possible to make the implementation of some methods to take a reference to partially uninitialized data when called on an invalid Cc. The currently only source of invalid Ccs is the parameter of the closure/function accepted by new_cyclic, so this shouldn't affect anyone not using it. This is one of the few things that MIRI doesn't check, so it went unnoticed until now.

Internal changes:

  • Mark::TraceRoots has been removed and Mark::TraceCounting has been renamed to Mark::Traced.
  • Reduced the number of calls to state and try_state.
  • Replaced the RefCell in the state's thread local with Cells.