Repository navigation
[3.15] gh-158893: Make os.strerror() thread-safe - #159120
Conversation
…on#158926) Add parse_config_h() tests to test_sysconfig. (cherry picked from commit 978a8be)
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.
Add a new internal _Py_strerror() function to Python/fileutils.c. It uses strerror_r() if available, or use strerror() otherwise. Replace all strerror(code) calls with _Py_strerror(code). (cherry picked from commit 15dd735)
|
!buildbot FreeBSD |
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 710c455 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F159120%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
Good, the test suite passed on 4 FreeBSD buildbots. There are unrelated failure on the two other FreeBSD buildbots.
Unrelated failure:
Ah, that's an unrelated failure. I will backport my fix from main. |
|
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. |
* pythongh-157695: Parse also _Py_HAVE_xxx variables in sysconfig (python#158926) Add parse_config_h() tests to test_sysconfig. (cherry picked from commit 978a8be) * pythongh-158893: Make os.strerror() thread-safe (python#158927) 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. * pythongh-158893: Add internal _Py_strerror() function (python#158982) Add a new internal _Py_strerror() function to Python/fileutils.c. It uses strerror_r() if available, or use strerror() otherwise. Replace all strerror(code) calls with _Py_strerror(code). (cherry picked from commit 15dd735) (cherry picked from commit c774d15)
|
GH-159145 is a backport of this pull request to the 3.14 branch. |
Uh oh!
There was an error while loading. Please reload this page.