Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make autoreleasepool take the pool as a parameter #103

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Jun 13, 2021

  1. Make autoreleasepool take the pool as a parameter

    The lifetime of the parameter is the lifetime of references in the pool. This allows us to bound lifetimes on autoreleased objects, thereby making them safe to return.
    madsmtm committed Jun 13, 2021
    Configuration menu
    Copy the full SHA
    ff261e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    93ca34a View commit details
    Browse the repository at this point in the history
  3. Add unstable_autoreleasesafe feature

    A nightly-only feature that adds the auto trait `AutoreleaseSafe` and uses it to prevent calling `autoreleasepool` with closures that capture an outer `AutoreleasePool`.
    
    This fixes on nightly the unsoundness hole preventing `autoreleasepool` from being used to safely construct references to autoreleased objects.
    madsmtm committed Jun 13, 2021
    Configuration menu
    Copy the full SHA
    0d256c3 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2021

  1. Configuration menu
    Copy the full SHA
    8941103 View commit details
    Browse the repository at this point in the history
  2. Add debug assertions to prevent autoreleasepool unsoundness

    Prevent using the lifetime from an outer pool when an inner pool is active.
    madsmtm committed Jun 14, 2021
    Configuration menu
    Copy the full SHA
    18d55ab View commit details
    Browse the repository at this point in the history