Skip to content

gh-148775: Bump c-analyzer MAX_SIZES for Modules/clinic/_testclinic.c.h#148776

Open
ashm-dev wants to merge 2 commits into
python:mainfrom
ashm-dev:fix-c-analyzer-testclinic-maxsize
Open

gh-148775: Bump c-analyzer MAX_SIZES for Modules/clinic/_testclinic.c.h#148776
ashm-dev wants to merge 2 commits into
python:mainfrom
ashm-dev:fix-c-analyzer-testclinic-maxsize

Conversation

@ashm-dev
Copy link
Copy Markdown
Contributor

@ashm-dev ashm-dev commented Apr 19, 2026

make check-c-globals fails on main because Modules/clinic/_testclinic.c.h (auto-generated by Argument Clinic) has grown past the MAX_SIZES limit set in Tools/c-analyzer/cpython/_parser.py. Bump 120_000200_000.

No Misc/NEWS.d entry — tooling-only change to the c-analyzer parser limits. Please apply the skip news label.

Fixes #148775.

@ashm-dev
Copy link
Copy Markdown
Contributor Author

@ericsnowcurrently could you please review this PR?

@ashm-dev ashm-dev force-pushed the fix-c-analyzer-testclinic-maxsize branch from f0366cc to 0094b25 Compare May 19, 2026 11:25
@ashm-dev
Copy link
Copy Markdown
Contributor Author

Friendly ping — rebased onto current main (the previous 125_000 bump turned out to be insufficient: Modules/clinic/_testclinic.c.h is now ~137k bytes, so 200_000 leaves real headroom). One-line diff, no conflicts. @ericsnowcurrently @vstinner could one of you take a quick look?

@ashm-dev
Copy link
Copy Markdown
Contributor Author

The Ubuntu (free-threading) / build and test failure is unrelated — the runner received a shutdown signal mid-run (exit code 143, "runner has received a shutdown signal"). All tests passed up to that point. A rerun should be green.

@vstinner
Copy link
Copy Markdown
Member

I fail to reproduce the issue: #148775 (comment).

@ashm-dev
Copy link
Copy Markdown
Contributor Author

Thanks for checking, @vstinner — confirmed, make check-c-globals is green on current main. The trigger was transient: _testclinic.c.h is re-generated by Argument Clinic, so the measured section size drifts up and down as test converters / defaults are added or removed.

That said, I'd argue for merging this preventively rather than closing:

  • The previous bump (120_000125_000) was folded into 99e2c5eccd2 (Argument Clinic: the Py_buffer converter only accepts None as the default value #144545, 2026-03-17) — not a standalone change, just a side-effect of a larger AC refactor.
  • Roughly one month later (this issue, 2026-04-19) the section hit 120_058 bytes — i.e. the 5 KB headroom granted by that bump was consumed almost immediately. The current pass is just luck of the current AC output.
  • One-character diff, no Misc/NEWS.d entry, no behavioural change. Bumping to 200_000 leaves ~70 KB headroom — enough to absorb several release cycles of AC churn without re-opening a near-identical issue.

If you'd prefer a different shape, I'm equally happy to:
(a) raise the limit by a smaller amount (e.g. 150_000), or
(b) drop Modules/clinic/_testclinic.c.h from the size check altogether — it's a test fixture, not production code, so the "too much text" guard arguably doesn't buy much there.

Let me know which you'd rather see.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

c-analyzer: bump MAX_SIZES for Modules/clinic/_testclinic.c.h

3 participants