On 01/01/2015 06:03 PM, Tom Hughes wrote: > Surely the easy fix is to fix your program to stop it trying to read > from an invalid file descriptor? Surely that is a bug that you will want > to fix anyway?
Yes. I've printed the fd value and it goes from 13 to 29541 with no deliberate function overwriting it. One thing that I find strange is why didn't valgrind detect the instruction that overwrote the fd? If I use a watch in gdb to catch this change, it does not occur. Also, fd is a private member variable. If I make it public, this does not happen. Also, if I compile with clang instead of gcc, this does not happen. I'm trying to analyze this, but I'm not still sure from which code or tool the error might be coming. Any hints? Thanks. -- João M. S. Silva ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users