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

rt: panic if EnterGuard dropped incorrect order #5772

Merged
merged 5 commits into from
Jun 7, 2023

Commits on Jun 6, 2023

  1. rt: panic if EnterGuard dropped incorrect order

    Calling `Handle::enter()` returns a `EnterGuard` value, which resets the
    thread-local context on drop. The drop implementation assumes that
    guards from nested `enter()` calls are dropped in reverse order.
    However, there is no static enforcement of this requirement.
    
    This patch checks that the guards are dropped in reverse order and
    panics otherwise. A future PR will deprecate `Handle::enter()` in favor
    of a method that takes a closure, ensuring the guard is dropped
    appropriately.
    carllerche committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    fcd11aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a07e1bb View commit details
    Browse the repository at this point in the history
  3. usize instead of u16

    carllerche committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    d6b4ed4 View commit details
    Browse the repository at this point in the history
  4. try to fix ci

    carllerche committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    52fd4f5 View commit details
    Browse the repository at this point in the history
  5. fix clippy... maybe

    carllerche committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    c7f6482 View commit details
    Browse the repository at this point in the history