Re: [Valgrind-users] novice drd user. Errors in std streams

2010-04-07 Thread Bart Van Assche
On Wed, Apr 7, 2010 at 3:32 AM, Jorge Moraleda jorge.moral...@gmail.com wrote: #include pthread.h #include string #include sstream void *threadEntry(void *threadid) {   long tid;   tid = (long)threadid;         std::string myString;         for (int i = 0; i5; i++) {      

[Valgrind-users] Memcheck and a method to find when uninitialized memory gets copied ...

2010-04-07 Thread Oliver Schneider
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi there, looking over the options in memcheck I fail to find one that will immediately issue an error as soon as I copy uninitialized memory. E.g. I have a buffer (const char* buf) bigger than the data I read, so only n Bytes out of n+m Bytes have

Re: [Valgrind-users] Memcheck and a method to find when uninitialized memory gets copied ...

2010-04-07 Thread Tom Hughes
On 07/04/10 20:15, Oliver Schneider wrote: Or perhaps there is a good reason why Valgrind doesn't have that (given I am not blind and the option truly doesn't exist). The good reason is that right back when valgrind was started experimentation showed that it produced far too many false

Re: [Valgrind-users] Memcheck and a method to find when uninitialized memory gets copied ...

2010-04-07 Thread Julian Seward
On Wednesday 07 April 2010, Tom Hughes wrote: On 07/04/10 20:15, Oliver Schneider wrote: Or perhaps there is a good reason why Valgrind doesn't have that (given I am not blind and the option truly doesn't exist). The good reason is that right back when valgrind was started experimentation

Re: [Valgrind-users] novice drd user. Errors in std streams

2010-04-07 Thread Jorge Moraleda
I found the following bug-report against gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40518 It seems that the problem is fixed in gcc 4.5. Until it is released, I added code to my application to not clear empty strings, and it seems to solve all the these problems. Thank you very