summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-112301: Add argument aliases and tee compiler output for check warnings ↵Nate Ohlson2024-07-301-1/+4
| | | | | (GH-122465) Also remove superfluous shebang from the warning check script
* gh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded build ↵Sam Gross2024-07-301-1/+0
| | | | | | | (#122190) The adaptive counter doesn't do anything currently in the free-threaded build and TSan reports a data race due to concurrent modifications to the counter.
* gh-122044: Don't error during gitignore filtering with no files (#122045)Seth Michael Larson2024-07-271-0/+4
|
* gh-112301: Compiler warning management tooling (#121730)Nate Ohlson2024-07-272-0/+198
| | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-122201: Lock mutex when setting handling_thread to NULL (#122204)Sam Gross2024-07-261-1/+0
| | | | | In the free-threaded build, we need to lock pending->mutex when clearing the handling_thread in order not to race with a concurrent make_pending_calls in the same interpreter.
* GH-121131: Clean up and fix some instrumented instructions. (GH-121132)Mark Shannon2024-07-263-8/+5
| | | | * Add support for 'prev_instr' to code generator and refactor some INSTRUMENTED instructions
* gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271)Serhiy Storchaka2024-07-251-3/+3
|
* GH-122155: Fix cases generator to correctly compute 'peek' offset for error ↵Mark Shannon2024-07-233-6/+17
| | | | handling (GH-122158)
* GH-121970: Rewrite the C-API annotations extension (#121985)Adam Turner2024-07-191-8/+15
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* GH-121784: Generate an error during code gen if a variable is marked ↵Mark Shannon2024-07-185-57/+112
| | | | | | | | | | | | `unused`, but is used and thus cached in a prior uop. (#121788) * Reject uop definitions that declare values as 'unused' that are already cached by prior uops * Track which variables are defined and only load from memory when needed * Support explicit `flush` in macro definitions. * Make sure stack is flushed in where needed.
* Add note about PYTHON_JIT environment variable to JIT README (GH-121635)Savannah Ostrowski2024-07-171-2/+6
|
* GH-120371: Add WASI SDK 22 support (GH-121870)Brett Cannon2024-07-161-0/+8
| | | Required disabling stub functions now provided by wasi-libc.
* gh-117657: Remove TSAN suppressions for _abc.c (#121508)Sam Gross2024-07-101-2/+0
| | | | The functions look thread-safe and I haven't seen any warnings issued when running the tests locally.
* gh-117657: Fix TSan race in _PyDict_CheckConsistency (#121551)Sam Gross2024-07-101-8/+0
| | | | The only remaining race in dictobject.c was in _PyDict_CheckConsistency when the dictionary has shared keys.
* GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` ↵Brett Cannon2024-07-091-6/+18
| | | | (GH-121522)
* gh-117657: Fix TSAN races in setobject.c (#121511)Sam Gross2024-07-091-3/+0
| | | | | The `used` field must be written using atomic stores because `set_len` and iterators may access the field concurrently without holding the per-object lock.
* GH-118926: Better distinguish between pointer and arrays in interpreter ↵Mark Shannon2024-07-096-18/+30
| | | | generator (GH-121496)
* GH-119726: Emit AArch64 trampolines out-of-line (GH-121280)Diego Russo2024-07-031-8/+6
|
* build(deps): bump hypothesis from 6.100.2 to 6.104.2 in /Tools (#121218)dependabot[bot]2024-07-031-1/+1
| | | | | | | | | | | | | | | Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.100.2 to 6.104.2. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.100.2...hypothesis-python-6.104.2) --- updated-dependencies: - dependency-name: hypothesis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-117139: Add _PyTuple_FromStackRefSteal and use it (#121244)Sam Gross2024-07-021-0/+1
| | | Avoids the extra conversion from stack refs to PyObjects.
* GH-119726: Use LDR for AArch64 trampolines (GH-121001)Diego Russo2024-07-011-22/+9
|
* GH-116017: Get rid of _COLD_EXITs (GH-120960)Brandt Bucher2024-07-013-13/+0
|
* gh-117657: Fix data races reported by TSAN in some set methods (#120914)AN Long2024-07-011-1/+0
| | | | | | Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method.
* gh-117657: Use critical section to make _socket.socket.close thread safe ↵AN Long2024-07-011-1/+0
| | | | (GH-120490)
* build(deps-dev): bump types-setuptools from 70.0.0.20240524 to ↵dependabot[bot]2024-07-011-1/+1
| | | | | | 70.1.0.20240627 in /Tools (#121217) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump mypy from 1.10.0 to 1.10.1 in /Tools (#121216)dependabot[bot]2024-07-011-1/+1
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump types-psutil from 5.9.5.20240516 to 6.0.0.20240621 in ↵dependabot[bot]2024-07-011-1/+1
| | | | | | /Tools (#121215) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-61103: Support double complex (_Complex) type in ctypes (#120894)Sergey B Kirpichev2024-07-011-0/+11
| | | | | | | | | | | | | | | | | | Example: ```pycon >>> import ctypes >>> ctypes.__STDC_IEC_559_COMPLEX__ 1 >>> libm = ctypes.CDLL('libm.so.6') >>> libm.clog.argtypes = [ctypes.c_double_complex] >>> libm.clog.restype = ctypes.c_double_complex >>> libm.clog(1+1j) (0.34657359027997264+0.7853981633974483j) ``` Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-117139: Convert the evaluation stack to stack refs (#118450)Ken Jin2024-06-2610-25/+56
| | | | | | | | | | | | | | | | | This PR sets up tagged pointers for CPython. The general idea is to create a separate struct _PyStackRef for everything on the evaluation stack to store the bits. This forces the C compiler to warn us if we try to cast things or pull things out of the struct directly. Only for free threading: We tag the low bit if something is deferred - that means we skip incref and decref operations on it. This behavior may change in the future if Mark's plans to defer all objects in the interpreter loop pans out. This implies a strict stack reference discipline is required. ALL incref and decref operations on stackrefs must use the stackref variants. It is unsafe to untag something then do normal incref/decref ops on it. The new incref and decref variants are called dup and close. They mimic a "handle" API operating on these stackrefs. Please read Include/internal/pycore_stackref.h for more information! --------- Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com>
* GH-120982: Add stack check assertions to generated interpreter code (GH-120992)Mark Shannon2024-06-252-0/+4
|
* gh-120956: Avoid comparison of int to Py_ssize_t in parser (#120959)Lysandros Nikolaou2024-06-241-1/+1
|
* GH-117062: Make _JUMP_TO_TOP a general absolute jump (GH-120854)Brandt Bucher2024-06-242-6/+0
|
* gh-113993: Allow interned strings to be mortal, and fix related issues ↵Petr Viktorin2024-06-212-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-120520) * Add an InternalDocs file describing how interning should work and how to use it. * Add internal functions to *explicitly* request what kind of interning is done: - `_PyUnicode_InternMortal` - `_PyUnicode_InternImmortal` - `_PyUnicode_InternStatic` * Switch uses of `PyUnicode_InternInPlace` to those. * Disallow using `_Py_SetImmortal` on strings directly. You should use `_PyUnicode_InternImmortal` instead: - Strings should be interned before immortalization, otherwise you're possibly interning a immortalizing copy. - `_Py_SetImmortal` doesn't handle the `SSTATE_INTERNED_MORTAL` to `SSTATE_INTERNED_IMMORTAL` update, and those flags can't be changed in backports, as they are now part of public API and version-specific ABI. * Add private `_only_immortal` argument for `sys.getunicodeinternedsize`, used in refleak test machinery. * Make sure the statically allocated string singletons are unique. This means these sets are now disjoint: - `_Py_ID` - `_Py_STR` (including the empty string) - one-character latin-1 singletons Now, when you intern a singleton, that exact singleton will be interned. * Add a `_Py_LATIN1_CHR` macro, use it instead of `_Py_ID`/`_Py_STR` for one-character latin-1 singletons everywhere (including Clinic). * Intern `_Py_STR` singletons at startup. * For free-threaded builds, intern `_Py_LATIN1_CHR` singletons at startup. * Beef up the tests. Cover internal details (marked with `@cpython_only`). * Add lots of assertions Co-Authored-By: Eric Snow <ericsnowcurrently@gmail.com>
* GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120604)Xarblu2024-06-201-1/+1
|
* Fix types in pegen parser generator (GH-120720)yf-yang2024-06-193-6/+6
|
* GH-119726: Deduplicate JIT trampolines for out-of-range jumps (GH-120250)Diego Russo2024-06-191-4/+16
|
* Ignore some failing tests in emulated JIT CI (GH-120375)Diego Russo2024-06-191-1/+4
|
* gh-120417: Remove unused imports in cases_generator (#120622)Victor Stinner2024-06-1711-30/+7
|
* gh-117657: Fix `__slots__` thread safety in free-threaded build (#119368)Daniele Parmeggiani2024-06-171-2/+0
| | | | Fix a race in `PyMember_GetOne` and `PyMember_SetOne` for `Py_T_OBJECT_EX`. These functions implement `__slots__` accesses for Python objects.
* gh-117657: Fix TSan reported data race on ioctl_works (#120175)Sam Gross2024-06-171-1/+0
|
* gh-120417: Remove unused imports in Tools (#120623)Victor Stinner2024-06-173-5/+2
|
* gh-120507: Double WASI memory (#120648)Victor Stinner2024-06-172-4/+3
| | | | Use 16 MiB stack with 40 MiB memory limit, instead of 8 MiB stack with 20 MiB memory limit.
* gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an ↵Kirill Podoprigora2024-06-171-0/+6
| | | | alternative option (#120434)
* gh-117657: Add TSAN suppression for set_default_allocator_unlocked (#120500)AN Long2024-06-141-0/+2
| | | Add TSAN suppression for set_default_allocator_unlocked
* gh-117657: Make PyType_HasFeature atomic (GH-120210)Ken Jin2024-06-131-1/+0
| | | Make PyType_HasFeature atomic
* gh-71587: Drop local reference cache to `_strptime` module in `_datetime` ↵neonene2024-06-121-1/+0
| | | | | (gh-120224) The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation). That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters. This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()).
* gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165)Ken Jin2024-06-121-2/+0
| | | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
* gh-117657: Fix TSAN race involving import lock (#118523)Sam Gross2024-06-061-4/+0
| | | | | This adds a `_PyRecursiveMutex` type based on `PyMutex` and uses that for the import lock. This fixes some data races in the free-threaded build and generally simplifies the import lock code.
* gh-117657: Fix race involving GC and heap initialization (#119923)Sam Gross2024-06-041-3/+0
| | | | | | | | | | | | The `_PyThreadState_Bind()` function is called before the first `PyEval_AcquireThread()` so it's not synchronized with the stop the world GC. We had a race where `gc_visit_heaps()` might visit a thread's heap while it's being initialized. Use a simple atomic int to avoid visiting heaps for threads that are not yet fully initialized (i.e., before `tstate_mimalloc_bind()` is called). The race was reproducible by running: `python Lib/test/test_importlib/partial/pool_in_threads.py`.
* gh-117398: Use Per-Interpreter State for the _datetime Static Types (gh-119929)Eric Snow2024-06-032-0/+2
| | | | | | | We make use of the same mechanism that we use for the static builtin types. This required a few tweaks. The relevant code could use some cleanup but I opted to avoid the significant churn in this change. I'll tackle that separately. This change is the final piece needed to make _datetime support multiple interpreters. I've updated the module slot accordingly.