[issue1621] Do not assume signed integer overflow behavior

Martin Panter report at bugs.python.org
Fri Aug 5 20:59:03 EDT 2016


Martin Panter added the comment:

Xiang: regarding your overflow_fix_in_listextend.patch, what do you think about adding a comment or debugging assertion instead, something like:

/* It should not be possible to allocate a list large enough to cause an overflow on any relevant platform */
assert(m < PY_SSIZE_T_MAX - n);

----------

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


More information about the Python-bugs-list mailing list