← 返回首页
bpo-36876: Fix the C analyzer tool. by ericsnowcurrently · Pull Request #22841 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-36876: Fix the C analyzer tool.#22841

Merged
ericsnowcurrently merged 4 commits into
python:masterfrom
ericsnowcurrently:globalss-c-analyzer-total-rewrite
Oct 23, 2020
Merged

bpo-36876: Fix the C analyzer tool.#22841
ericsnowcurrently merged 4 commits into
python:masterfrom
ericsnowcurrently:globalss-c-analyzer-total-rewrite

Conversation

ericsnowcurrently commented Oct 21, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

The original tool wasn't working right and it was simpler to create a new one, partially re-using some of the old code. At this point the tool runs properly on the master. (Try: ./python Tools/c-analyzer/c-analyzer.py analyze.) It take ~35 seconds on my machine to analyze the full CPython code base.

Note that we'll need to iron out some OS-specific stuff (e.g. preprocessor). We're okay though since this tool isn't used yet in our workflow. We will also need to verify the analysis results in detail before activating the check in CI, though I'm pretty sure it's close.

https://bugs.python.org/issue36876

Copy link
Copy Markdown
Member

I would recommend checking with the buildbot label before merging as some of the refleaks were reported previously with the old analyzer (although most were false positives).

Copy link
Copy Markdown
Member Author

I would recommend checking with the buildbot label before merging as some of the refleaks were reported previously with the old analyzer (although most were false positives).

FWIW, this PR removes all the tool's tests, except for the one we care about (and that one is currently disabled). So refleaks shouldn't be a problem. 😄

ericsnowcurrently merged commit 345cd37 into python:master Oct 23, 2020
ericsnowcurrently deleted the globalss-c-analyzer-total-rewrite branch October 23, 2020 00:42
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
The original tool wasn't working right and it was simpler to create a new one, partially re-using some of the old code. At this point the tool runs properly on the master. (Try: ./python Tools/c-analyzer/c-analyzer.py analyze.) It take ~40 seconds on my machine to analyze the full CPython code base. Note that we'll need to iron out some OS-specific stuff (e.g. preprocessor). We're okay though since this tool isn't used yet in our workflow. We will also need to verify the analysis results in detail before activating the check in CI, though I'm pretty sure it's close. https://bugs.python.org/issue36876
dhejyuyr added a commit to dhejyuyr/cpython that referenced this pull request Mar 24, 2026
Unused datastr variable looks like a typo. Replace sig with datastr. Fixes: 345cd37 (bpo-36876: Fix the C analyzer tool. (pythonGH-22841)) Signed-off-by: Elizaveta Tereshkina <teryoshkina.ea@gmail.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Footer

© 2026 GitHub, Inc.