Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

As for the test itself, the original test was added in 
dc78cc6f7cea2040114a350aa9db835cc433ae05. It tested that the stack overflow is 
not happen when unmarshal a fake code object with a deeply nested dict instead 
of co_code. It was renamed to test_loads_recursion in 
cf0fab2686799b562c9c6f6255557e36f9af095e. In issue16475 
(d7009c69136a3809282804f460902ab42e9972f6) it was updated to mirror the changed 
structure of the code object in Python 3, but the original test was kept with 
the name test_loads_2x_code. Actually both tests work the same, because the 
value of few first bytes doesn't affect the result of these tests.

Yet this test is fragile, it depends on the unstable structure of the code 
object, and it serves its purpose only because input data checking is not very 
strong in the current implementation. Future changes in the marshal module can 
make this test invalid, and this will not be noticed.

In PR 7336 this test is rewritten in more reliable way.

This likely is not directly related to the crash.

----------
nosy: +serhiy.storchaka

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

Reply via email to