All of lore.kernel.org
 help / color / mirror / Atom feed
* valgrind and alsa
@ 2005-02-24  8:46 Charles "Buck" Krasic
  2005-02-24 20:58 ` Takashi Iwai
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Charles "Buck" Krasic @ 2005-02-24  8:46 UTC (permalink / raw)
  To: alsa-devel

[-- 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-02-25  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-24  8:46 valgrind and alsa Charles "Buck" Krasic
2005-02-24 20:58 ` Takashi Iwai
2005-02-25  2:57 ` Glenn Maynard
2005-02-25  8:16 ` Clemens Ladisch

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.