[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

Benjamin Peterson report at bugs.python.org
Sat Dec 5 14:48:48 EST 2015


Benjamin Peterson added the comment:

Err, sorry, it's actually PyDict_GetItem which is the problem. Basically
if you try to import with a very deep stack, doing PyDict_GetItem on
sys.modules can return NULL (fro copy_reg). That confuses import a lot.

I haven't exactly figured out why those tests cause failure. One of them
probably puts unicode strings in sys.modules.

On Sat, Dec 5, 2015, at 06:28, Barry A. Warsaw wrote:
> 
> Barry A. Warsaw added the comment:
> 
> On Dec 05, 2015, at 07:03 AM, Benjamin Peterson wrote:
> 
> >The underlying issue is classic: PyDict_SetItem returns NULL if the stack is
> >too deep. This confuses import.
> 
> Thanks for digging into this Benjamin.  I'm not able to investigate
> further
> atm, but could you please explain your analysis in more detail?  Where's
> the
> faulty setitem?  Where is import getting confused?  Why does this (or the
> combination I found before) cause the problem?
> 
> ----------
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue25698>
> _______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25698>
_______________________________________


More information about the Python-bugs-list mailing list