>
>
> > 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 much.
>
> Thanks for the gcc bugzilla link -- that bug report is interesting.
> Since the races on _S_empty_rep_storage are false positives, it is
> safe to suppress these races. You can suppress these races using the
> following dirty hack:
> * add #include "drd/drd.h" in the same source file that contains the
> main() function.
> * add the following code near the beginning of the main() function:
>
>    extern char _ZNSs4_Rep20_S_empty_rep_storageE[32];
>    DRD_IGNORE_VAR(_ZNSs4_Rep20_S_empty_rep_storageE);
>
> The above two statements tell DRD to ignore all load and store
> operations in the 32-byte address range starting at
> &std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >::_Rep::_S_empty_rep_storage.
>
> Note: from Valgrind 3.6.0 on DRD will support the
> ANNOTATE_BENIGN_RACE_SIZED() macro. This macro does the same as
> DRD_IGNORE_VAR() but has an explicit size argument.
>
> Bart.
>

Thank you. The "dirty trick" was very handy! I am no longer getting any
strange race condition reports. Regards,

Jorge
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to