Guido van Rossum <gu...@python.org> added the comment:

Hm, the deep-frozen objects are statically initialized with a very large 
refcount that isn't accounted for (they are intended to be immortal). It seems 
that Py_Finalize() somehow decrefs those objects. I guess this means we need 
some kind of flag indicating certain objects are immortal (Eric has proposed 
several schemes), then we could just mark these objects as immortal.

This reminds me, since https://github.com/python/cpython/pull/30715 (which I 
merged yesterday) the deep-frozen objects also reference the small ints 
directly, as well as the singleton for b"". Is this even safe across 
Py_Finalize()/Py_Initialize()? If not, we'll need to roll that back as well.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46449>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to