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

2010-05-08 Thread Bart Van Assche
On Wed, Apr 21, 2010 at 3:40 AM, Jorge Moraleda jorge.moral...@gmail.com wrote: Hello Jorge, Unfortunately not all libraries have been designed with data-race detection tools in mind. Several libraries contain code that triggers benign data races. Examples are the I/O code in libstdc++ and in

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

2010-04-20 Thread Jorge Moraleda
Hello Jorge, Unfortunately not all libraries have been designed with data-race detection tools in mind. Several libraries contain code that triggers benign data races. Examples are the I/O code in libstdc++ and in libc. You can either create a suppression pattern to suppress the above

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++) {      

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

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

2010-04-06 Thread Bart Van Assche
On Tue, Apr 6, 2010 at 7:53 AM, Jorge Moraleda jorge.moral...@gmail.com wrote: Dear all, When I compile the following program with: $ g++ -g -pthread threads.cpp // begin program / // file: threads.cpp #include pthread.h #include iostream

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

2010-04-06 Thread Konstantin Serebryany
On Tue, Apr 6, 2010 at 2:17 PM, Bart Van Assche bvanass...@acm.org wrote: On Tue, Apr 6, 2010 at 7:53 AM, Jorge Moraleda jorge.moral...@gmail.com wrote: Dear all, When I compile the following program with: $ g++ -g -pthread threads.cpp // begin program

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

2010-04-06 Thread Bart Van Assche
On Tue, Apr 6, 2010 at 12:25 PM, Konstantin Serebryany konstantin.s.serebry...@gmail.com wrote: On Tue, Apr 6, 2010 at 2:17 PM, Bart Van Assche bvanass...@acm.org wrote: On Tue, Apr 6, 2010 at 7:53 AM, Jorge Moraleda jorge.moral...@gmail.com wrote: Dear all, When I compile the

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

2010-04-06 Thread Jorge Moraleda
On Tue, Apr 6, 2010 at 3:30 AM, Bart Van Assche bvanass...@acm.org wrote: On Tue, Apr 6, 2010 at 12:25 PM, Konstantin Serebryany konstantin.s.serebry...@gmail.com wrote: On Tue, Apr 6, 2010 at 2:17 PM, Bart Van Assche bvanass...@acm.org wrote: On Tue, Apr 6, 2010 at 7:53 AM, Jorge Moraleda

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

2010-04-06 Thread Jorge Moraleda
#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++) {                 myString.clear();                 pthread_yield();         }        

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

2010-04-06 Thread Konstantin Serebryany
The race on _M_mutate is (most likely) the one discussed at http://permalink.gmane.org/gmane.comp.debugging.valgrind/10043 http://permalink.gmane.org/gmane.comp.debugging.valgrind/10043--kcc On Tue, Apr 6, 2010 at 4:14 PM, Jorge Moraleda jorge.moral...@gmail.comwrote: On Tue, Apr 6, 2010 at

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

2010-04-05 Thread Jorge Moraleda
Dear all, When I compile the following program with: $ g++ -g -pthread threads.cpp // begin program / // file: threads.cpp #include pthread.h #include iostream #include sstream void *threadEntry(void *threadid) {   long tid;   tid = (long)threadid;