[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 44eb51e6fcf45f3c2bf21c16e18c4da48a23d2d3 by Serhiy Storchaka in branch '3.5': [3.5] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (GH-2623) (#2659)

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 82a907560011c7b784badccc78082cef70ea7128 by Serhiy Storchaka in branch '3.6': [3.6] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (GH-2623) (#2658)

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2724 ___ Python tracker ___ ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2723 ___ Python tracker ___ ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 64e461be09e23705ecbab43a8b01722186641f71 by Serhiy Storchaka in branch 'master': bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (#2623) https://github.com/python/cpython/commit/64e461be09e23705ecbab43a8b01722186641f71

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I extracted the cases that really can happen in PR 2623. -- assignee: -> serhiy.storchaka resolution: fixed -> stage: resolved -> status: closed -> open versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2689 ___ Python tracker ___ ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-06-27 Thread STINNER Victor
STINNER Victor added the comment: Ok, let's close the issue in that case ;-) -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Gregory just has committed an equivalent of unicode_2.patch in a404bf4db6a6. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22207

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-09-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: modify it as you see fit, i hadn't noticed this issue; just the warnings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22207 ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, these warning annoyed me too. But Victor's patch is purposed to check input data of public C API functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22207

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is original Victor's patch synchronized with the tip. -- Added file: http://bugs.python.org/file36757/issue22207_unicode_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22207

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have reviewed the patch and found only few checks which looks good to me. Also I found two possible overflows (not fixed by the patch). All other changes looks redundant to me and just churn a code. -- ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think there are too many changes. Here is simpler patch which get rid of all warnings in Objects/unicodeobject.c on my computer (gcc 4.6.3, 32-bit Linux). -- Added file: http://bugs.python.org/file36451/unicode_2.patch

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: I think there are too many changes. Here is simpler patch which get rid of all warnings in Objects/unicodeobject.c on my computer (gcc 4.6.3, 32-bit Linux). The purpose of my patch is not to make the compiler quiet, but to ensure that negative lengths are

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97c70528b604 by Victor Stinner in branch 'default': Issue #22207: Fix comparison between signed and unsigned integers warning in http://hg.python.org/cpython/rev/97c70528b604 -- nosy: +python-dev ___

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-17 Thread STINNER Victor
STINNER Victor added the comment: I commited the first part. The remaining part is a long patch for unicodeobject.c. -- Added file: http://bugs.python.org/file36402/unicode.patch ___ Python tracker rep...@bugs.python.org

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-15 Thread STINNER Victor
New submission from STINNER Victor: Python contains a lot of tests like this one: if (length PY_SSIZE_T_MAX / 4) return PyErr_NoMemory(); where length type is Py_ssize_t. This test uses signed integers. There is usually a assert(length 0); before. The issue #22110 enabled more

[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2014-08-15 Thread STINNER Victor
STINNER Victor added the comment: overflow2.patch: more changes for this issue (it doesn't replace my previous patch). -- Added file: http://bugs.python.org/file36382/overflow2.patch ___ Python tracker rep...@bugs.python.org