Skip to content

Commit e91f68a

Browse files
authored
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.
1 parent a7885b4 commit e91f68a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/test/test_json/test_recursion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def default(self, o):
6868
self.fail("didn't raise ValueError on default recursion")
6969

7070

71+
@support.skip_if_pgo_task # fails during PGO training w/ some stack sizes
7172
@support.skip_if_unlimited_stack_size
7273
@support.skip_emscripten_stack_overflow()
7374
@support.skip_wasi_stack_overflow()

0 commit comments

Comments
 (0)