Mark Dickinson added the comment:
>From the patch:
- if (dictresize(mp, Py_SIZE(seq))) {
+ if (dictresize(mp, Py_SIZE(seq) / 2 * 3)) {
Isn't there a risk of signed overflow here? The dictresize function has an
`assert(minused >= 0)`, which is going to fail for values of `Py_SIZE(seq)`
that are close to `PY_SSIZE_T_MAX` in the common case where signed overflow
just wraps modulo the appropriate power of 2 (though it's undefined behaviour,
so in theory it *could* do anything).
----------
nosy: +mark.dickinson
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23971>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com