fix(windows): increase stack size to resolve runtime overflow#2591
fix(windows): increase stack size to resolve runtime overflow#2591killf wants to merge 1 commit intozeroclaw-labs:mainfrom
Conversation
PR intake checks found warnings (non-blocking)Fast safe checks found advisory issues. CI lint/test/build gates still enforce merge quality.
Action items:
Detected Linear keys: none Run logs: https://github.com/zeroclaw-labs/zeroclaw/actions/runs/22611104404 Detected blocking line issues (sample):
Detected advisory line issues (sample):
|
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Cargo configuration β.cargo/config.toml |
Appended [target.x86_64-pc-windows-msvc] and [target.aarch64-pc-windows-msvc] sections with rustflags = ["-C", "link-args=/STACK:8388608"] to increase Windows MSVC stack size. |
Estimated code review effort
π― 2 (Simple) | β±οΈ ~8 minutes
Suggested labels
bug, risk: medium, config: core, runtime: native
Suggested reviewers
- theonlyhennygod
- chumyin
π₯ Pre-merge checks | β 2 | β 1
β Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | The PR description is significantly incomplete against the required template. It lacks required sections including Label Snapshot, Change Metadata, Linked Issue, Validation Evidence, Security Impact, Privacy/Data Hygiene, Compatibility, i18n Follow-Through, Human Verification, Side Effects, Rollback Plan, and Risks/Mitigations. | Complete the description by filling in all required sections from the template, particularly the mandatory sections: Label Snapshot, Change Metadata, Linked Issue, Validation Evidence, Security Impact, Privacy/Data Hygiene, Compatibility, Human Verification, Side Effects, Rollback Plan, and Risks/Mitigations. |
β Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | β Passed | The title accurately describes the main change: increasing stack size to fix Windows runtime overflow, which directly addresses the core problem solved in this PR. |
| Docstring Coverage | β Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
βοΈ Tip: You can configure your own custom pre-merge checks in the settings.
β¨ Finishing Touches
π§ͺ Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
Comment @coderabbitai help to get the list of available commands and usage tips.
Windows platforms have a default stack size (1-2MB) that is too small for the heavy JsonSchema derives in config/schema.rs (133 derives). This causes "thread 'main' has overflowed its stack" on startup. Changes: - Increase stack size to 8MB for x86_64-pc-windows-msvc - Increase stack size to 8MB for aarch64-pc-windows-msvc - Remove unused ErrorKind import in src/update.rs Fixes: cargo run --bin zeroclaw stack overflow on Windows
fccdfab to
1e4fc3c
Compare
|
Closing as this issue has been resolved by commit c8dbcd0 on the dev branch. |
Problem
Running
cargo run --bin zeroclawon Windows fails with:Root Cause
Windows platforms have a default stack size (1-2MB) that is insufficient for:
JsonSchemaderives insrc/config/schema.rsschemarslibrary at compile timeSolution
Increase stack size to 8MB for Windows targets in
.cargo/config.toml:Changes
ErrorKindimport insrc/update.rsTesting
Fixes: Windows runtime stack overflow on program startup
Summary by CodeRabbit