mirror of
https://github.com/python/cpython.git
synced 2026-06-28 11:50:50 +00:00
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
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| json_lines.jsonl | ||
| test_decode.py | ||
| test_default.py | ||
| test_dump.py | ||
| test_encode_basestring_ascii.py | ||
| test_enum.py | ||
| test_fail.py | ||
| test_float.py | ||
| test_indent.py | ||
| test_pass1.py | ||
| test_pass2.py | ||
| test_pass3.py | ||
| test_recursion.py | ||
| test_scanstring.py | ||
| test_separators.py | ||
| test_speedups.py | ||
| test_tool.py | ||
| test_unicode.py | ||