From: GitHub pull_request - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: async: fix snd_async_del_handler for TIMER type
Date: Tue, 15 Sep 2026 13:50:28 +0200 (CEST) [thread overview]
Message-ID: <18d57c3c6a708c00-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <alsa-project/alsa-lib/pr/525@alsa-project.org>
alsa-project/alsa-lib pull request #525 was opened from LilyKing2026:
## Problem
`snd_async_del_handler()` has two switch statements that handle `PCM` and `CTL` handler types, but not `TIMER`. When a TIMER type handler is deleted, both switches fall through to `default` and trigger `assert(0)`, crashing any program that uses `snd_async_add_timer_handler()`.
## Reproduction
On Ubuntu 26.04 (alsa-lib 1.2.15.3), running `selftests/alsa/utimer-test`:
`global-timer: async.c:166: snd_async_del_handler: Assertion '0' failed.`
`Aborted (core dumped)`
## Fix
- Add the missing `SND_ASYNC_HANDLER_TIMER` cases to both switches in `src/async.c`
- Include `timer/timer_local.h` to access the members of `struct _snd_timer`
## Testing
After rebuilding and installing alsa-lib, `utimer-test` changes from FAIL to PASS:
`# PASSED: 2 / 2 tests passed.`
Request URL : https://github.com/alsa-project/alsa-lib/pull/525
Patch URL : https://github.com/alsa-project/alsa-lib/pull/525.patch
Repository URL: https://github.com/alsa-project/alsa-lib
parent reply other threads:[~2026-09-15 11:51 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <alsa-project/alsa-lib/pr/525@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=18d57c3c6a708c00-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox