All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Charles \"Buck\" Krasic" <krasic@cs.ubc.ca>
To: alsa-devel@lists.sourceforge.net
Subject: valgrind and alsa
Date: Thu, 24 Feb 2005 00:46:58 -0800	[thread overview]
Message-ID: <421D9482.3090807@cs.ubc.ca> (raw)

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

Hi,

I'm new to alsa development.   I have just implemented native alsa 
support in an application I've developed (a streaming video system).   
When checking my application with valgrind,  valgrin generates numerous 
alsa related warnings.   They all seem to originate from a single 
problem in my initial call to snd_pcm_writei.  Basically valgrind 
doesn't like that alsa is making an ioctl with unitialized data.  The 
following patch fixed the problem for me, it's just a one liner add the 
missing initializtion.

Cheers,

-- Buck

[-- Attachment #2: alsalib.patch --]
[-- Type: text/x-patch, Size: 365 bytes --]

--- pcm_hw.c-old	2005-02-24 00:36:02.906722553 -0800
+++ pcm_hw.c	2005-02-24 00:35:37.390399025 -0800
@@ -664,6 +664,7 @@
 	struct sndrv_xferi xferi;
 	xferi.buf = (char*) buffer;
 	xferi.frames = size;
+	xferi.result = 0;
 	err = ioctl(fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &xferi);
 	err = err >= 0 ? sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL) : -errno;
 #ifdef DEBUG_RW

             reply	other threads:[~2005-02-24  8:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24  8:46 Charles "Buck" Krasic [this message]
2005-02-24 20:58 ` valgrind and alsa Takashi Iwai
2005-02-25  2:57 ` Glenn Maynard
2005-02-25  8:16 ` Clemens Ladisch

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=421D9482.3090807@cs.ubc.ca \
    --to=krasic@cs.ubc.ca \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.