summaryrefslogtreecommitdiffstats
path: root/Tools/c-analyzer
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-81057: Move the Extension Modules Cache to _PyRuntimeState (gh-99355)Eric Snow2022-11-111-2/+0
| | | | | We also move the closely related max_module_number and add comments documenting the group of struct members. https://github.com/python/cpython/issues/81057
* gh-90110: Update the C-analyzer Tool (gh-99307)Eric Snow2022-11-103-89/+13
|
* GH-98686: Get rid of "adaptive" and "quick" instructions (GH-99182)Brandt Bucher2022-11-091-1/+0
|
* gh-98401: Invalid escape sequences emits SyntaxWarning (#99011)Victor Stinner2022-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence), use raw strings for regular expression: re.compile(r"\d+\.\d+"). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. Octal escapes with value larger than 0o377 (ex: "\477"), deprecated in Python 3.11, now produce a SyntaxWarning, instead of DeprecationWarning. In a future Python version they will be eventually a SyntaxError. codecs.escape_decode() and codecs.unicode_escape_decode() are left unchanged: they still emit DeprecationWarning. * The parser only emits SyntaxWarning for Python 3.12 (feature version), and still emits DeprecationWarning on older Python versions. * Fix SyntaxWarning by using raw strings in Tools/c-analyzer/ and wasm_build.py.
* GH-98686: Quicken everything (GH-98687)Brandt Bucher2022-11-021-1/+0
|
* gh-96143: Move the perf trampoline files to the Python directory (#98675)Pablo Galindo Salgado2022-10-252-8/+8
|
* gh-90110: Update the c-analyzer Tool (gh-97695)Eric Snow2022-10-012-68/+7
| | | https://github.com/python/cpython/issues/90110
* gh-90110: Fix the c-analyzer Tool (gh-96731)Eric Snow2022-09-129-115/+497
| | | | | | | This includes: * update the whitelists * fixes so we can stop ignoring some of the files * ensure Include/cpython/*.h get analyzed
* gh-90110: Update the c-analyzer Tool (gh-96255)Eric Snow2022-08-254-1534/+84
| | | Here we automatically ignore uses of _PyArg_Parser, "kwlist" arrays, and module/type defs. That way new uses don't trigger false positives in the c-analyzer check script.
* GH-96177: Move GIL and eval breaker code out of ceval.c into ceval_gil.c. ↵Mark Shannon2022-08-241-1/+0
| | | | (GH-96204)
* gh-90110: Update the c-analyzer Tool (gh-96058)Eric Snow2022-08-174-8/+87
|
* gh-90110: Get the C Analyzer Tool Working Again (gh-96057)Eric Snow2022-08-173-579/+383
| | | | | | | | 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
* gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650)Serhiy Storchaka2022-08-081-1/+1
|
* gh-90110: Update the C Analyzer Tool Whitelists (gh-95628)Eric Snow2022-08-042-28/+24
|
* gh-90110: Get the C Analyzer Tool Working Again (gh-95545)Eric Snow2022-08-014-5/+118
|
* gh-85454: Remove distutils.ccompiler from Tools/c-analyzer (GH-95171)Dong-hee Na2022-07-251-2/+12
|
* gh-94673: [c-analyzer] Add a Script to Identify Static Types (#94989)Eric Snow2022-07-194-141/+611
| | | issue: https://github.com/python/cpython/issues/94673
* Fix typos in comments (#94305)yutotnh2022-06-281-2/+2
|
* Update globals-to-fix.tsv to follow recent changes (gh-92959)Dong-hee Na2022-05-201-3/+4
|
* gh-81057: Fix indent. (gh-92267)Eric Snow2022-05-031-1/+1
|
* gh-81057: Get the c-analyzer tool working again. (gh-92246)Eric Snow2022-05-034-4/+16
|
* gh-78607: Replace __ltrace__ with __lltrace__ (GH-91619)Dennis Sweeney2022-04-161-1/+0
|
* gh-91156: Fix `encoding="locale"` in UTF-8 mode (GH-70056)Inada Naoki2022-04-141-1/+0
|
* bpo-47152: Move sources of the _sre module into a subdirectory (GH-32290)Serhiy Storchaka2022-04-041-3/+3
|
* bpo-46765: Replace Locally Cached Strings with Statically Initialized ↵Eric Snow2022-02-232-89/+2
| | | | | Objects (gh-31366) https://bugs.python.org/issue46765
* bpo-36876: Make sure the c-analyzer is checking all the source files.' ↵Eric Snow2022-02-105-22/+159
| | | | | (gh-31264) https://bugs.python.org/issue36876
* bpo-36876: Minor cleanup to c-analyzer "ignored" data.' (gh-31239)Eric Snow2022-02-103-512/+260
| | | https://bugs.python.org/issue36876
* bpo-36876: Update the c-analyzer whitelist. (gh-31225)Eric Snow2022-02-094-2010/+2364
| | | | | This change adds variables that had been added since the last time the whitelist was updated. It also cleans up the list a little. https://bugs.python.org/issue36876
* bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized ↵Eric Snow2022-02-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | global objects. (gh-30928) We're no longer using _Py_IDENTIFIER() (or _Py_static_string()) in any core CPython code. It is still used in a number of non-builtin stdlib modules. The replacement is: PyUnicodeObject (not pointer) fields under _PyRuntimeState, statically initialized as part of _PyRuntime. A new _Py_GET_GLOBAL_IDENTIFIER() macro facilitates lookup of the fields (along with _Py_GET_GLOBAL_STRING() for non-identifier strings). https://bugs.python.org/issue46541#msg411799 explains the rationale for this change. The core of the change is in: * (new) Include/internal/pycore_global_strings.h - the declarations for the global strings, along with the macros * Include/internal/pycore_runtime_init.h - added the static initializers for the global strings * Include/internal/pycore_global_objects.h - where the struct in pycore_global_strings.h is hooked into _PyRuntimeState * Tools/scripts/generate_global_objects.py - added generation of the global string declarations and static initializers I've also added a --check flag to generate_global_objects.py (along with make check-global-objects) to check for unused global strings. That check is added to the PR CI config. The remainder of this change updates the core code to use _Py_GET_GLOBAL_IDENTIFIER() instead of _Py_IDENTIFIER() and the related _Py*Id functions (likewise for _Py_GET_GLOBAL_STRING() instead of _Py_static_string()). This includes adding a few functions where there wasn't already an alternative to _Py*Id(), replacing the _Py_Identifier * parameter with PyObject *. The following are not changed (yet): * stop using _Py_IDENTIFIER() in the stdlib modules * (maybe) get rid of _Py_IDENTIFIER(), etc. entirely -- this may not be doable as at least one package on PyPI using this (private) API * (maybe) intern the strings during runtime init https://bugs.python.org/issue46541
* bpo-45952: Get the C analyzer tool working again. (gh-31220)Eric Snow2022-02-081-0/+1
| | | https://bugs.python.org/issue45952
* bpo-45952: Get the C analyzer tool working again. (gh-31219)Eric Snow2022-02-081-0/+3
| | | https://bugs.python.org/issue45952
* bpo-45952: Get the C analyzer tool working again. (gh-29882)Eric Snow2021-12-016-99/+111
| | | | | There wasn't much that needed to be done. Mostly it was just a few new files that got added. https://bugs.python.org/issue45952
* bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)Victor Stinner2021-10-151-1/+0
| | | | Move the interpreteridobject.h header file from Include/ to Include/internal/. It only provides private functions.
* Fix typos in the Tools directory (GH-28769)Christian Clauss2021-10-069-15/+15
| | | | | | | Like #28744 but for the Tools directory. [skip issue] Opening a related issue is pending python/psf-infra-meta#130 Automerge-Triggered-By: GH:pablogsal
* bpo-44786: Fix a warning in RE in c-analyzer (GH-28351)Serhiy Storchaka2021-09-151-2/+2
|
* bpo-44854: Remove trailing whitespaces (GH-27689)Serhiy Storchaka2021-08-092-2/+2
|
* bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)Erlend Egeberg Aasland2021-07-141-10/+0
| | | Automerge-Triggered-By: GH:encukou
* bpo-42862: Strip stale sqlite3 cache ignores from c-analyzer (GH-26876)Erlend Egeberg Aasland2021-06-231-5/+0
|
* bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)Erlend Egeberg Aasland2021-06-231-10/+0
| | | Also adds a test to verify the (borrowed) exceptions in `sqlite3.Connection`.
* bpo-42064: Remove stale extern declarations in `sqlite3` headers (GH-26840)Erlend Egeberg Aasland2021-06-231-14/+0
|
* Fix a typo in c-analyzer (GH-24468)Ikko Ashimine2021-03-191-1/+1
|
* bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. ↵Eric Snow2020-12-253-93/+380
| | | | | (gh-23929) https://bugs.python.org/issue36876
* bpo-36876: [c-analyzer tool] Add a "capi" subcommand to the c-analyzer tool. ↵Eric Snow2020-12-2410-57/+849
| | | | | | | (gh-23918) This will help identify which C-API items will need to be updated for subinterpreter support. https://bugs.python.org/issue36876
* bpo-36876: [c-analyzer tool] Tighten up the results and output. (GH-23431)Eric Snow2020-11-2013-109/+3202
| | | We also update the "ignored" file with a temporary list of all known globals.
* bpo-36876: Small adjustments to the C-analyzer tool. (GH-23045)Eric Snow2020-10-3016-218/+633
| | | This is a little bit of clean-up, small fixes, and additional helpers prior to building an updated & accurate list of globals to eliminate.
* bpo-42161: Remove private _PyLong_Zero and _PyLong_One (GH-23003)Victor Stinner2020-10-271-2/+0
| | | | | Use PyLong_FromLong(0) and PyLong_FromLong(1) of the public C API instead. For Python internals, _PyLong_GetZero() and _PyLong_GetOne() of pycore_long.h can be used.
* bpo-36876: Fix the C analyzer tool. (GH-22841)Eric Snow2020-10-2372-6239/+8882
| | | | | | | 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
* bpo-41971: Fix test failure in test.test_tools.test_c_analyzer when mutating ↵Pablo Galindo2020-10-111-1/+3
| | | | global state (GH-22652)
* bpo-41834: Remove _Py_CheckRecursionLimit variable (GH-22359)Victor Stinner2020-09-232-2/+0
| | | | | | | | | | Remove the global _Py_CheckRecursionLimit variable: it has been replaced by ceval.recursion_limit of the PyInterpreterState structure. There is no need to keep the variable for the stable ABI, since Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() were not usable in Python 3.8 and older: these macros accessed PyThreadState members, whereas the PyThreadState structure is opaque in the limited C API.
* bpo-41715: Fix potential catastrofic backtracking in c_analyzer. (GH-22091)Serhiy Storchaka2020-09-171-6/+6
|