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 <rep...@bugs.python.org>
<http://bugs.python.org/issue27662>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to