From: GitHub pull_request - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: don't decref borrowed references
Date: Thu, 12 Mar 2026 21:37:41 +0100 (CET) [thread overview]
Message-ID: <189c327b570b8b00-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <alsa-project/alsa-python/pr/19@alsa-project.org>
alsa-project/alsa-python pull request #19 was opened from florolf:
This has always been wrong, but since Python 3.14 restructured some memory management code in https://github.com/python/cpython/commit/5716cc352940a5f8557a8191e873837aa619498a, this now causes Python to segfault:
```shell-session
$ cat a.py
from pyalsa import alsamixer
m=alsamixer.Mixer()
m.attach()
m.load()
e=alsamixer.Element(m, 'Master')
e.set_volume_tuple([0,0])
$
$ for i in $(seq 1 100); do python -Xfaulthandler a.py || break; done
Fatal Python error: Segmentation fault
Current thread 0x00007f01f2854b80 [python] (most recent call first):
Garbage-collecting
<no Python frame>
Current thread's C stack trace (most recent call first):
Binary file "/usr/lib/libpython3.14.so.1.0", at _Py_DumpStack+0x4d [0x7f01f233731c]
Binary file "/usr/lib/libpython3.14.so.1.0", at +0x13c250 [0x7f01f233c250]
Binary file "/usr/lib/libc.so.6", at +0x3e2d0 [0x7f01f204d2d0]
Binary file "/usr/lib/libpython3.14.so.1.0", at +0x21960d [0x7f01f241960d]
Binary file "/usr/lib/libpython3.14.so.1.0", at +0x219187 [0x7f01f2419187]
Binary file "/usr/lib/libpython3.14.so.1.0", at +0x26bf38 [0x7f01f246bf38]
Binary file "/usr/lib/libpython3.14.so.1.0", at +0x28ff64 [0x7f01f248ff64]
Binary file "/usr/lib/libpython3.14.so.1.0", at Py_RunMain+0x37a [0x7f01f245e59a]
Binary file "/usr/lib/libpython3.14.so.1.0", at Py_BytesMain+0x3b [0x7f01f2457c6b]
Binary file "/usr/lib/libc.so.6", at +0x276c1 [0x7f01f20366c1]
Binary file "/usr/lib/libc.so.6", at __libc_start_main+0x89 [0x7f01f20367f9]
Binary file "python", at _start+0x25 [0x55f22cd3e045]
Extension modules: pyalsa.alsamixer (total: 1)
```
This PR fixes all instances of this behavior in the code base.
Request URL : https://github.com/alsa-project/alsa-python/pull/19
Patch URL : https://github.com/alsa-project/alsa-python/pull/19.patch
Repository URL: https://github.com/alsa-project/alsa-python
parent reply other threads:[~2026-03-12 20:38 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <alsa-project/alsa-python/pr/19@alsa-project.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=189c327b570b8b00-webhooks-bot@alsa-project.org \
--to=github@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.