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 Oren Milman
Recipients Oren Milman
Date 2017-09-25.16:47:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following code causes the interpreter to crash:
class BadInt:
    def __divmod__(*args):
        return 42

import os
os.utime('foo.txt', ns=(BadInt(), 1))

This is because split_py_long_to_s_and_ns() (in Modules/posixmodule.c) assumes
that PyNumber_Divmod() returns a 2-tuple, and passes it to PyTuple_GET_ITEM(),
which assumes it is a tuple. Thus, PyTuple_GET_ITEM() might return a non-NULL
value which is not an address of a Python object.
Date User Action Args
2017-09-25 16:47:57Oren Milmansetrecipients: + Oren Milman
2017-09-25 16:47:57Oren Milmansetmessageid: <>
2017-09-25 16:47:57Oren Milmanlinkissue31577 messages
2017-09-25 16:47:57Oren Milmancreate