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
fix(sea): patch process.dlopen in worker threads (#297)
Native addons failed to load from SEA worker threads with
ERR_DLOPEN_FAILED on the raw C:\snapshot path.
Each worker thread gets its own `process` object, so the
`shared.patchDlopen()` call in sea-bootstrap-core only covers the main
thread. sea-worker-entry already reapplies `patchIntlSegmenter` for the
same reason but was missing `patchDlopen`, so workers never got the
extract-to-cache step that makes addons loadable. Classic (non-SEA) pkg
is unaffected: bootstrap.js runs in every thread and patches there.
test-90-sea-worker-threads now loads a `.node` from the snapshot inside
the worker and asserts it was extracted to the native cache. The fake
addon is not a real shared library so dlopen throws either way — the
extraction is what distinguishes patched from unpatched.
Closes#293
Claude-Session: https://claude.ai/code/session_01PUj6PfkgQHcCg2bfXucBzk
0 commit comments