Skip to content

Commit

Permalink
gh-90110: Get the C Analyzer Tool Working Again (gh-96057)
Browse files Browse the repository at this point in the history
We broke it with a recent `_PyArg_Parser` change.

Also:
* moved the `_PyArg_Parser` whitelist entries over to ignored.tsv now that they are thread-safe
* added some known globals from a currently-excluded file
* dropped some outdated globals from the whitelist
  • Loading branch information
ericsnowcurrently authored Aug 17, 2022
1 parent d8c07f8 commit 5aac851
Show file tree
Hide file tree
Showing 3 changed files with 383 additions and 579 deletions.
5 changes: 5 additions & 0 deletions Tools/c-analyzer/cpython/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def clean_lines(text):
Objects/**/*.c Py_BUILD_CORE 1
Modules/_asynciomodule.c Py_BUILD_CORE 1
Modules/_codecsmodule.c Py_BUILD_CORE 1
Modules/_collectionsmodule.c Py_BUILD_CORE 1
Modules/_ctypes/_ctypes.c Py_BUILD_CORE 1
Modules/_ctypes/cfield.c Py_BUILD_CORE 1
Expand Down Expand Up @@ -293,6 +294,10 @@ def clean_lines(text):
]

MAX_SIZES = {
# GLOB: (MAXTEXT, MAXLINES),
# First match wins.
_abs('Include/internal/pycore_global_strings.h'): (5_000, 1000),
_abs('Include/internal/pycore_runtime_init_generated.h'): (5_000, 1000),
_abs('Include/**/*.h'): (5_000, 500),
_abs('Modules/_ctypes/ctypes.h'): (5_000, 500),
_abs('Modules/_datetimemodule.c'): (20_000, 300),
Expand Down
Loading

0 comments on commit 5aac851

Please sign in to comment.