On Thursday, January 26, 2012, David Henningsson wrote:
> Hi,
> 
> I'm trying to run PulseAudio under valgrind, and I think valgrind is
> reporting a false positive; i e, it reports "Conditional jump or move
> depend on uninitialised value(s)" where in fact the value seems to be
> perfectly initialised and correct.
> 
> I've tracked it down to function snd_ctl_hw_elem_tlv in alsa-lib [1]. As
> you can see, if the ioctl command is SNDRV_CTL_IOCTL_TLV_READ, the
> kernel writes X bytes into output, where X = 4 * sizeof(unsigned int) +
> the number in output[3] (if output is an array of unsigned ints).
> 
> I'm a little unsure of how to proceed with this?

You need to mess with PRE(sys_ioctl) and POST(sys_ioctl) in
syswrap-linux.c.  The PRE wrapper needs to check that the 
written (by the kernel) area is addressible, using PRE_MEM_WRITE.
The POST wrapper needs to mark the data written after the
call using POST_MEM_WRITE.

See top level README_MISSING_SYSCALL_OR_IOCTL for more details.
Unfortunately both PRE(sys_ioctl) and POST(sys_ioctl) are not
entirely straightforward, due to the vast number and variety of
ioctls available.

J

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to