Closed
Description
Bug report
The long_from_non_binary_base
function in longobject.c isn't thread-safe with free threading or per-interpreter GIL due to the initialization of log_base_BASE
, convwidth_base
, and convmultmax_base
:
Lines 2835 to 2856 in f963239
There are a few ways we could make this thread-safe:
- Make the initialization thread-safe with something like
_PyOnceFlag
- Pre-compute the values and hardcode them.
Originally reported by @ngoldbaum in #130421
cc @tim-one
Linked PRs
Metadata
Metadata
Assignees
Projects
Status