Skip to contentSkip to conversation

alsamixer crashes with SIGFPE

DISCUSSION Florian Faber 2 participants 4 messages Feb 18, 2010 – Feb 19, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

there are several spots in alsamixer's mixer_display.c that cause SIGFPE through division by zero if (max-min) is zero:

bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max
- min);

value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);

etc.

Flo

Signature · 2 lines
Machines can do the work, so people have time to think.
public key DA43FEF4          x-hkp://wwwkeys.eu.pgp.net
#1 lore raw
Quoted 5 lines · Florian Faber

there are several spots in alsamixer's mixer_display.c that cause SIGFPE through division by zero if (max-min) is zero:

bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max - min); value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);

Thanks. With which hardware do you see this error?

Regards,
Clemens

#2 lore raw

Clemens,

Quoted 4 lines
Quoted 2 lines

bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max - min); value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);

Thanks. With which hardware do you see this error?

I tried it with the hdspm driver after seeing all the complaints about hdsp no longer working with 2.6.32.

Unfortunately cannot look into that as I no longer have hdsp cards around.

Flo

Signature · 2 lines
Machines can do the work, so people have time to think.
public key DA43FEF4          x-hkp://wwwkeys.eu.pgp.net
#3 lore raw
Quoted 7 lines · Florian Faber
Quoted 4 lines
Quoted 2 lines

bar_height = ((volumes[c] - min) * volume_height + max - min - 1) / (max - min); value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);

Thanks. With which hardware do you see this error?

I tried it with the hdspm driver after seeing all the complaints about hdsp no longer working with 2.6.32.

That driver does not appear to have any controls where min==max. Anyway, I've fixed alsamixer.

The hdsp problems are probably caused by the firmware loader change.

Regards,
Clemens