STINNER Victor <vstin...@python.org> added the comment:

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.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to