On Mon, Sep 24, 2012 at 10:03 PM, Martin Sebor <mse...@gmail.com> wrote: > FWIW, there are race conditions in stdcxx. Some of them are by > design and benign on the systems the library runs on (although > I acknowledge that some others may be bugs). One such benign > date race is: > > time T1 T2 > 0 x = N > 1 x = N read x > > where x is a scalar that can be accessed atomically by the CPU > and the compiler. > > I think some of the lazy facet initialization falls under this > class. It would be nice to fix them but only if it doesn't slow > things down. The others need to be fixed in any case.
The race conditions I am talking about are not benign. I've uploaded a full thread analyzer output for 22.locale.numpunct.mt showing dataraces here: http://s247136804.onlinehome.us/stdcxx-1056-malign/22.locale.numpunct.mt.2.er.tar.bz2 The name of the analyzer results directory is 22.locale.numpunct.mt.2.er You will need the SunPro Linux 12.3 Thread Analyzer installed, which comes with SunPro anyway. The analyzer itself is ${PATH_TO_SUN_PRO_INSTALL}/bin/analyzer There's a screenshot from the same Analyzer output here: http://s247136804.onlinehome.us/stdcxx-1056-malign/sunpro_thread_analyzer_screenshot.jpg taken just now on my laptop. The report itself is from a couple of days ago, and it's from a run with only the _numpunct.h patch applied. No patches to either facet.cpp, punct.cpp or locale_body.cpp. It shows the types of race conditions it's reporting: these are read/write race conditions, not read/read. The thread analyzer's html filter doesn't show the types of races reported as clearly as the command-line analyzer which has a windowing GUI. At any rate you can see the same exact type of race conditions being reported by the Intel Inspector 2013 Thread Analyzer. -- Stefan Teleman KDE e.V. stefan.tele...@gmail.com