[New-bugs-announce] [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

Xiang Zhang report at bugs.python.org
Sun Jul 31 13:40:09 EDT 2016


New submission from Xiang Zhang:

In list_resize, new_allocated is of type size_t but I think don't have to be now since it finally have to assign back to self->allocated which is of type Py_ssize_t. With Py_ssize_t, we can check some overflows in the first overflow check and don't need the second overflow check.

----------
components: Interpreter Core
files: list_resize.patch
keywords: patch
messages: 271746
nosy: martin.panter, xiang.zhang
priority: normal
severity: normal
status: open
title: Replace size_t with Py_ssize_t as the type of local variable in list_resize
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43957/list_resize.patch

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


More information about the New-bugs-announce mailing list