-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Labels
crashAn issue that could cause a crashAn issue that could cause a crashshellSomething to do with Bun as a shellSomething to do with Bun as a shellwindowsAn issue that is known to occur on WindowsAn issue that is known to occur on Windows
Description
How can we reproduce the crash?
Clear cached resolve/reject JSValues before destroying the interpreter
to prevent GC from accessing freed memory during heap sweep.
The finalizer was not clearing the WriteBarrier fields (m_resolve and
m_reject) before destroying the object, causing JavaScriptCore's garbage
collector to access invalid memory during sweepPreciseAllocations.
will attach a PR to this issue
Relevant log output
Stack Trace (bun.report)
Bun v1.2.21 (7c45ed9) on windows x86_64_baseline [AutoCommand]
Segmentation fault at address 0x22F7E6E0120
- 1 unknown/js code
ZigGeneratedClasses.zig:18000:ShellInterpreterClass__finalizeWeak.h:90:JSC::Weak<WebCore::JSShellInterpreter>::implPreciseAllocation.h:155:JSC::PreciseAllocation::isLowerTierPreciseMarkedSpace.cpp:256:JSC::MarkedSpace::sweepPreciseAllocationsmemory:3461:std::unique_ptr<JSC::IsoSubspace,std::default_delete<JSC::IsoSubspace> >::operator boolHeap.cpp:2203:JSC::Heap::handleNeedFinalizeHeap.cpp:2211:JSC::Heap::handleNeedFinalizeHeap.cpp:1787:JSC::Heap::changePhaseHeap.cpp:1411:JSC::Heap::runCurrentPhase
Features: transpiler_cache, tsconfig, tsconfig_paths, Bun.stderr, Bun.stdin, Bun.stdout, dotenv, fetch, http_server, jsc, shell, spawn, standalone_executable, standalone_executable
Sentry Issue: BUN-SPG
Metadata
Metadata
Assignees
Labels
crashAn issue that could cause a crashAn issue that could cause a crashshellSomething to do with Bun as a shellSomething to do with Bun as a shellwindowsAn issue that is known to occur on WindowsAn issue that is known to occur on Windows