Commit Graph
8 Commits
Author SHA1 Message Date
Victor Stinner b23d657d0c [3.14] gh-158893: Make os.strerror() thread-safe (#159120) (#159145)
[3.15] gh-158893: Make os.strerror() thread-safe (#159120)

* gh-157695: Parse also _Py_HAVE_xxx variables in sysconfig (#158926)

Add parse_config_h() tests to test_sysconfig.

(cherry picked from commit 978a8befa5)

* gh-158893: Make os.strerror() thread-safe (#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.

* gh-158893: Add internal _Py_strerror() function (#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 15dd7356f3)
(cherry picked from commit c774d1526f)
2026-10-10 20:54:38 +00:00
Pablo Galindo Salgado 04735deeb2 [3.14] gh-149619: Harden _remote_debugging error paths (GH-150349) (#154844)
(cherry picked from commit a5be25d3bd)
2026-07-28 23:46:43 +01:00
Victor Stinner 36e9f672f2 [3.14] Fix compiler warnings in remote debugging (#141060) (#141067)
Fix compiler warnings in remote debugging (#141060)

Example of fixed warnings on 32-bit Windows:

    Python\remote_debugging.c(24,53): warning C4244: 'function':
    conversion from 'uint64_t' to 'uintptr_t', possible loss of data

    Modules\_remote_debugging_module.c(789,44): warning C4244:
    'function': conversion from 'uint64_t' to 'size_t', possible loss
    of data

(cherry picked from commit f458ac01ba)
2025-11-05 19:49:39 +00:00
Miss Islington (bot)andDaniel Golding ef539654e6 [3.14] gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (GH-134878) (#135240)
gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (GH-134878)
(cherry picked from commit ac9c3431cc)

Co-authored-by: Daniel Golding <goldingd89@gmail.com>
2025-06-07 18:56:38 +00:00
Pablo Galindo Salgado e8cf3a1a64 gh-91048: Refactor _testexternalinspection and add Windows support (#132852) 2025-04-25 14:12:16 +01:00
Pablo Galindo Salgado 22c9886c8e gh-131591: Implement PEP 768 support for FAT mac binaries and 32 bit binaries (#132892)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2025-04-25 01:58:19 +01:00
Pablo Galindo Salgado 2067378e6d gh-131591: Handle includes for iOS in remote_debugging.c (#132050) 2025-04-06 21:39:25 +01:00
943cc1431e gh-131591: Implement PEP 768 (#131937)
Co-authored-by: Ivona Stojanovic <stojanovic.i@hotmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
2025-04-03 16:20:01 +01:00