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
Reproduces two SIGABRT failure modes on macOS when using mimalloc-safe with the v3 feature in napi addons.
Structure
crates/
addon-a/ — napi addon with mimalloc v3
addon-b/ — another napi addon with mimalloc v3
addon-mode-b/ — single addon with background threads
scripts/
switch-deps.sh — rewrite all Cargo.toml to a specific version
build.sh — cargo build all crates + copy .node files
test.mjs — Mode A test (load two addons in one process)
test-mode-b.mjs — Mode B test (background threads + process exit)
Quick start
# Test with the fix (0.1.62) — should pass both modes
npm run switch:thread-local
# Reproduce Mode A crash (FIXED_SLOT, two addons share TCB[108])
npm run switch:fixed-slot
# Reproduce Mode B crash (DYNAMIC_PTHREADS, key deleted on exit)
npm run switch:dynamic
Commands
Command
What it does
npm run build
Build all three crates, copy .node files
npm test
Run Mode A + Mode B
npm run test:a
Run Mode A only
npm run test:b
Run Mode B only
npm run switch:fixed-slot
Switch to 0.1.58 (FIXED_SLOT) → build → test
npm run switch:dynamic
Switch to 0.1.61 (DYNAMIC_PTHREADS) → build → test