[SDL] SDL Audio Memory Errors

Pierre Phaneuf pphaneuf at gmail.com
Tue Jun 2 01:29:56 PDT 2009


On Tue, Jun 2, 2009 at 4:17 AM, shree 0987 <shr0987 at gmail.com> wrote:

> I understand that Valgrind will show me a bunch of stuff that I could
> investigate later. But with such a simple program, I would expect zero
> errors. When I run as you suggest (without leak checking), I get:
>
> ==26419== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 69 from 2)
> ==26419==
> ==26419== 2 errors in context 1 of 1:
> ==26419== Syscall param semctl(IPC_SET, arg.buf) points to uninitialised
> byte(s)

That's a good example of one of those rare false positives. The
content pointed at by arg.buf is not all used, only certain parts, but
Valgrind sees a system call that takes a struct of a certain size be
passed in, and that only some bytes are actually initialized, so it
calls it out, because it doesn't necessarily knows that the fields
needed for that *particular* call are all initialized.

For those cases, using a suppression file entry is probably your best bet.

-- 
http://pphaneuf.livejournal.com/



More information about the SDL mailing list