Skip to content

Commit f867e1e

Browse files
authored
Run jest with --no-sparkplug to avoid V8 GC segfaults on macOS arm64 (#39081)
Run jest with --no-sparkplug to avoid V8 GC segfaults Sparkplug is V8's baseline JIT. It leaves a stale near-null pointer in an InternalFrame slot; a later GC conservative stack scan dereferences it and segfaults. Disabling the tier removes the write, so no crash. This kills jest workers with SIGSEGV on macOS arm64 CI before any test body runs, which auto-files an issue against whichever suite happened to be loading. Eight unrelated suites have been hit since April. nodejs/node#62393 — fixed in V8 as shipped in Node 25, not backported to the 24 LTS line our mac agents pin. Remove this once agents move off Node 24. --no-sparkplug can't go in NODE_OPTIONS and .bin/jest is a shell shim that can't take node flags, hence the explicit bin/jest.js path. Workers inherit it because jest-worker forks with execArgv.
1 parent 7d2a06b commit f867e1e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"eslint": "eslint --quiet .",
3838
"build-storybook": "node ./build/commands/scripts/storybook.ts --command=build",
3939
"storybook": "node ./build/commands/scripts/storybook.ts --command=dev",
40-
"test-unit": "jest",
41-
"test-unit:wallet": "jest --coverage=false components/brave_wallet_ui",
40+
"test-unit": "node --no-sparkplug node_modules/jest/bin/jest.js",
41+
"test-unit:wallet": "node --no-sparkplug node_modules/jest/bin/jest.js --coverage=false components/brave_wallet_ui",
4242
"update_symlink": "node ./build/commands/scripts/commands.js update_symlink",
4343
"build_fuzzer": "node ./build/commands/scripts/commands.js build_fuzzer",
4444
"fuzzer": "node ./build/commands/scripts/commands.js run_fuzzer",

0 commit comments

Comments
 (0)