Message191806
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2013年06月24日.21:23:21 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1372109001.9.0.446670926937.issue18295@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Similar issue:
..\Objects\funcobject.c(636): warning C4244: 'function' : conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\buildbot.python.org3円.x.kloth-win64\build\PCbuild\pythoncore.vcxproj]
..\Objects\funcobject.c(637): warning C4244: 'function' : conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\buildbot.python.org3円.x.kloth-win64\build\PCbuild\pythoncore.vcxproj]
..\Objects\funcobject.c(637): warning C4244: 'function' : conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\buildbot.python.org3円.x.kloth-win64\build\PCbuild\pythoncore.vcxproj]
Extract of function_call() function:
result = PyEval_EvalCodeEx(
PyFunction_GET_CODE(func),
PyFunction_GET_GLOBALS(func), (PyObject *)NULL,
&PyTuple_GET_ITEM(arg, 0), PyTuple_GET_SIZE(arg),
k, nk, d, nd,
PyFunction_GET_KW_DEFAULTS(func),
PyFunction_GET_CLOSURE(func));
argcount, kwcount and defcount are int, whereas function_call() pass Py_ssize_t values.
function_call() should check PyTuple_GET_SIZE(arg) <= INT_MAX, nk <= INT_MAX and nd <= INT_MAX. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年06月24日 21:23:21 | vstinner | set | recipients:
+ vstinner |
| 2013年06月24日 21:23:21 | vstinner | set | messageid: <1372109001.9.0.446670926937.issue18295@psf.upfronthosting.co.za> |
| 2013年06月24日 21:23:21 | vstinner | link | issue18295 messages |
| 2013年06月24日 21:23:21 | vstinner | create |
|