Skip to contentSkip to conversation

conf: discover bundled configuration beside the loaded shared library

DISCUSSION GitHub pull_request - opened 1 participant 1 message Nov 2 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): alsa-project/alsa-lib/pr/[email protected]

#1 lore raw

alsa-project/alsa-lib pull request #540 was opened from Robolightning:

When a shared ALSA library is distributed with its original configuration tree, the compiled build-machine data directory may be unavailable after relocation. Resolve a readable alsa-config/alsa.conf beside the actually loaded DSO before falling back to the compiled directory. An absolute explicit ALSA_CONFIG_DIR keeps precedence.

Cache an owned path with pthread_once. Resolve the DSO from a static local function address so another globally loaded libasound cannot substitute the lookup target. This does not mutate process environment variables or change PCM plugins, exported symbols, or compiled-directory fallback.

Validated on the v1.2.14 source baseline with the original make check (configuration and MIDI tests), all 1,835 exported SDK symbols unchanged, and real null/plug:null PCM I/O: four threads, 32,768 frames per case. Separate native processes checked relocated default, explicit user directory, compiled fallback, and explicit-handle use alongside an older globally loaded library. The private producer used the existing --enable-symbolic-functions option; no data-symbol binding change is proposed.

The scope is SDK configuration discovery. An unrelated Python extension's external calls can still resolve to an older library explicitly preloaded RTLD_GLOBAL; this change makes no claim to isolate those calls. Physical sound hardware was unavailable.

Request URL : https://github.com/alsa-project/alsa-lib/pull/540
Patch URL : https://github.com/alsa-project/alsa-lib/pull/540.patch
Repository URL: https://github.com/alsa-project/alsa-lib