You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
strxfrm fails on macOS 15 with OSError: [Errno 22] Invalid argument #130567
Other reports show "[Errno 22] Invalid argument". This is EINVAL. But the re-allocation code is only executed if errno is 0 or ERANGE (34), so your fix cannot change the outcome.
Activity
nijel commentedon Feb 26, 2025
Looking more into that I've found https://swi-prolog.discourse.group/t/compiling-swi-prolog-from-git-source-on-next-macos-15-beta/7590/1. They figured out that
wcsxfrmdoes not actually return desired string size in case of the failure, so they ended up allocating double space in that case, see SWI-Prolog/swipl-devel@f0bbfb0.The following code would have to be changed:
cpython/Modules/_localemodule.c
Line 426 in 263d56e
pythongh-130567: fix strxfrm memory allocation
nijel commentedon Feb 27, 2025
I've tried to address this #130619.
pythongh-130567: fix strxfrm memory allocation
pythongh-130567: fix strxfrm memory allocation
pythongh-130567: fix strxfrm memory allocation
pythongh-130567: fix strxfrm memory allocation
pythongh-130567: fix strxfrm memory allocation
serhiy-storchaka commentedon Feb 28, 2025
What error do you get? What code?
pythongh-130567: fix strxfrm memory allocation
serhiy-storchaka commentedon Feb 28, 2025
Other reports show "[Errno 22] Invalid argument". This is EINVAL. But the re-allocation code is only executed if errno is 0 or ERANGE (34), so your fix cannot change the outcome.
32 remaining items
pythongh-130567: Fix possible crash in locale.strxfrm() (pythonGH-138940
pythongh-130567: Fix possible crash in locale.strxfrm() (pythonGH-138940
[3.13] gh-130567: Fix possible crash in locale.strxfrm() (GH-138940) (G…
gh-130567: Enable previously skipped locale tests on FreeBSD and macOS (
pythongh-130567: Enable previously skipped locale tests on FreeBSD an…
pythongh-130567: Enable previously skipped locale tests on FreeBSD an…
[3.13] gh-130567: Enable previously skipped locale tests on FreeBSD a…
[3.14] gh-130567: Fix possible crash in locale.strxfrm() (GH-138940) (G…
[3.14] gh-130567: Enable previously skipped locale tests on FreeBSD a…
gh-130567: Remove optimistic allocation in locale.strxfrm() (GH-137143)
pythongh-130567: Remove optimistic allocation in locale.strxfrm() (py…
fix: handle natsort.os_sorted OSError on macOS with Unicode paths
locale.strxfrm()can fail on FreeBSD #149603 as a duplicate of this issue