I have analyzed the Stack Trace and suspect this is caused by incompatibility between Bun's Garbage Collector and Windows. I have already reported this to the Bun team. However, since this issue occurs within the context of OpenCode, I am creating this issue here as well for thoroughness.
Bun v1.3.5 ([`1e86ceb`](<https://github.com/oven-sh/bun/tree/1e86cebd74a5723e818b5c0555276b646bcf0e4c>)) on windows x86_64_baseline [AutoCommand]
Segmentation fault at address 0x4FEC21E01A0
- *1 unknown/js code*
- [`interpreter.zig:1239`](<https://github.com/oven-sh/bun/blob/1e86cebd74a5723e818b5c0555276b646bcf0e4c/src/shell/interpreter.zig#L1239>): `deinitFromFinalizer`
- [`ZigGeneratedClasses.zig:19925`](<https://github.com/oven-sh/bun/blob/1e86cebd74a5723e818b5c0555276b646bcf0e4c//var/lib/buildkite-agent/build/build/release/codegen/ZigGeneratedClasses.zig#L19925>): `ShellInterpreterClass__finalize`
- [`memory:3426`](<https://github.com/oven-sh/bun/blob/1e86cebd74a5723e818b5c0555276b646bcf0e4c/C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/include/memory#L3426>): `std::unique_ptr<WTF::EmbeddedFixedVector<JSC::WriteBarrier<JSC::Unknown,WTF::RawValueTraits<JSC::Unknown> >,WTF::FastMalloc>,std::default_delete<WTF::EmbeddedFixedVector<JSC::WriteBarrier<JSC::Unknown,WTF::RawValueTraits<JSC::Unknown> >,WTF::FastMalloc> > >::~unique_ptr`
- [`HeapCell.h:59`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/heap/HeapCell.h#L59>): `JSC::HeapCell::zap`
- [`MarkedBlockInlines.h:439`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/heap/MarkedBlockInlines.h#L439>): `JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>::<lambda_1>::operator()`
- [`MarkedBlockInlines.h:471`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/heap/MarkedBlockInlines.h#L471>): `JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>`
- [`JSDestructibleObjectHeapCellType.cpp:56`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/runtime/JSDestructibleObjectHeapCellType.cpp#L56>): `JSC::JSDestructibleObjectHeapCellType::finishSweep`
- [`MarkedBlock.cpp:504`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/heap/MarkedBlock.cpp#L504>): `JSC::MarkedBlock::Handle::sweep`
- [`FreeList.h:90`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/heap/FreeList.h#L90>): `JSC::FreeList::allocationWillFail`
- [`LocalAllocator.cpp:196`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/heap/LocalAllocator.cpp#L196>): `JSC::LocalAllocator::tryAllocateWithoutCollecting`
- [`LocalAllocator.cpp:134`](<https://github.com/oven-sh/WebKit/blob/6d0f3aac0b817cc01a846b3754b21271adedac12/Source/JavaScriptCore/heap/LocalAllocator.cpp#L134>): `JSC::LocalAllocator::allocateSlowCase`
- [`LocalAllocatorInlines.h:47`](<https://github.com/oven-sh/bun/blob/1e86cebd74a5723e818b5c0555276b646bcf0e4c/C:/buildkite-agent/build/build/release/cache/webkit-6d0f3aac0b817cc0/include/JavaScriptCore/LocalAllocatorInlines.h#L47>): `JSC::LocalAllocator::allocate::<lambda_1>::operator()`
- [`ShellBindings.cpp:27`](<https://github.com/oven-sh/bun/blob/1e86cebd74a5723e818b5c0555276b646bcf0e4c/src/bun.js/bindings/ShellBindings.cpp#L27>): `Bun__createShellInterpreter`
- [`interpreter.zig:760`](<https://github.com/oven-sh/bun/blob/1e86cebd74a5723e818b5c0555276b646bcf0e4c/src/shell/interpreter.zig#L760>): `createShellInterpreter`
- *2 unknown/js code*
- `llint_entry`
Features: spawn, standalone\_executable, workers\_spawned, napi\_module\_register, process\_dlopen, Bun.stderr, Bun.stdin, Bun.stdout, abort\_signal, fetch, http\_server, jsc, shell, shell
Description
Environment
Problem Description & Reproduction
Analysis
I have analyzed the Stack Trace and suspect this is caused by incompatibility between Bun's Garbage Collector and Windows. I have already reported this to the Bun team. However, since this issue occurs within the context of OpenCode, I am creating this issue here as well for thoroughness.
Plugins
No
OpenCode version
1.1.36
Steps to reproduce
No response
Screenshot and/or share link
Operating System
Windows 11 Pro 25H2
Terminal
Windows Terminal