summaryrefslogtreecommitdiffstats
path: root/Tools/c-analyzer/cpython/_parser.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431) (#115469)Miss Islington (bot)2024-02-141-0/+1
| | | | | | gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431) (cherry picked from commit 4b2d1786ccf913bc80ff571c32b196be1543ca54) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-101524: Only Use Public C-API in the _xxsubinterpreters Module ↵Miss Islington (bot)2023-07-271-0/+1
| | | | | | | | (gh-105258) (gh-107303) The _xxsubinterpreters module was meant to only use public API. Some internal C-API usage snuck in over the last few years (e.g. gh-28969). This fixes that. (cherry picked from commit e6373c0d8b59512aa7f0dea7f3fb162b6ed10fa4) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) ↵Miss Islington (bot)2023-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | (#105199) gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) 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, and adds a new _ssl_data_31.h file from 3.1.1 along with the ssl.c code to use it. 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). backports of this prior to 3.12 will not include the openssl 3.1 header. (cherry picked from commit ede89af605b1c0442353435ad22195c16274f65d) Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* gh-99108: Replace SHA3 implementation HACL* version (#103597)Jonathan Protzenko2023-05-081-7/+1
| | | | | | | | | | | Replaces our built-in SHA3 implementation with a verified one from the HACL* project. This implementation is used when OpenSSL does not provide SHA3 or is not present. 3.11 shiped with a very slow tiny sha3 implementation to get off of the <=3.10 reference implementation that wound up having serious bugs. This brings us back to a reasonably performing built-in implementation consistent with what we've just replaced our other guaranteed available standard hash algorithms with: code from the HACL* project. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-103326: Remove `Python/importlib.h` (GH-103331)Nikita Sobolev2023-04-121-1/+0
| | | | Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-103334: Ignore `Tools/c-analyzer/cpython/_parser.py` from `patchcheck` ↵Nikita Sobolev2023-04-101-0/+1
| | | | | | | (GH-103335) I've also added a small comment to `Tools/c-analyzer/cpython/_parser.py` to trigger the `patchcheck` CI. It must pass now. Automerge-Triggered-By: GH:ericsnowcurrently
* gh-102737: Un-ignore ceval.c in the CI globals check (gh-102745)Eric Snow2023-03-161-4/+0
| | | | | The tool now allows user-added #LINE preprocessor directives. https://github.com/python/cpython/issues/102737
* Exclude `ceval.c` from the C-analyzer tool (#102735)Alex Waygood2023-03-151-0/+5
| | | | | | | | | | The "check if generated files are up to date" CI check appears to be currently failing on all PRs (but not on pushes to main) See, for example: - https://github.com/python/cpython/pull/94468 - https://github.com/python/cpython/pull/94468 - https://github.com/python/cpython/pull/102731 This appears to be because the C-analyzer tool doesn't like the `#line` directives introduced in https://github.com/python/cpython/commit/70185de1abfe428049a5c43d58fcb656b46db96c. I'm advised by the message printed to the terminal in https://github.com/python/cpython/actions/runs/4428706945/jobs/7768216988#step:14:84 that this is the appropriate short-term fix!
* gh-81057: Add a CI Check for New Unsupported C Global Variables (gh-102506)Eric Snow2023-03-141-2/+7
| | | | | | | | | | | This will keep us from adding new unsupported (i.e. non-const) C global variables, which would break interpreter isolation. FYI, historically it is very uncommon for new global variables to get added. Furthermore, it is rare for new code to break the c-analyzer. So the check should almost always pass unnoticed. Note that I've removed test_check_c_globals. A test wasn't a great fit conceptually and was super slow on debug builds. A CI check is a better fit. This also resolves gh-100237. https://github.com/python/cpython/issues/81057
* gh-90110: Fix the c-analyzer Tool (#102483)Eric Snow2023-03-071-1/+8
| | | | | | | Some incompatible changes had gone in, and the "ignore" lists weren't properly undated. This change fixes that. It's necessary prior to enabling test_check_c_globals, which I hope to do soon. Note that this does include moving last_resort_memory_error to PyInterpreterState. https://github.com/python/cpython/issues/90110
* gh-100540: Remove obsolete Modules/_ctypes/darwin/ dlfcn shim (GH-100541)Zachary Ware2022-12-291-1/+0
| | | As far as I can tell, this hasn't been actually used since Mac OS X 10.2.
* gh-100540: Remove unused Modules/_ctypes/libffi_osx/ (GH-100543)Zachary Ware2022-12-281-1/+0
| | | | It was an ancient, modified copy of libffi that has not been in use since GH-22855.
* gh-90110: Update the C-analyzer Tool (gh-99307)Eric Snow2022-11-101-0/+6
|
* gh-90110: Fix the c-analyzer Tool (gh-96731)Eric Snow2022-09-121-76/+98
| | | | | | | This includes: * update the whitelists * fixes so we can stop ignoring some of the files * ensure Include/cpython/*.h get analyzed
* 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-171-4/+4
|
* gh-90110: Get the C Analyzer Tool Working Again (gh-96057)Eric Snow2022-08-171-0/+5
| | | | | | | | 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-90110: Get the C Analyzer Tool Working Again (gh-95545)Eric Snow2022-08-011-0/+3
|
* gh-81057: Get the c-analyzer tool working again. (gh-92246)Eric Snow2022-05-031-2/+5
|
* bpo-47152: Move sources of the _sre module into a subdirectory (GH-32290)Serhiy Storchaka2022-04-041-3/+3
|
* bpo-36876: Make sure the c-analyzer is checking all the source files.' ↵Eric Snow2022-02-101-1/+7
| | | | | (gh-31264) https://bugs.python.org/issue36876
* 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-011-26/+55
| | | | | 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.
* bpo-36876: [c-analyzer tool] Add a "capi" subcommand to the c-analyzer tool. ↵Eric Snow2020-12-241-35/+1
| | | | | | | (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-201-0/+6
| | | 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-301-1/+43
| | | 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-36876: Fix the C analyzer tool. (GH-22841)Eric Snow2020-10-231-0/+308
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