This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Mark.Shannon, serhiy.storchaka, vstinner
Date 2020-05-07.21:53:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588888431.25.0.899115772482.issue40228@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-05-07 21:53:51vstinnersetrecipients: + vstinner, Mark.Shannon, serhiy.storchaka
2020-05-07 21:53:51vstinnersetmessageid: <1588888431.25.0.899115772482.issue40228@roundup.psfhosted.org>
2020-05-07 21:53:51vstinnerlinkissue40228 messages
2020-05-07 21:53:51vstinnercreate