summaryrefslogtreecommitdiffstats
path: root/Tools/c-analyzer
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-116265: Remove obsolete sentence. (GH-116284) (#116332)Miss Islington (bot)2024-03-041-4/+2
| | | | | | | Remove sentence in Tools/c-analyzer/README referring to deleted ignore-globals.txt. (cherry picked from commit 88b5c665ee1624af1bc5097d3eb2af090b9cabed) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.11] Upgrade bundled libexpat to 2.6.0 (GH-115399) (GH-115468)Seth Michael Larson2024-02-141-0/+1
| | | Manual backport due to code differences.
* [3.11] gh-114563: C decimal falls back to pydecimal for unsupported format ↵John Belmonte2024-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | strings (GH-114879) (GH-115384) Immediate merits: * eliminate complex workarounds for 'z' format support (NOTE: mpdecimal recently added 'z' support, so this becomes efficient in the long term.) * fix 'z' format memory leak * fix 'z' format applied to 'F' * fix missing 'GH-' format support Suggested and prototyped by Stefan Krah. Fixes gh-114563, gh-91060 (cherry picked from commit 72340d15cdfdfa4796fdd7c702094c852c2b32d2) (cherry picked from commit 09c98e4633848ce05df8621f41eb09954b55217a) Co-authored-by: Stefan Krah <skrah@bytereef.org>
* [3.11] gh-115015: Argument Clinic: fix generated code for METH_METHOD ↵Erlend E. Aasland2024-02-061-0/+2
| | | | | methods without params (#115016) (#115069) (cherry picked from commit 09096a1647913526a3d4fa69a9d2056ec82a8f37)
* [3.11] gh-109098: Fuzz re module instead of internal sre (GH-109911) (GH-109933)Miss Islington (bot)2023-09-271-3/+3
| | | | | | | * Fix c-analyzer globals test failure * Put globals exception in ignored.tsv (cherry picked from commit a829356f86d597e4dfe92e236a6d711c8a464f16) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* [3.11] gh-106263: Fix segfault in `signaldict_repr` in `_decimal` module ↵Charlie Zhao2023-07-311-0/+1
| | | | | | | (#… (#107490) Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com> (cherry picked from commit 3979150a0d406707f6d253d7c15fb32c1e005a77)
* [3.11] Fix c-analyzer for GCC: ignore LANG env var (GH-106173) (#106177)Miss Islington (bot)2023-06-281-1/+7
| | | | | | | | | Fix c-analyzer for GCC: ignore LANG env var (GH-106173) The c-analyzer doesn't support GCC localized messages, so just unset the LANG environment variable. (cherry picked from commit 1f74b9e933d546a015e8497e3b8728357196acc8) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) ↵Gregory P. Smith2023-06-011-0/+1
| | | | | | | | | | | | | | | (#105200) Upgrade builds to OpenSSL 1.1.1u. This OpenSSL version addresses a pile if less-urgent CVEs since 1.1.1t. The Mac/BuildScript/build-installer.py was already updated. Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9. Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting). (cherry picked from commit ede89af)
* gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650) (GH-95780)Miss Islington (bot)2022-08-101-1/+1
| | | | | (cherry picked from commit cc9160a29bc3356ced92348bcd8e6668c67167c9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* 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
|
* bpo-40939: Remove even more references to the old parser (GH-21642)Lysandros Nikolaou2020-07-273-7/+0
| | | Automerge-Triggered-By: @lysnikolaou
* bpo-41043: Escape literal part of the path for glob(). (GH-20994)Serhiy Storchaka2020-06-202-3/+7
|
* bpo-38419: fix "check-c-globals" path (GH-16680)AMIR2019-10-231-1/+1
|
* bpo-36876: Re-organize the c-analyzer tool code. (gh-16841)Eric Snow2019-10-1936-706/+1030
| | | | | This is partly a cleanup of the code. It also is preparation for getting the variables from the source (cross-platform) rather than from the symbols. The change only touches the tool (and its tests).
* bpo-38187: Fix a refleak in Tools/c-analyzer. (gh-16304)Eric Snow2019-09-276-49/+108
| | | | | The "Slot" helper (descriptor) is leaking references due to its caching mechanism. The change includes a partial fix to Slot, but also adds Variable.storage to replace the problematic use of Slot. https://bugs.python.org/issue38187
* bpo-38187: Fix reference leak in test_tools (GH-16233)Pablo Galindo2019-09-171-0/+3
|
* Move Eric's TODO file into his directory. (GH-16072)Benjamin Peterson2019-09-121-0/+1072
|
* bpo-36876: Fix the globals checker tool. (gh-16058)Eric Snow2019-09-122-18/+51
|
* bpo-36876: Add a tool that identifies unsupported global C variables. (#15877)Eric Snow2019-09-1129-0/+6020