[issue18295] Possible integer overflow in PyCode_New()

2018-09-19 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue18295] Possible integer overflow in PyCode_New()

2018-07-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since 3.7 the number of arguments no longer limited by 255 (see issue12844 and issue18896). -- versions: +Python 2.7, Python 3.6 -Python 3.4, Python 3.5 ___ Python tracker

[issue18295] Possible integer overflow in PyCode_New()

2016-08-17 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue18295] Possible integer overflow in PyCode_New()

2016-08-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset e615718a6455 by Victor Stinner in branch 'default': Use Py_ssize_t in _PyEval_EvalCodeWithName() https://hg.python.org/cpython/rev/e615718a6455 -- nosy: +python-dev ___ Python tracker

[issue18295] Possible integer overflow in PyCode_New()

2015-07-06 Thread Mark Lawrence
Mark Lawrence added the comment: Could we try and get this closed please, as I'm always a little concerned that a code change causes a genuine warning that should be actioned, but it gets masked by all the others. -- ___ Python tracker

[issue18295] Possible integer overflow in PyCode_New()

2015-02-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is possible to reproduce original bug without hacking the code object or bytecode: eval('lambda %s, *args, **kwargs: (lambda:args)' % (', '.join('a%d'%i for i in range(253)),))(*range(256))() (253, 254, 255) eval('lambda %s, *args, **kwargs:

[issue18295] Possible integer overflow in PyCode_New()

2015-02-13 Thread Steve Dower
Steve Dower added the comment: Other than my one query on the review, code_ssize_t_2.patch.patch looks good to me. -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18295

[issue18295] Possible integer overflow in PyCode_New()

2015-02-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Many of these overflows can be provoked by specially constructed function, code object or bytecode. Also I think following examples crash or return wrong result on 64 bit platform: def f(*args, **kwargs): return len(args), len(kwargs) f(*([0]*(2**32+1)))

[issue18295] Possible integer overflow in PyCode_New()

2014-07-30 Thread Mark Lawrence
Mark Lawrence added the comment: Note this is referenced from #18407. -- nosy: +BreamoreBoy versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18295 ___

[issue18295] Possible integer overflow in PyCode_New()

2013-11-19 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch adding Py_SAFE_DOWNCAST(). For update_star_args(), I changed the type instead, because I prefer to avoid Py_SAFE_DOWNCAST() when possible. Modify PyEval_EvalCodeEx() and PyCode_New() to use Py_ssize_t would be more correct, but it may be

[issue18295] Possible integer overflow in PyCode_New()

2013-06-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't think they are actually the *same* issue. For the limitations wrt. code objects (maximum size of byte code, maximum number of local variables, maximum number of parameters, etc.), I recommend the following thorough procedure: 1. document in a single

[issue18295] Possible integer overflow in PyCode_New()

2013-06-24 Thread STINNER Victor
New submission from STINNER Victor: On Windows x64, we get the following warning: ..\Objects\codeobject.c(106): warning C4244: '=' : conversion from 'Py_ssize_t' to 'unsigned char', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\pythoncore.vcxproj] Code:

[issue18295] Possible integer overflow in PyCode_New()

2013-06-24 Thread STINNER Victor
STINNER Victor added the comment: Similar issue: ..\Objects\funcobject.c(636): warning C4244: 'function' : conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\pythoncore.vcxproj] ..\Objects\funcobject.c(637): warning C4244:

[issue18295] Possible integer overflow in PyCode_New()

2013-06-24 Thread STINNER Victor
STINNER Victor added the comment: And another one: ..\Python\ceval.c(4271): warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\pythoncore.vcxproj] ..\Python\ceval.c(4459): warning C4244: '=' : conversion from