Files
cpython/Python
Christian Aurich Zanettini Martins 50c24913a4 gh-159399: Fix crash in codecs.encode() on a concurrently unregistered codec (#159400)
* gh-159399: Fix crash in codecs.encode() on a concurrently unregistered codec

In the free-threaded build, codec_getitem() released the CodecInfo tuple
returned by _PyCodec_Lookup() before taking a reference to the encoder
or decoder it returns. If another thread cleared the lookup cache in
between with codecs.unregister(), the tuple could hold the last
reference to the item, which was then freed before it was increfed.

Take the reference before releasing the tuple, as
codec_getitem_checked() already does.

* Remove the free-threading stress test
2026-10-21 09:52:44 -07:00
..
…

Miscellaneous source files for the main Python shared library