Skip to contentSkip to conversation

alsa-lib TLVs and valgrind

DISCUSSION Sebastian H. 2 participants 5 messages Feb 2, 2011

lore
Share & tools
lore
#0 lore raw

Hello list

I'm about to release a new version of alsamixer-qt4 (now named qasmixer) and ran the program through valgrind.

valgrind --track-origins=yes src/qasmixer &> valgrind.log

The log file contains tons of warnings like this

==3432== Conditional jump or move depends on uninitialised value(s)
...
... (qasmixer function calls)
...
==3432== Uninitialised value was created by a heap allocation ... malloc (vg_replace_malloc.c:236)
... init_db_range (simple_none.c:1111)
... get_dB_range (simple_none.c:1156)
... get_dB_range_ops (simple_none.c:1173)
... snd_mixer_selem_get_playback_dB_range (simple.c:298)
...
... (qasmixer function calls)
...

The fresh alsa-lib-10-24.1 was used for this, compiled with debug symbols enabled. Drivers are from Debian/squeeze.

This issue doesn't seem critical for the application but it totally floods the valgrind.log file.

Best,
Sebastian Holtermann

#1 lore raw
Quoted 7 lines · Sebastian H.

I'm about to release a new version of alsamixer-qt4 (now named qasmixer) and ran the program through valgrind.

valgrind --track-origins=yes src/qasmixer &> valgrind.log

The log file contains tons of warnings like this

Quoted 10 lines

==3432== Conditional jump or move depends on uninitialised value(s)
...
... (qasmixer function calls)
...
==3432== Uninitialised value was created by a heap allocation ... malloc (vg_replace_malloc.c:236)
... init_db_range (simple_none.c:1111)
... get_dB_range (simple_none.c:1156)
... get_dB_range_ops (simple_none.c:1173)
... snd_mixer_selem_get_playback_dB_range (simple.c:298)

Valgrind doesn't know about some of the ALSA ioctls. Somebody would have to add them to valgrind.

Regards,
Clemens

#2 lore raw

Am 02.02.2011 14:12, schrieb Clemens Ladisch:

Quoted 19 lines
Quoted 7 lines · Sebastian H.

I'm about to release a new version of alsamixer-qt4 (now named qasmixer) and ran the program through valgrind.

valgrind --track-origins=yes src/qasmixer &> valgrind.log

The log file contains tons of warnings like this

Quoted 10 lines

==3432== Conditional jump or move depends on uninitialised value(s)
...
... (qasmixer function calls)
...
==3432== Uninitialised value was created by a heap allocation ... malloc (vg_replace_malloc.c:236)
... init_db_range (simple_none.c:1111)
... get_dB_range (simple_none.c:1156)
... get_dB_range_ops (simple_none.c:1173)
... snd_mixer_selem_get_playback_dB_range (simple.c:298)

Quoted 2 lines

Valgrind doesn't know about some of the ALSA ioctls. Somebody would have to add them to valgrind.

That seems to require quite some effort - also to maintain. Couldn't just the dB min/max values be initialized with 0 or sth.?

Sebastian

#3 lore raw
Quoted 6 lines · Sebastian H.

Am 02.02.2011 14:12, schrieb Clemens Ladisch:

Quoted 2 lines

Valgrind doesn't know about some of the ALSA ioctls. Somebody would have to add them to valgrind.

That seems to require quite some effort - also to maintain. Couldn't just the dB min/max values be initialized with 0 or sth.?

Then it wouldn't be possible for valgrind to catch wrong uses of the ioctl.

Regards,
Clemens

#4 lore raw

Am 02.02.2011 16:12, schrieb Clemens Ladisch:

Quoted 10 lines
Quoted 6 lines · Sebastian H.

Am 02.02.2011 14:12, schrieb Clemens Ladisch:

Quoted 2 lines

Valgrind doesn't know about some of the ALSA ioctls. Somebody would have to add them to valgrind.

That seems to require quite some effort - also to maintain. Couldn't just the dB min/max values be initialized with 0 or sth.?

Then it wouldn't be possible for valgrind to catch wrong uses of the ioctl.

Ok. My knowledge of how valgrind works is limited anyway.

Thank you,
Sebastian