Jeffrey Walton <noloa...@gmail.com> added the comment:

On Tue, Sep 11, 2018 at 8:26 PM, STINNER Victor <rep...@bugs.python.org> wrote:
>
> STINNER Victor <vstin...@redhat.com> added the comment:
>
>> newsize <<= 1; // The largest possible value is PY_SSIZE_T_MAX + 1.
>
> Previously, there was a explicitly check for error raising  PyErr_NoMemory() 
> on overflow. Now you rely on PyMem_Malloc() to detect the overflow. I'm not 
> sure that it's a good idea.

+1. It will probably work as expected on Solaris and other OSes that
don't oversubscribe memory. It will probably fail in unexpected ways
on Linux when the allocation succeeds but then the OOM killer hits a
random process.

Jeff

----------

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

Reply via email to