Jörg Sommer <[EMAIL PROTECTED]> wrote:
...
> I know this is a misusage of cat, but cat shouldn't die with SIGSEG
>
> $ cat audio.wav > /dev/dsp
> Segmentation fault
> $ ltrace cat audio.wav > /dev/dsp
...
> malloc(4096)                                     = 0x10015080
> read(3, ",\003", 671089218)                      = 4096
> write(1, "RIFF\364\036l\002WAVEfmt \020", 4096 <unfinished ...>
> +++ killed by SIGSEGV +++

Thanks for the report.
It looks like it malloc'd a 4096-byte buffer, filled it
via read(), and then tried to write() it to standard output.
I don't see how redirecting to /dev/dsp could cause
*cat* to misbehave.  Maybe there's something wrong with
your audio device driver?

Can you investigate further?
If using strace shows the same symptom (write evokes segv)
and `valgrind cat audio.wav > /dev/dsp' reports nothing suspicious,
then I'd try using a different kernel sound set-up.

Reply via email to