Skip to content

Conversation

@zanieb
Copy link
Contributor

@zanieb zanieb commented Dec 3, 2025

It appears increasing this recursion depth of the object resolves the issue where it can fail to hit the stack limit on macOS during PGO.

The PGO test runtime seemed unaffected on macOS and the test runtime in CI here seems within noise.

@zanieb
Copy link
Contributor Author

zanieb commented Dec 4, 2025

From some microbenchmarks, this adds like 80ms or so on my machine, which seems negligible.

@zanieb zanieb changed the title gh-140125: Increase recursion depth for test_json from 200k to 500k gh-140125: Increase object recursion depth for test_json from 200k to 500k Dec 4, 2025
@zanieb zanieb requested a review from markshannon December 4, 2025 18:53
@zanieb zanieb marked this pull request as ready for review December 4, 2025 18:53
@zanieb zanieb requested a review from vstinner December 5, 2025 13:58
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Victor Stinner <[email protected]>
@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Dec 8, 2025
@vstinner vstinner merged commit e3539e9 into python:main Dec 8, 2025
46 checks passed
@miss-islington-app
Copy link

Thanks @zanieb for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 8, 2025
… 200k to 500k (pythonGH-142226)

(cherry picked from commit e3539e9)

Co-authored-by: Zanie Blue <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Dec 8, 2025

GH-142416 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Dec 8, 2025
@vstinner
Copy link
Member

vstinner commented Dec 8, 2025

@zanieb: Merged, thanks. I backported the change to 3.14 since you wrote that 3.14.1 is also affected by the issue. I don't think that 3.13 needs a backported. Correct me if I'm wrong.

@zanieb
Copy link
Contributor Author

zanieb commented Dec 8, 2025

That's correct. Thank you for backporting <3 I was just coming to ask for that

vstinner added a commit that referenced this pull request Dec 8, 2025
…m 200k to 500k (GH-142226) (#142416)

gh-140125: Increase object recursion depth for `test_json` from 200k to 500k (GH-142226)
(cherry picked from commit e3539e9)

Co-authored-by: Zanie Blue <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants