Eryk Sun <eryk...@gmail.com> added the comment:
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 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37412> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com