valgrind stuff

Marc Lehmann schmorp at schmorp.de
Thu Apr 10 00:45:13 CEST 2008


On Wed, Apr 09, 2008 at 05:34:22PM -0500, Brandon Black <blblack at gmail.com> wrote:
> My reading of that other thread I quoted is basically (a) the standard 
> is self-contradictory

I can't really read that from the thread, and the standard is certainly not
self-contradictory, but certainly very hard to read in some cases (same thing
      was true when ECN was introduced). The posix manpage could be worded
more verbosely, but it is otherwise not contradictory.

Note that 0 indicates success (-1 indicates an error, and timing out is
not a documented error either), so the standard unambigously requires
revents to be initialised when poll returns 0.

standards are not standard english prose, all thats required of them is being
unambigious, not being easy, or obvious.

> (b) some systems definitely don't clear revents 
> when they poll() returns zero

I can't find anything like that in that thread, either, can you point out
where in this thread it says this?

All I can find is that *valgrind* is again buggy. Can you point out where in
the thread those systems are mentioned=

> (what I'm seeing)

Where do you see that revents is non cleared by poll? From what you said
it seems that valgrind says uninitialised memory would be accessed, which
is foremost a bug in valgrind. Did you really see that poll didn't clear
revents?

valgrind is *not* a real system, and it is not gfood for valgrind to flag
corretc code as wrong, that would diminish it's usefulness. so if in fact
it is only valgrind and not e.g. the syswtem you use it on then valgrind
would need to be fixed.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list