valgrind stuff

Brandon Black blblack at gmail.com
Wed Apr 9 23:23:41 CEST 2008


Brandon Black wrote:

> Sorry maybe I wasn't clear.  Those error messages I pasted are a 
> completely separate issue from the realloc thing.  I tracked it down now 
> to the point that I can interpret the messages (and exactly when they 
> occur) as meaning: when poll_poll() is called, the 0th member of the 
> poll set, which is the read side of the pipe that's set up for signals 
> and such, has an "revents" member which is uninitialized memory, and 
> poll_poll() is making decisions based on reading that ununitialized 
> memory.  The reason I don't see any worse behavior is that even though 
> it's "uninitialized", being an early allocation it tends to be zero'd 
> out anyways by chance.
> 

Well now that I re-read what I just wrote, it finally sunk in that this 
is "revents" not "events", and it's probably(?) up to the kernel to 
initialize that.  Valgrind must be at fault here somehow, I suspect.

-- Brandon



More information about the libev mailing list