Skip to content

(terminal): evaluate node-pty with upstream #922 (exit-thread race in conpty.cc) #409

Description

@devsuitup

Switchboard ships node-pty 1.1.0 with useConptyDll. Upstream microsoft/node-pty #922 (merged 2026-05-13, released in 1.2.0-beta.13 and later) fixes a native race in src/win/conpty.cc: the exit thread erases an entry of the handle table while the main thread is still inside PtyKill / PtyResize. 1.1.0 has no mutex there. It is a second way the bundled ConPTY can corrupt the heap, separate from the double close fixed in #408 (#405), which upstream main still does not guard either.

Scope: evaluate moving to node-pty ≥ 1.2.0-beta.15 (or the first stable that carries #922) — prebuilds for win32-x64/arm64, darwin, linux; the afterPack hook that copies prebuilds/win32-<arch>/conpty/ (v0.0.46); CI builds; the useConptyDll kill switch SWITCHBOARD_NO_CONPTY_DLL. A beta in production needs a decision.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions