Repository navigation
cics-crucible: stub mains compile against ggcics.c's own gg_cics struct (macOS red, #6430) - #6431
Merged
Merged
Conversation
… struct (Fixes the macOS red in #6430) The mains in test_cics_runtimes.py declare shorter gg_cics typedefs; GGCLINK's unconditional go_to write (#6400) overran the RETURN IMMEDIATE main's stack struct and crashed on macOS only. _compiled_stub now swaps in the stub's typedef; a guard test pins it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 24, 2026 09:43
squid-protocol
enabled auto-merge (squash)
October 24, 2026 09:48
Owner
Author
|
No description provided. |
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.
What
Full Suite Gate run 40080638138 failed only on macOS (3.11 and 3.12, part 1/2), both on
test_the_stub_return_immediate_is_ibms(run(term,"x","8","link")gave'', not16/2). Deterministic, not an infra flake.Cause: the test's C main declares a shorter
gg_cicsthanggcics.c's. #6400 madeGGCLINKwritec->go_tounconditionally, past the end of the main's stack struct. ASan on Linux confirms a stack-buffer-overflow on the old main (empty stdout) and16/2on the fixed one.Fix (test only):
_compiled_stubreplaces anytypedef struct {...} gg_cics;in a main with the one parsed fromggcics.c, so all 36 mains are covered (class sweep: four lackedgo_to/chanentirely, the rest lacked the tail). New guard testtest_every_stub_main_is_compiled_against_the_stubs_own_gg_cics_struct.Gates
test_cics_runtimes.py 210 passed;
audit_check.pyall clear; time ratchet PASS. No engine change, no golden bless. macOS not runnable locally: needsgh workflow run "Full Suite Gate (All OS x Python)" --ref <branch>after labelling.Closes #6430 once the workflow next succeeds on main.
Lessons for agents
A C main in
test_cics_runtimes.pymust never carry its owngg_cicslayout: a stub function writing a newer field overruns it silently on Linux and crashes on macOS. Check with ASan (cc -fsanitize=address).🤖 Generated with Claude Code