Skip to content

[3.14] gh-159864: Fix syslog.openlog() crash with concurrent sys.argv changes (GH-159884) - #159954

Open
ZeroIntensity wants to merge 1 commit into
python:3.14from
ZeroIntensity:backport-e5e0748-3.14
Open

ZeroIntensity wants to merge 1 commit into
python:3.14from
ZeroIntensity:backport-e5e0748-3.14

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

syslog_get_argv() took sys.argv[0] with PyList_GetItem() and increfed it only afterwards, so on the free-threaded build a concurrent replacement of sys.argv[0] could free it in between. Use PyList_GetItemRef() instead. (cherry picked from commit e5e0748)

…s.argv changes (pythonGH-159884)

syslog_get_argv() took sys.argv[0] with PyList_GetItem() and increfed it
only afterwards, so on the free-threaded build a concurrent replacement of
sys.argv[0] could free it in between. Use PyList_GetItemRef() instead.
(cherry picked from commit e5e0748)

Co-authored-by: Junhyung Lee <70549809+espressolee@users.noreply.github.com>
Co-authored-by: Lazizbek Ergashev <20501725+lazerg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants