fix: Windows stack overflow in ctx binary + broken CI test matrix#10
Merged
Conversation
main() and rayon's global pool now run with an explicit 16 MiB stack instead of the OS default (~1 MiB on Windows), which was insufficient for this program's normal parsing/graph-walking call depth and caused ctx index to crash with a stack overflow on Windows. Also fixes the CI test job's matrix: the unused `rust: [stable]` axis caused each `include` entry to overwrite the last (same os/features keys, no other axis to key off of), so only windows-latest --no-default-features ever actually ran; ubuntu-latest --all-features and macos-latest had never been exercised in this project's CI history.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaced while merging the Quality Intelligence Suite PR stack: PR #4 (hotspots)'s CI failed on the
test (stable)job with a stack overflow inside the compiledctxbinary (ctx indexcrashing all 5hotspots_cli.rsintegration tests). Investigation turned up two separate, pre-existing bugs, both fixed here rather than inside a feature PR:main()now spawns its real work on a thread with an explicit 16 MiB stack; rayon's global pool (used byctx index --parallel) gets the same treatment. Not reproducible locally on macOS (8 MiB default stack absorbs it), so this fixes the documented mechanism — final confirmation is the Windows CI leg on this PR.testjob's matrix had an unusedrust: [stable]axis alongsideincludeentries that all share the same keys (os,features). Per GitHub's matrix-merge rules, eachincludeentry overwrote the previous one instead of creating a separate job, so onlywindows-latest --no-default-featureshas ever actually run —ubuntu-latest --all-features(which the workflow comment says exists specifically to cover themcp/DuckDB feature) andmacos-latesthave never been exercised in this project's CI history. Removed the deadrustaxis and addedfail-fast: falseso a failure on one OS doesn't hide results on the others.Test plan
cargo build --all-features,cargo test --all-features,cargo fmt --check,cargo clippy --all-features -- -D warningsall clean locally.ubuntu-latest --all-featuresandmacos-latestwill actually execute — watching for any latent failures those legs surface for the first time.