[issue38962] Reference leaks in subinterpreters

Pablo Galindo Salgado report at bugs.python.org
Tue Dec 3 15:47:39 EST 2019


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Actually, that commit has an independent refleak that was fixed (!) regarding the small integer cache. Seems that the actual commit that made the new leak is:

commit 2582d46fbcf7bdf86b9cf4016850b8d155267ac6
Author: Victor Stinner <vstinner at python.org>
Date:   Fri Nov 22 19:24:49 2019 +0100

    bpo-38858: new_interpreter() reuses pycore_init_builtins() (GH-17351)
    
    new_interpreter() now calls _PyBuiltin_Init() to create the builtins
    module and calls _PyImport_FixupBuiltin(), rather than using
    _PyImport_FindBuiltin(tstate, "builtins").
    
    pycore_init_builtins() is now responsible to initialize
    intepr->builtins_copy: inline _PyImport_Init() and remove this
    function.



Reverting this commit fixes the refleaks in atexit at least

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38962>
_______________________________________


More information about the Python-bugs-list mailing list