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

[6.1] Treat swift_willThrow(Typed) as not locking or performing allocation #77811

Open
wants to merge 3 commits into
base: release/6.1
Choose a base branch
from

Commits on Nov 22, 2024

  1. Treat swift_willThrow(Typed) as not locking or performing allocation

    Prior to throwing, Swift emits a call to `swift_willThrow(Typed)`,
    which allows various diagnostic tools (such as debuggers and testing
    libraries) to intercept errors at the point where they are initially
    thrown.
    
    Since `swift_willThrow(Typed)` can be hooked by arbitrary code at
    runtime, there is no way for it to meet performance constraints like
    @_noLocks or @_noAllocation. Therefore, in a function that has those
    performance constraints specified, disable emission of the call to
    `swift_willThrow(Typed)`.
    
    Fixes rdar://140230684.
    
    (cherry picked from commit eff9bac)
    DougGregor committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    9cf789f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    844f611 View commit details
    Browse the repository at this point in the history
  3. Fix test for _stdlib_isOSVersionAtLeast being @_noLocks

    (cherry picked from commit 13f6169)
    DougGregor committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    4d7d7b2 View commit details
    Browse the repository at this point in the history