You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Segfault in JSC MicrotaskQueue::drain (generator microtasks) on rapid PTY shrink — macOS aarch64, Bun 1.3.14 standalone #35010
What happened
opencode 1.18.4 (a Bun 1.3.14 standalone executable, NAPI module loaded) segfaults when its
host terminal is rapidly resized down to extreme sizes (~2 cols × 1 row). The crash is inside
the VM's microtask machinery, not application JS — the VM should surface a catchable error
(e.g. RangeError on stack exhaustion) rather than segfault.
Crash reports (two independent hits, same stack family)
Environment
macOS 15 (Darwin 25.4.0), Apple Silicon. The terminal host is xterm.js inside a Tauri app
(PTY via portable-pty); the process group receives SIGWINCH + TIOCSWINSZ per resize step,
~10–120 ms apart, down to 2×1. Process RSS was ~1.0 GB at the time (this instance's normal
baseline in that workspace — not a leak ramp).
Reproduction honesty
Hit twice in the real app (both reports above). We could NOT isolate a standalone repro:
headless PTY harnesses (single jump to 1×1, 1-col staircase drags at 20–100 ms cadence with
bounces, floor jitter, DSR/XTWINOPS query replies, SGR mouse-motion floods with out-of-range
coordinates) all survive. Whatever the missing ingredient is, it's timing/state-dependent in
the real xterm.js byte stream. Happy to run instrumented builds or gather more data.
Downstream mitigation (for anyone else hitting this)
Host-side: never report a grid below 20×5 to the PTY (real terminals have window minimums;
after flooring, the crash class is unreachable). Implemented in our terminal host.
Activity
github-actions commentedon Jul 21, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
github-actions commentedon Jul 25, 2026
Duplicate of #24320.
This issue has been automatically closed as a duplicate.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code