Skip to content

cics-crucible: stub mains compile against ggcics.c's own gg_cics struct (macOS red, #6430) - #6431

Merged
squid-protocol merged 1 commit into
mainfrom
churn/6430-20261024T0935Z
Oct 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/6430-20261024T0935Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

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 '', not 16/2). Deterministic, not an infra flake.

Cause: the test's C main declares a shorter gg_cics than ggcics.c's. #6400 made GGCLINK write c->go_to unconditionally, past the end of the main's stack struct. ASan on Linux confirms a stack-buffer-overflow on the old main (empty stdout) and 16/2 on the fixed one.

Fix (test only): _compiled_stub replaces any typedef struct {...} gg_cics; in a main with the one parsed from ggcics.c, so all 36 mains are covered (class sweep: four lacked go_to/chan entirely, the rest lacked the tail). New guard test test_every_stub_main_is_compiled_against_the_stubs_own_gg_cics_struct.

Gates

test_cics_runtimes.py 210 passed; audit_check.py all clear; time ratchet PASS. No engine change, no golden bless. macOS not runnable locally: needs gh 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.py must never carry its own gg_cics layout: 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

… 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]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 09:43
@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 09:48
@squid-protocol
squid-protocol merged commit 6814150 into main Oct 24, 2026
57 checks passed
@squid-protocol
squid-protocol deleted the churn/6430-20261024T0935Z branch October 24, 2026 10:06
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main is red: Full Suite Gate (All OS x Python)

1 participant