Commit Graph

10089 Commits

Author SHA1 Message Date
Ken Jin 6cb245d260 gh-143183: Link trace to side exits, rather than stop (GH-143268) 2025-12-29 15:10:42 +00:00
Samuel f37f57dfe6 gh-131421: Fix ASDL kw_defaults being expr* instead of expr?* (GH-133773)
Also fix docs ASDL highlighting.
2025-12-29 13:43:09 +02:00
Ken Jin daa9aa4c0a gh-143183: Rewind stop tracing to previous target (GH-143187)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-12-28 22:12:31 +00:00
Tomas R. 713684de53 gh-131798: Remove bounds check when indexing into tuples with a constant index (#137607)
* Remove bounds check when indexing into tuples with a constant index

* Add news entry

* fixup after rebase
2025-12-28 22:06:06 +01:00
Pablo Galindo Salgado 3ccc76f036 gh-143228: Fix UAF in perf trampoline during finalization (#143233) 2025-12-28 13:50:23 +00:00
Pablo Galindo Salgado 3a728e5f93 gh-131591: Do not free page caches that weren't allocated (#143205) 2025-12-27 13:38:11 +00:00
Hai Zhu a1c6308346 gh-134584: Eliminate redundant refcounting from IS_OP (GH-143171)
Eliminate redundant refcounting from IS_OP
2025-12-26 20:30:02 +00:00
Hai Zhu b3f2d80569 gh-134584: Eliminate redundant refcounting from _COMPARE_OP_X (GH-143186) 2025-12-26 16:12:28 +00:00
Yongtao Huang de22e718bb Remove redundant pycore_optimizer.h includes (#143184)
`pycore_optimizer.h` was included redundantly in
Objects/frameobject.c and Python/instrumentation.c.
Both includes are unnecessary and can be safely removed.
No functional change.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
2025-12-26 11:11:11 +00:00
Peter Bierma 8611f74e08 gh-142975: During GC, mark frozen objects with a merged zero refcount for destruction (GH-143156) 2025-12-25 16:31:41 +00:00
Ken Jin cf6758ff9e gh-143092: Make CALL_LIST_APPEND and BINARY_OP_INPLACE_ADD_UNICODE normal instructions (GH-143124)
These super instructions need many special cases in the interpreter, specializer, and JIT. It's best we convert them to normal instructions.
2025-12-24 22:03:00 +00:00
Sam Gross 594a4631c3 gh-120321: Fix TSan reported races on gi_frame_state (gh-143128) 2025-12-24 16:10:43 -05:00
Stan Ulbrych 3509fa5a12 gh-143135: Fix sys.flags.inspect when PYTHONINSPECT=0 (GH-143136) 2025-12-24 19:56:59 +02:00
Diego Russo fc2f0fea6b JIT: Move executor to a register (#143072) 2025-12-24 09:44:16 +00:00
Sam Gross 50ecd6b880 gh-143108: Don't instrument faulthandler.c for TSan (#143109)
The dumping of tracebacks has data races and that's okay (it's best
effort).
2025-12-24 02:12:55 +01:00
Hai Zhu cc48bf0fde gh-134584: Eliminate redundant refcounting from _BINARY_OP_SUBSCR_TUPLE_INT (GH-143094) 2025-12-23 21:47:12 +00:00
Diego Russo 450e836aef JIT: don't leak shim memory when shutting down the interpreter (#142984) 2025-12-23 17:50:00 +00:00
Mark Shannon 20aeb3a463 GH-143026: Fix assertion error in executor management. (GH-143104) 2025-12-23 17:19:34 +00:00
Tomas R. 25c294b6ea gh-134584: Eliminate redundant refcounting from _CALL_TYPE_1 (GH-135818) 2025-12-23 17:01:10 +00:00
Ken Jin c4ab024530 gh-142448: Disable JIT tracing when monitoring is enabled (GH-142842) 2025-12-23 11:27:23 +00:00
Pablo Galindo Salgado 81c8eb85e1 gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
Hai Zhu 5b5ee3c4bf gh-134584: Eliminate redundant refcounting from _LOAD_ATTR_WITH_HINT (GH-143062)
Eliminate redundant refcounting from _LOAD_ATTR_WITH_HINT
2025-12-23 00:28:08 +00:00
Chris Eibl be3c131640 GH-139922: Tail calling for MSVC (VS 2026) (GH-143068)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-22 23:01:34 +00:00
Ken Jin 665d2807a0 gh-139109: Add terminator to JIT code when halting due to invalid dependencies (#143033)
* Add terminator to JIT code when  halting due to invalid dependencies

* 📜🤖 Added by blurb_it.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-12-22 20:54:47 +00:00
Chris Eibl 700e9fad70 GH-142513: fix missing return in executor_clear (GH-143073)
fix missing return in executor_clear
2025-12-22 17:10:52 +00:00
Kumar Aditya e728b006de gh-143057: avoid locking in tracemalloc C-APIs when it is not enabled (#143065) 2025-12-22 21:08:07 +05:30
Ken Jin 9ded3dd4e9 gh-142476: Fix Windows crashing with JIT (GH-143021)
Fix Windows crashing with JIT
2025-12-22 14:57:13 +00:00
Sam Gross 08bc03ff2a gh-120321: Make gi_frame_state transitions atomic in FT build (gh-142599)
This makes generator frame state transitions atomic in the free
threading build, which avoids segfaults when trying to execute
a generator from multiple threads concurrently.

There are still a few operations that aren't thread-safe and may crash
if performed concurrently on the same generator/coroutine:

 * Accessing gi_yieldfrom/cr_await/ag_await
 * Accessing gi_frame/cr_frame/ag_frame
 * Async generator operations
2025-12-19 19:10:37 +00:00
Shamil e2a7db7175 gh-142476: fix memory leak when creating JIT executors (GH-142492) 2025-12-19 19:07:11 +00:00
Ken Jin 6b4bc6e6a2 gh-134584: JIT: Borrow references for immortal promoted globals (GH-142921)
JIT: Borrow references for immortal promoted globals
2025-12-19 19:06:34 +00:00
stratakis 6a4f10325d gh-142776: Ensure fp file descriptor is closed on all code paths in import.c (GH-142777) 2025-12-19 10:14:52 -08:00
Ken Jin 786f464c74 gh-142961: Fix constant folding len(tuple) in JIT (GH-142963) 2025-12-19 17:43:36 +00:00
Diego Russo 685272eb8a JIT: Rename trampoline.c to shim.c (#142974) 2025-12-19 14:39:41 +00:00
Savannah Ostrowski 1391ee664c GH-134584: Remove redundant refcount for BINARY_OP_SUBSCR_STR_INT (#142844) 2025-12-18 21:29:54 +00:00
LloydZ 33d94abafd gh-134584: Eliminate redundant refcounting from _BINARY_OP_SUBSCR_LIST_INT (GH-142926) 2025-12-18 18:25:36 +00:00
Kumar Aditya e22c49522b gh-142890: remove unnecessary interp parameter from dict functions and _PyDict_NotifyEvent (#142923) 2025-12-18 22:48:56 +05:30
Mark Shannon e4058d7cb1 GH-142513: Reimplement executor management (GH-142931)
* Invalidating an executor does not cause arbitrary code to run
* Executors are only freed at safe points
2025-12-18 16:43:44 +00:00
Donghee Na 14f0b5191a gh-142419: Add mmap.set_name method for user custom annotation (gh-142480) 2025-12-18 23:33:49 +09:00
Donghee Na 71a7cb8887 gh-134584: Remove redundant refcount from _BINARY_OP_ADD_UNICODE (gh-142825) 2025-12-18 21:33:18 +09:00
Savannah Ostrowski 92243dc62c GH-100964: Fix reference cycle in exhausted generator frames (#141112) 2025-12-17 19:21:45 +00:00
Ken Jin fba4584ffc gh-142849: Fix segfault in executor_to_gv (GH-142885)
Fix segfault in `executor_to_gv`
2025-12-17 17:05:21 +00:00
sobolevn e61a447d0e gh-142873: Do not check for PyContextVar_CheckExact twice in PyContextVar_Set (#142874) 2025-12-17 19:41:36 +03:00
Mark Shannon c7dcb26520 GH-142621: JIT: Avoid memory load for symbols within 4GB on AArch64 (GH-142820) 2025-12-17 12:07:07 +00:00
Ken Jin 89729f2ef7 gh-142543: Mark tracer functions as Py_NO_INLINE (GH-142846) 2025-12-17 00:12:32 +00:00
Nadeshiko Manju 4345253981 gh-134584: Eliminate redundant refcounting from _STORE_ATTR_WITH_HINT (GH-142767)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-16 22:21:04 +00:00
Nadeshiko Manju 6ee51a36b3 gh-134584: Eliminate redundant refcounting from _LOAD_ATTR_INSTANCE_VALUE (GH-142769)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-16 20:39:20 +00:00
Mark Shannon 92d4aeafd5 GH-142629: JIT: Fix out of bounds memory read in lltrace (GH-142821)
JIT: Fix out of bounds memory read in lltrace
2025-12-16 19:57:15 +00:00
Gabriele N. Tornetta 16a305f152 Make RESUME monitoring more readable and robust (GH-142136) 2025-12-16 16:23:27 +00:00
Savannah Ostrowski bef63d2fb8 GH-134584: Remove redundant refcount from _STORE_ATTR_SLOT (#142729) 2025-12-15 15:18:44 -08:00
Bartosz Sławecki f277781bba gh-142737: Handle lost io.open in _Py_FindSourceFile (GH-142747) 2025-12-15 22:58:50 +00:00