pipewire/spa/plugins/alsa
Alper Nebi Yasak e726c5f6db alsa-ucm: Fix possible segfault from recursion due to too many devices
While trying to figure out device subsets that have aren't internally
contain conflicting devices, we walk through all possible subsets and
check each set if it satisfies ConflictingDevices/SupportedDevices
listed in UCM configuration. For a better user experience, we want to
skip subsets that are fully included in another valid subset we will
also generate.

The iterate_device_subsets() function that achieves the former is
intentionally in iterative form to avoid a stack overflow, since it will
walk through 2^n sets. However, the iterate_maximal_device_subsets()
function that skips incomplete sets is in recursive form, as I had
assumed tail-call optimization would take care of the potential problem.

Convert iterate_maximal_device_subsets() to an iterative form, because
the recursion seems to trigger a segfault with more than 16 devices on
PulseAudio. It doesn't seem to happen on PipeWire, but it's better to
not leave it to luck.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/838
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2024-12-04 20:40:16 +00:00
..
acp alsa-ucm: Fix possible segfault from recursion due to too many devices 2024-12-04 20:40:16 +00:00
mixer alsa-card-profiles: move HDMI/AC3 profiles to separate profile set 2024-11-23 14:58:17 +02:00
90-pipewire-alsa.rules Update 90-pipewire-alsa.rules with support for Astro Mixamp Pro TR. 2024-04-01 18:31:10 +00:00
acp-tool.c Fix compilation with -Werror=float-conversion 2024-06-18 12:17:56 +02:00
alsa-acp-device.c spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
alsa-compress-offload-device.c spa: alsa: avoid potential uninitialized variable use 2024-09-18 19:54:13 +00:00
alsa-compress-offload-sink.c Fix typos 2024-05-22 09:19:34 +02:00
alsa-pcm-device.c spa: alsa: avoid potential uninitialized variable use 2024-09-18 19:54:13 +00:00
alsa-pcm-sink.c alsa: handle the case where the driver is destroyed 2024-11-15 16:09:36 +01:00
alsa-pcm-source.c alsa: handle the case where the driver is destroyed 2024-11-15 16:09:36 +01:00
alsa-pcm.c alsa: reduce debug level that got accidentally increased 2024-12-03 16:44:45 +01:00
alsa-pcm.h alsa: handle the case where the driver is destroyed 2024-11-15 16:09:36 +01:00
alsa-seq-bridge.c alsa: improve midi port.name 2024-08-26 13:42:09 +02:00
alsa-seq.c profiler: add followerClock block 2024-10-09 11:31:54 +02:00
alsa-seq.h alsa: add UMP support 2024-07-30 09:38:40 +02:00
alsa-udev.c alsa: add option to skip the busy check 2024-03-22 12:42:48 +01:00
alsa.c meson: fix build with missing libudev-devel 2024-02-06 11:49:40 +01:00
alsa.h spa: remove unnecessary indirection for some spa_log_topics 2023-10-06 13:08:24 +00:00
compress-offload-api-util.c alsa-compress-offload: Add device object and udev based autodetection 2023-09-02 08:28:22 +00:00
compress-offload-api-util.h alsa-compress-offload: Add device object and udev based autodetection 2023-09-02 08:28:22 +00:00
compress-offload-api.c alsa-compress-offload-sink: major sink rework 2023-02-24 14:15:13 +01:00
compress-offload-api.h alsa-compress-offload: Add device object and udev based autodetection 2023-09-02 08:28:22 +00:00
meson.build meson: fix build with missing libudev-devel 2024-02-06 11:49:40 +01:00
test-hw-params.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
test-timer.c fix compilation some more 2024-06-18 15:41:12 +02:00