* don't decref borrowed references
[not found] <alsa-project/alsa-python/pr/19@alsa-project.org>
@ 2026-03-12 20:37 ` GitHub pull_request - opened
0 siblings, 0 replies; only message in thread
From: GitHub pull_request - opened @ 2026-03-12 20:37 UTC (permalink / raw)
To: alsa-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-12 20:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <alsa-project/alsa-python/pr/19@alsa-project.org>
2026-03-12 20:37 ` don't decref borrowed references GitHub pull_request - opened
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox