◐ Shell
clean mode source ↗

gh-119247: Add macros to use PySequence_Fast safely in free-threaded build by MojoVampire · Pull Request #119315 · python/cpython

@DinoV DinoV changed the title Fix issue 119247 gh-119247: Fix issue 119247

May 21, 2024

colesbury

@colesbury colesbury changed the title gh-119247: Fix issue 119247 gh-119247: Add macros to use PySequence_Fast safely in free-threaded build

May 21, 2024

colesbury

colesbury

…sts segfault or die with assertion failures >95% of the time without locking macro, pass reliably with locking macro
Use braces to restrict scope of conditional locking

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
… total time to run tests (both tests combine to less than 200 ms in debug build on my laptop)
…section include Python.h which provides listobject.h)
…onize, and perform multiple joins per loop to increase chance of repro without synchronization

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 22, 2024
…eaded build (pythonGH-119315)

Add `Py_BEGIN_CRITICAL_SECTION_SEQUENCE_FAST` and
`Py_END_CRITICAL_SECTION_SEQUENCE_FAST` macros and update `str.join` to use
them. Also add a regression test that would crash reliably without this
patch.
(cherry picked from commit baf347d)

Co-authored-by: Josh {*()} Rosenberg <26495692+MojoVampire@users.noreply.github.com>

colesbury pushed a commit that referenced this pull request

May 22, 2024
…readed build (GH-119315) (#119419)

Add `Py_BEGIN_CRITICAL_SECTION_SEQUENCE_FAST` and
`Py_END_CRITICAL_SECTION_SEQUENCE_FAST` macros and update `str.join` to use
them. Also add a regression test that would crash reliably without this
patch.
(cherry picked from commit baf347d)

Co-authored-by: Josh {*()} Rosenberg <26495692+MojoVampire@users.noreply.github.com>

estyxx pushed a commit to estyxx/cpython that referenced this pull request

Jul 17, 2024
…eaded build (python#119315)

Add `Py_BEGIN_CRITICAL_SECTION_SEQUENCE_FAST` and
`Py_END_CRITICAL_SECTION_SEQUENCE_FAST` macros and update `str.join` to use
them. Also add a regression test that would crash reliably without this
patch.