cpython/Lib/test/test_json
Shamil 235fa7244a
gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851)
Hold strong references to borrowed items unconditionally (not only in                                                                        
free-threading builds) in _encoder_iterate_mapping_lock_held and                                                                             
_encoder_iterate_fast_seq_lock_held.  User callbacks invoked during                                                                          
encoding can mutate or clear the underlying container, invalidating                                                                          
borrowed references.                                                                                                                         
                                                                                                                                               
The dict iteration path was already fixed by gh-145244.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-04-12 00:14:50 +00:00
..
__init__.py gh-76007: Deprecate __version__ attribute (#138675) 2025-09-29 12:03:23 +03:00
__main__.py
test_decode.py gh-146440: Add array_hook parameter to JSON decoders (#146441) 2026-03-27 11:10:48 +00:00
test_default.py
test_dump.py gh-145244: Fix use-after-free on borrowed dict key in json encoder (GH-145245) 2026-04-11 22:26:36 +00:00
test_encode_basestring_ascii.py gh-148241: Fix json serialization for str subclasses (#148249) 2026-04-09 13:50:44 +02:00
test_enum.py gh-148241: Fix json serialization for str subclasses (#148249) 2026-04-09 13:50:44 +02:00
test_fail.py gh-71339: Use new assertion methods in tests (GH-129046) 2025-05-22 13:17:22 +03:00
test_float.py
test_indent.py
test_pass1.py
test_pass2.py
test_pass3.py
test_recursion.py gh-143460: Skip infinite recusion tests for infinite stack size (#143606) 2026-01-09 16:11:37 +00:00
test_scanstring.py gh-137821: Improve Argument Clinic definitions in the `_json` module (#140780) 2025-10-30 10:32:08 +00:00
test_separators.py
test_speedups.py gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851) 2026-04-12 00:14:50 +00:00
test_tool.py gh-140172: Skip JSON tools test during PGO training (GH-140809) 2025-12-11 00:34:49 +00:00
test_unicode.py gh-140793: Improve documentatation and tests for the ensure_ascii option in the json module (GH-140906) 2025-11-08 12:07:27 +02:00