Skip to content

ubsan: runtime error: variable length array bound evaluates to non-positive value 0 #505

@pobrn

Description

@pobrn

While testing pipewire with a sanitized build of alsa-lib, the following is reported:

Details
/pipewire/subprojects/alsa/src/pcm/pcm.c:7827:4: runtime error: variable length array bound evaluates to non-positive value 0
    #0 0x7b5f909a1e7d in snd_pcm_slave_conf (/pipewire/build/subprojects/alsa/dist/usr/lib/libasound.so.2+0x5a1e7d) (BuildId: 2137baa0902bc081fc7d45192f387a7550800d43)
    #1 0x7b5f90a9e29c in _snd_pcm_empty_open (/pipewire/build/subprojects/alsa/dist/usr/lib/libasound.so.2+0x69e29c) (BuildId: 2137baa0902bc081fc7d45192f387a7550800d43)
    #2 0x7b5f9098bd9a in snd_pcm_open_conf (/pipewire/build/subprojects/alsa/dist/usr/lib/libasound.so.2+0x58bd9a) (BuildId: 2137baa0902bc081fc7d45192f387a7550800d43)
    #3 0x7b5f9098c78e in snd_pcm_open_noupdate (/pipewire/build/subprojects/alsa/dist/usr/lib/libasound.so.2+0x58c78e) (BuildId: 2137baa0902bc081fc7d45192f387a7550800d43)
    #4 0x7b5f9098c9d4 in snd_pcm_open (/pipewire/build/subprojects/alsa/dist/usr/lib/libasound.so.2+0x58c9d4) (BuildId: 2137baa0902bc081fc7d45192f387a7550800d43)
    #5 0x7b5f91ccdf07 in pa_alsa_open_by_device_string ../spa/plugins/alsa/acp/alsa-util.c:716
[...]

While this is probably generally harmless in practice, if there is a simple change to avoid it, it would be nice to have it fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions