[New-bugs-announce] [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

Xiang Zhang report at bugs.python.org
Mon Aug 1 03:43:10 EDT 2016


New submission from Xiang Zhang:

List_New checks against PY_SIZE_MAX. The upper bound of PyMem_Malloc is PY_SSIZE_T_MAX.

Instead of simply changing the constant, another method is delegating overflow check to PyMem_Calloc, so we can avoid the check in unnecessary check in PyMem_Malloc. But I am not sure hiding the check in PyMem_Calloc is a good idea or not.

----------
components: Interpreter Core
files: List_New.patch
keywords: patch
messages: 271774
nosy: martin.panter, xiang.zhang
priority: normal
severity: normal
status: open
title: Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43962/List_New.patch

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


More information about the New-bugs-announce mailing list