Skip to content

[3.15] gh-158522: Fix truncated stack for a task whose coroutine recurses (GH-158526) - #158870

Merged
pablogsal merged 1 commit into
python:3.15from
pablogsal:tachyon-backport-158526-315
Oct 5, 2026
Merged

pablogsal merged 1 commit into
python:3.15from
pablogsal:tachyon-backport-158526-315

Conversation

@pablogsal

@pablogsal pablogsal commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Backport of #158526 to Python 3.15.

Recursive coroutine calls share a code object, so using it as the task boundary truncates the reported stack. Stop at the task's own frame address instead. The regression checks that all four recursive frames are included without adding event-loop frames.

…e recurses (pythonGH-158526)

Co-authored-by: Timofei Ivankov <128279579+deadlovelll@users.noreply.github.com>
@pablogsal
pablogsal enabled auto-merge (squash) October 5, 2026 15:47
@pablogsal
pablogsal merged commit a904b39 into python:3.15 Oct 5, 2026
56 checks passed
@pablogsal
pablogsal deleted the tachyon-backport-158526-315 branch October 5, 2026 16:18
pablogsal added a commit to pablogsal/cpython that referenced this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant