Repository navigation
gh-158893: Make os.strerror() thread-safe - #158927
Conversation
Make os.strerror() thread-safe: use the reentrant strerror_r() function if available. * The configure script now checks if strerror_r() is supported. * Add a stress test to test_free_threading.test_os (new module). * Add a comment on decode_current_locale() assertion which fails if the input string is mutated. * Add an assertion to _Py_DecodeLocale() to detect if the input string was mutated during the function call.
|
The test depends on PR #158926. Without the second PR, the test is always skipped. |
|
Oh. Build fails on Android. It seems like Android C library (bionic) uses the GNU API for |
|
I clicked on [Update branch] to retrieve the sysconfig change, to run the test on Free Threaded builds. |
|
!buildbot FreeBSD15 NoGIL |
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 7d18e20 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F158927%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
The build https://buildbot.python.org/#/builders/2369/builds/1 failed because of test_free_threading.test_capi which is unrelated to this change, and I wrote #158935 to fix this test. The test passed successfully! I ran manually |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Sorry, @vstinner, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
Sorry, @vstinner, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
I will backport the fix to 3.14 and 3.15 branches once the 3.15 branch will be unblocked (next week). Right now, there are too many backports to 3.15 in the queue. |
Make os.strerror() thread-safe: use the reentrant strerror_r() function if available.