diff options
author | Sam Gross <colesbury@gmail.com> | 2024-10-10 20:21:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 20:21:29 (GMT) |
commit | 427dcf24de4e06d239745d74d08c4b2e541dca5a (patch) | |
tree | 37a7ca3937862498b957402323c1a29195ce11eb /Parser | |
parent | bb594e801b6a84823badbb85b88f0fc8b221d7bf (diff) | |
download | cpython-427dcf24de4e06d239745d74d08c4b2e541dca5a.zip cpython-427dcf24de4e06d239745d74d08c4b2e541dca5a.tar.gz cpython-427dcf24de4e06d239745d74d08c4b2e541dca5a.tar.bz2 |
gh-125268: Use static string for "1e309" in AST (#125272)
When formatting the AST as a string, infinite values are replaced by
1e309, which evaluates to infinity. The initialization of this string
replacement was not thread-safe in the free threading build.
Diffstat (limited to 'Parser')
-rwxr-xr-x | Parser/asdl_c.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index f50c28a..32eac3a 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -2242,8 +2242,6 @@ def generate_ast_fini(module_state, f): for s in module_state: f.write(" Py_CLEAR(state->" + s + ');\n') f.write(textwrap.dedent(""" - Py_CLEAR(_Py_INTERP_CACHED_OBJECT(interp, str_replace_inf)); - state->finalized = 1; state->once = (_PyOnceFlag){0}; } |