| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
Sorry, something went wrong.
Fixes: nodejs/node#43630 PR-URL: nodejs/node#43632 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
On windows the default stack size is still limited to 1MB in older versions of node. See nodejs/node#43632 which made it into v19.0.0. Fixes: emscripten-core#17897
On windows the default stack size is still limited to 1MB in older versions of node. See nodejs/node#43632 which made it into v19.0.0. Fixes: #17897
All supported Node.js release lines have increased the stack size on Windows, so it is no longer necessary to use WebAssembly to access certain algorithms on Windows. Refs: nodejs/node#43632
…all paths Stack-size changes: - NODE_STACK_SIZE_KB unified to 8192 on all platforms (was 900 on Windows) - The 900 value was based on nodejs/node#43630 which described a pre-v18.6 limitation (1 MiB PE StackReserveSize). Node.js PR #43632 (merged July 2022, backported to v18.6.0/v16.17.0) increased Windows StackReserveSize to 8 MiB, making --stack-size=8192 safe. Verified via PE header inspection of node.exe v22.22.1: StackReserve=0x800000 (8 MiB). - shell-utils.ts comment updated to reference nodejs/node#43632. Gateway patch extraction: - patchGatewayCmdStackSize() extracted from main.ts to openclaw-config.ts as a shared utility (accepts homedir parameter instead of using module global). - main.ts now imports and calls the shared function at all 3 existing sites. Doctor gap fix: - checks-infra.ts: patchGatewayCmdStackSize() now called after every 'openclaw gateway install' (2 code paths) to prevent gateway.cmd from losing the --stack-size injection when the service is reinstalled. Gateway restart hardening: - All 'openclaw gateway restart' call sites now call patchGatewayCmdStackSize() on Windows before restarting, ensuring gateway.cmd always has --stack-size=8192 regardless of who regenerated it. - Affected files: register-channel-config-handlers.ts (4 sites), register-channel-setup-handlers.ts (1 site), register-app-runtime-handlers.ts (1 site), checks-channels.ts (1 site). Prior session changes included in this commit: - channel-login-flow.ts: refactored to use runSpawn instead of cmd.exe shell - shell-utils.ts: filesystem fast-path for getOpenClawPackageDirSync() - register-channel-setup-handlers.ts: killStaleChannelLogins await fix - register-runtime-health-handlers.ts, register-setup-handlers.ts: related test mock updates Impact: All gateway start/restart/install paths on Windows now guarantee --stack-size=8192, eliminating the AJV stack overflow (0xC00000FD) that caused WeChat channel crashes. No behavioral change on macOS/Linux. Verification: Electron tsconfig compilation passes. 562/567 tests pass (5 failures are pre-existing in register-agent-handlers.test.ts due to stale mock data, unrelated to this change).
| Back | FazBrowse Home | New Git URL |
Increase the virtual stack space available to each thread from 1 MiB to 8 MiB.
Fixes: #43630