Message368383
Windows 64-bit emits a compiler warning on this line:
int len = PyBytes_GET_SIZE(f->f_code->co_code)/sizeof(_Py_CODEUNIT);
Warning:
D:\a\cpython\cpython\Objects\frameobject.c(400,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
Either the code should be rewritten to to Py_ssize_t, or the result should be downcasted to int.
Technically, it seems possible to create a code object larger than INT_MAX instructors: PyCode_New() has no limit on the bytecode length. |
|
Date |
User |
Action |
Args |
2020-05-07 21:53:51 | vstinner | set | recipients:
+ vstinner, Mark.Shannon, serhiy.storchaka |
2020-05-07 21:53:51 | vstinner | set | messageid: <1588888431.25.0.899115772482.issue40228@roundup.psfhosted.org> |
2020-05-07 21:53:51 | vstinner | link | issue40228 messages |
2020-05-07 21:53:51 | vstinner | create | |
|