Author eryksun
Recipients ZackerySpytz, eryksun, miss-islington, steve.dower, vstinner
Date 2019-06-27.01:10:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561597801.64.0.775815340853.issue37412@roundup.psfhosted.org>
In-reply-to
Content
This update breaks long-path support in Windows. It includes the following unnecessary check, which is using the wrong comparison operator:

        if (len >= PY_SSIZE_T_MAX / sizeof(wchar_t))

PyMem_RawMalloc already checks this and returns NULL if size > (size_t)PY_SSIZE_T_MAX. This bug is causing a MemoryError with long paths:

    >>> p = 'C:/Temp/longpath' + ('/' + 'a' * 255) * 9
    >>> os.chdir(p)
    >>> len(os.getcwd())
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    MemoryError
History
Date User Action Args
2019-06-27 01:10:01eryksunsetrecipients: + eryksun, vstinner, steve.dower, ZackerySpytz, miss-islington
2019-06-27 01:10:01eryksunsetmessageid: <1561597801.64.0.775815340853.issue37412@roundup.psfhosted.org>
2019-06-27 01:10:01eryksunlinkissue37412 messages
2019-06-27 01:10:01eryksuncreate