14 Commits
Author SHA1 Message Date
Kumar Aditya c79146a9eb gh-160804: Support generator based awaitables in asyncio introspection (#160805) 2026-10-28 08:14:16 +00:00
Timofei IvankovandPablo Galindo Salgado 2188f9b60a gh-159620: Fix remote asyncio stacks stopping at async generators (GH-159623)
Follow asynchronous-generator send/throw wrappers when unwinding suspended
and running asyncio tasks.

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2026-10-17 23:07:03 +00:00
Timofei IvankovandMaurycy Pawłowski-Wieroński 05302c0ad6 gh-158522: Fix truncated stack for a task whose coroutine recurses (#158526)
* gh-158522: Fix truncated stack for a task whose coroutine recurses

* fix lint

* Apply suggestion from @maurycy

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>

* Update Misc/NEWS.d/next/Library/2026-09-30-20-09-46.gh-issue-158522.L6j7tU.rst

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>

* Fix line length in the new test

---------

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
2026-10-05 16:46:39 +01:00
Maurycy Pawłowski-Wieroński e0861c6ae7 gh-153364: Make frame, coroutine, and task-waiter chain walks iterative and bounded (#153365)
* let me declare single limit

* use our new limit in process_frame_chain()

* add it in parse_async_frame_chain()

* parse_coro_chain()

* NEWS

* async in the message?

* test

* no race

* process_task_awaited_by

* process_task_awaited_by limit test

* NEWS

* MAX_TASK_WAITER_CHAIN_DEPTH

* TASK_WAITER_CHAIN_DEPTH in test

* TASK_WAITER_CHAIN_DEPTH 256

* prevent the drift with the comment

* better naming, better style

* MAX_TASK_WAITER_CHAIN_DEPTH comment

* task-waiter iterative bfs walk

* iterative coro-walk

* nicer news

* 1 << 14

* comment

* unused read_Py_ssize_t

* fix tombstones

* simplify

* correct msg

* better test

* news for tombstones

* left-over from when testing buggy version

* redundant new line
2026-10-04 23:57:47 +00:00
Pablo Galindo Salgado a5be25d3bd gh-149619: Harden _remote_debugging error paths (#150349) 2026-05-25 23:22:46 +01:00
Pablo Galindo Salgado 289fd2c97a gh-148178: Validate remote debug offset tables on load (#148187)
Treat the debug offset tables read from a target process as untrusted input
and validate them before the unwinder uses any reported sizes or offsets.

Add a shared validator in debug_offsets_validation.h and run it once when
_Py_DebugOffsets is loaded and once when AsyncioDebug is loaded. The checks
cover section sizes used for fixed local buffers and every offset that is
later dereferenced against a local buffer or local object view. This keeps
the bounds checks out of the sampling hot path while rejecting malformed
tables up front.
2026-04-13 22:22:23 +00:00
sunmy2019 1c396e1821 gh-146615: Fix format specifiers in extension modules (GH-146617) 2026-03-31 10:57:37 +03:00
Pablo Galindo Salgado ae6adc9079 gh-146308: Fix error handling issues in _remote_debugging module (#146309) 2026-03-22 21:12:02 +00:00
Mark Shannon 879c85f6e4 GH-145667: Merge GET_ITER and GET_YIELD_FROM_ITER (GH-146120)
* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER
2026-03-21 10:48:13 +00:00
Taegyun Kim c2d3d6b0dd gh-144316: Fix missing exception in _remote_debugging with debug=False (#144442) 2026-02-26 21:14:34 +00:00
Pablo Galindo Salgado 2c1ca6bb5b gh-144563: Fix remote debugging with duplicate libpython mappings from ctypes (#144595)
When _ctypes is imported, it may call dlopen on the libpython shared
library, causing the dynamic linker to load a second mapping of the
library into the process address space. The remote debugging code
iterates memory regions from low addresses upward and returns the first
mapping whose filename matches libpython. After _ctypes is imported, it
finds the dlopen'd copy first, but that copy's PyRuntime section was
never initialized, so reading debug offsets from it fails.

Fix this by validating each candidate PyRuntime address before accepting
it. The validation reads the first 8 bytes and checks for the "xdebugpy"
cookie that is only present in an initialized PyRuntime. Uninitialized
duplicate mappings will fail this check and be skipped, allowing the
search to continue to the real, initialized PyRuntime.
2026-02-10 10:04:50 +00:00
Pablo Galindo Salgado d3d4cf9432 gh-140739: Fix crashes from corrupted remote memory (#143190) 2025-12-26 16:06:48 +00:00
Savannah OstrowskiandPablo Galindo Salgado 56a442d0d8 GH-141565: Add async code awareness to Tachyon (#141533)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-06 19:31:40 +00:00
Pablo Galindo Salgado d07d3a3c57 gh-138122: Split Modules/_remote_debugging_module.c into multiple files (#141934)
gh-1381228: Split Modules/_remote_debugging_module.c into multiple files
2025-11-25 12:51:24 +00:00