https://github.com/python/cpython/commit/1b457d3bbc528184f373bdcac47f0951052f90b7
commit: 1b457d3bbc528184f373bdcac47f0951052f90b7
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: gpshead <[email protected]>
date: 2026-06-14T11:37:23-07:00
summary:

[3.15] Skip test_highly_nested_objects_decoding during the PGO profile task. 
(GH-151460) (#151468)

Skip test_highly_nested_objects_decoding during the PGO profile task. 
(GH-151460)

Since the recursion guard tracks real C-stack bounds (gh-91079), this test
asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack
(some Nix build envs use one that large), the optimized interpreter uses ~160
bytes/level (raises at ~420k levels) so the assertion holds with only ~16%
margin; the PGO *instrumented* stage inlines less, its per-level scanner frames
are smaller, and the 500k-deep decode completes -- "RecursionError not raised"
fails the profile run and aborts `make profile-opt`. Upstream's
skip_if_unlimited_stack_size (gh-143460) only covers RLIM_INFINITY, not
large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger
number... but there's little value in PGO training on this test anyways.
(cherry picked from commit e91f68ab40e25dc964afb872eb75873c8b1838d6)

Co-authored-by: Gregory P. Smith <[email protected]>

files:
M Lib/test/test_json/test_recursion.py

diff --git a/Lib/test/test_json/test_recursion.py 
b/Lib/test/test_json/test_recursion.py
index ffd3404e6f77a07..d732fc80cf1cf30 100644
--- a/Lib/test/test_json/test_recursion.py
+++ b/Lib/test/test_json/test_recursion.py
@@ -68,6 +68,7 @@ def default(self, o):
             self.fail("didn't raise ValueError on default recursion")
 
 
+    @support.skip_if_pgo_task  # fails during PGO training w/ some stack sizes
     @support.skip_if_unlimited_stack_size
     @support.skip_emscripten_stack_overflow()
     @support.skip_wasi_stack_overflow()

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to