[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset e53df7955192 by Serhiy Storchaka in branch 'default': Make asdl_c.py to generate Python-ast.c changed in issue #15989. https://hg.python.org/cpython/rev/e53df7955192 -- ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Isn't Python-ast.c a generated file? Good catch Eric. -- ___ Python tracker ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset d51a82f68a70 by Serhiy Storchaka in branch 'default': Issue #15989: Fixed some scarcely probable integer overflows. https://hg.python.org/cpython/rev/d51a82f68a70 -- ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: One of changes to Modules/_io/_iomodule.c is no longer actual since issue21679. Change to Modules/selectmodule.c is no longer actual since issue23485 (f54bc2c52dfd). The rest changes were committed to 3.6 only. -- resolution: -> fixed stage:

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-09-06 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't Python-ast.c a generated file? -- nosy: +eric.smith ___ Python tracker ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-08-09 Thread Robert Collins
Robert Collins added the comment: It looks fine to me, for whatever thats worth. I think you should commit it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-07-25 Thread Robert Collins
Robert Collins added the comment: @serhiy - I'm a little confused about the state of this patch. It seems like you need more review? -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989

[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-07-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it would be good if other's pair of eyes will look on the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2014-10-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2014-10-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be good to write tests, but for some tests it is difficult (if possible). At least I did not see ways how to do this. -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue15989] Possible integer overflow of PyLong_AsLong() results

2014-10-17 Thread R. David Murray
R. David Murray added the comment: Are the fixes in the final patch waiting for someone to write tests, or is the intent to commit them without tests after a final review because tests are too difficult to write? -- nosy: +r.david.murray ___ Python

[issue15989] Possible integer overflow of PyLong_AsLong() results

2014-05-22 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: -skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___ ___ Python-bugs-list

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are remnants of initial patch which were not committed. There are no tests. -- nosy: +haypo Added file: http://bugs.python.org/file32893/long_aslong_overflow_2-3.4.patch ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___ ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sqlite module part extracted to issue17073. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___ ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 974ace29ee2d by Serhiy Storchaka in branch '3.2': Issue #15989: Fix several occurrences of integer overflow http://hg.python.org/cpython/rev/974ace29ee2d New changeset 8f10c9eae183 by Serhiy Storchaka in branch '3.3': Issue #15989: Fix several

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset d544873d62e9 by Serhiy Storchaka in branch '2.7': Issue #15989: Fix several occurrences of integer overflow http://hg.python.org/cpython/rev/d544873d62e9 -- ___ Python tracker rep...@bugs.python.org

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Stefan Krah
Stefan Krah added the comment: Several 2.7 buildbots are failing. Unfortunately I have only platforms where sizeof(int) == sizeof(long) == sizeof(size_t). You can use your cpython ssh key to login to all snakebite buildbot machines. They are tagged with [SB].

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset a78ebf9aed06 by Serhiy Storchaka in branch '2.7': Ensure that width and precision in string formatting test have type int, not long. http://hg.python.org/cpython/rev/a78ebf9aed06 -- ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for point, Stefan. And thanks Trent for his project. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee93a89b4e0f by Serhiy Storchaka in branch '2.7': Issue #15989: Fix possible integer overflow in str formatting as in unicode formatting. http://hg.python.org/cpython/rev/ee93a89b4e0f -- ___ Python

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Changeset 525407d89277: Fix test_socket broken in previous commit (changeset 13e2e44db99d). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 13e2e44db99d by Serhiy Storchaka in branch 'default': Issue #15989: Fix several occurrences of integer overflow http://hg.python.org/cpython/rev/13e2e44db99d -- nosy: +python-dev ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___ ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-11-29 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___ ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___ ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a tests for most of fixed overflows. Some errors are difficult or impossible to reproduce. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27632/long_aslong_overflow_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added patches for 2.7 and 3.2. -- Added file: http://bugs.python.org/file27401/long_aslong_overflow-3.2.patch Added file: http://bugs.python.org/file27402/long_aslong_overflow-2.7.patch ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-02 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___ ___ Python-bugs-list mailing list

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-23 Thread Mark Dickinson
Mark Dickinson added the comment: Looks good, in general. _PyLong_AsInt should return -1 on overflow in all cases; at the moment, it looks like it doesn't do that for values that overflow an int but not a long. -- ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-23 Thread Mark Dickinson
Mark Dickinson added the comment: I added some comments on Rietveld. Apart from the bug in _PyLong_AsInt mentioned above, the patch mostly looks good. But there are many changes, some of which will have user-visible effects, and I think it's somewhat risky to make all these changes in bugfix

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for review and for found bugs. I again checked the patch, corrected the errors and dubious places. Also I corrected the error in Modules/grpmodule.c (in other places gid_t parsed as signed long) and the possible behaviour change in

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch (for 3.3). I added private _PyLong_AsInt and where possible I have tried to use the appropriate function. -- keywords: +patch Added file: http://bugs.python.org/file27246/long_aslong_overflow.patch

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I was assigned this to itself to show that I working on the issue. Now I free up place for someone with committing privileges. -- assignee: storchaka - ___ Python tracker rep...@bugs.python.org

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There are several places where the result of PyLong_AsLong() assigned to variable of type int. It can cause unknown issues on platforms with sizeof(int) != sizeof(long). All 140 cases of PyLong_AsLong() usage should be checked. -- assignee:

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-20 Thread Mark Dickinson
Mark Dickinson added the comment: Getting a C int out of a Python int is currently a bit awkward. What do you think about adding a PyLong_AsInt counterpart to PyLong_AsLong? (The alternative is to use PyLong_AsLong and repeat the same overflow detection code in many places.) --

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-09-20 Thread Mark Dickinson
Mark Dickinson added the comment: In the Objects subdirectory (which is all I've looked at so far), I see issues in: - fileobject.c (PyObject_AsFileDescriptor) - structseq.c (PyLong_AsLong return value used as a Py_ssize_t; probably safe, but it would be better to use PyLong_AsSsize_t). -