]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 14 Jun 2026 18:37:28 +0000 (20:37 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Jun 2026 18:37:28 +0000 (11:37 -0700)
commitf892d79013a1f0eb00a67b902d317ef3f9e5f4d3
tree29d47b99436b8c3a3693be8c3a2de422e542e7cf
parent44d1aebd9f228e34bc7d8d9bc3e145794dc4c6bc
[3.14] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460) (#151469)

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 <68491+gpshead@users.noreply.github.com>
Lib/test/test_json/test_recursion.py