Skip to content

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

Merged
ZeroIntensity merged 1 commit into
python:3.15from
miss-islington:backport-e5e0748-3.15
Oct 20, 2026
Merged

ZeroIntensity merged 1 commit into
python:3.15from
miss-islington:backport-e5e0748-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

…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>
@ZeroIntensity
ZeroIntensity enabled auto-merge (squash) October 20, 2026 19:32
@ZeroIntensity
ZeroIntensity merged commit a11aa06 into python:3.15 Oct 20, 2026
56 checks passed
@miss-islington
miss-islington deleted the backport-e5e0748-3.15 branch October 20, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants