Skip to content

Miscompile on Windows when using Set.filter in an async function #92465

Description

@eeckstein

Description

With the change in NativeSet.filter in #92337 sourckit-lsp mis-compiles the uris.filter statement in SwiftLanguageServices.documentDependenciesUpdated, but only on Windows.

Claude suggests that it's most likely a problem of inlining _UnsafeBitset._withTemporaryUninitializedBitset into an async function, because withUnsafeTemporaryAllocation allocs a dynamically sized area on the stack, which works differently on Windows.

Reproduction

Run Windows CI with the changes of #92337 (but excluding the workaround)

Expected behavior

sourcekit-lsp tests should pass and not crash

Environment

top-of-main swift compiler on Windows

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SILOptimizerArea → compiler: SIL optimization passesWindowsPlatform: WindowsmiscompileBug: Compiler produces incorrect codegentriage neededThis issue needs more specific labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions