Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tanu Kaskinen <tanuk@iki.fi>
To: alsa-devel@alsa-project.org
Subject: Segfaults in snd_pcm_area_silence() when using softvol
Date: Wed, 17 Oct 2012 14:54:52 +0300	[thread overview]
Message-ID: <1350474892.6596.24.camel@x230> (raw)

Hi,

A bug was reported to pulseaudio about a segfault in alsa-lib code when
using softvol: https://bugs.freedesktop.org/show_bug.cgi?id=51060 . It
has been observed by several people, and this mail was prompted by the
last bug comment, which rightly recommends getting in touch with the
alsa developers:


> I've had this problem too and the problem only occurs with
> -ftree-vectorize.
> 
> It looks to me as if this is a gcc bug, as it produces a "movdqa" or
> "vmovdqa" instruction which is used with an unaligned pointer.
> 
> Now, I have no clue why gcc assumes the pointer would be an aligned
> one, maybe it is even right and something else is wrong, but I haven't
> spent too much time digging into this.
> 
> (note that it still happens with gcc 4.7 and the current 4.8
> development one)
> 
> Also, this bug should probably be brought up with the alsa guys as
> well, as I don't think pulseaudio is at fault here.


Here's the stack trace for your convenience (see the linked bug for more
details)

#0  snd_pcm_area_silence (dst_area=0x7fffe875bb00, dst_offset=<optimized out>, samples=2, 
    format=SND_PCM_FORMAT_S16_LE) at pcm.c:2549
#1  0x00007fffe87b4398 in snd_pcm_areas_silence (dst_areas=0x5555557fa100, 
    dst_offset=891, channels=2, frames=439, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2662
#2  0x00007fffe87f9bdb in softvol_convert_stereo_vol (svol=0x555555813cf0, 
    dst_areas=0x5555557fa0e0, dst_offset=891, src_areas=0x5555557fa0e0, 
    src_offset=<optimized out>, channels=2, frames=439) at pcm_softvol.c:286
#3  0x00007fffe87fae58 in snd_pcm_softvol_write_areas (pcm=0x55555581db60, 
    areas=0x5555557fa0e0, offset=891, size=439, slave_areas=0x5555557fa0e0, 
    slave_offset=891, slave_sizep=0x7fffe875bcd0) at pcm_softvol.c:607
#4  0x00007fffe87c6fc7 in snd_pcm_plugin_mmap_commit (pcm=0x55555581db60, 
    offset=<optimized out>, size=439) at pcm_plugin.c:424
#5  0x00007fffe87b9676 in snd_pcm_mmap_commit (pcm=<optimized out>, 
    offset=<optimized out>, frames=<optimized out>) at pcm.c:6584
#6  0x00007fffe8a74876 in mmap_write (on_timeout=false, polled=false, 
    sleep_usec=<synthetic pointer>, u=0x5555557e6d40) at modules/alsa/alsa-sink.c:636
#7  thread_func (userdata=0x5555557e6d40) at modules/alsa/alsa-sink.c:1694
#8  0x00007ffff722c039 in internal_thread_func (userdata=0x55555587ef80)
    at pulsecore/thread-posix.c:83
#9  0x00007ffff4a24e2c in ?? () from /lib64/libpthread.so.0
#10 0x00007ffff3ccc1dd in clone () from /lib64/libc.so.6

-- 
Tanu

             reply	other threads:[~2012-10-17 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 11:54 Tanu Kaskinen [this message]
2014-05-18 15:02 ` Segfaults in snd_pcm_area_silence() when using softvol Weedy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350474892.6596.24.camel@x230 \
    --to=tanuk@iki.fi \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox