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

Fix use-after-free on panic during ArcWake::wake_by_ref #1797

Merged
merged 1 commit into from Aug 15, 2019

Commits on Aug 15, 2019

  1. Fix use-after-free on panic during ArcWake::wake_by_ref

    Wrap temporary `Arc<>`s in `ManuallyDrop` early instead of calling
    `forget()` later: that way even during unwinding for panics it doesn't
    drop the refcount it doesn't actually own.
    
    Also it means `wake_by_ref` doesn't need an unwind section anymore.
    
    Same thing in `increase_refcount` (although `Arc::clone` should only abort,
    not unwind).
    stbuehler committed Aug 15, 2019
    Copy the full SHA
    6bacce1 View commit details
    Browse the repository at this point in the history