stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Teleman <>
Subject Re: STDCXX-1056 [was: Re: STDCXX forks]
Date Mon, 17 Sep 2012 02:15:59 GMT
On Sun, Sep 16, 2012 at 7:44 PM, Liviu Nicoara <> wrote:

> Unfortunately, can't do the same here. Could you please refresh my memory
> what does the patch contain? This patch is not part of the patch set you
> published here earlier (

It's not *quite* that one. I completely removed the test for the
(_C_flags &) and instead do this:

 template <class _CharT>
inline string numpunct<_CharT>::grouping () const

    return do_grouping();

[ etc etc etc ] for all the public interfaces.

This is, essentially, your perfect forwarding patch with a mutex lock
plastered on top.

> If that is the case I would not ascribe much importance to these numbers.

I cannot simply discount the race conditions reported by a thread
analyzer. The fact that it happens to be the SunPro thread analyzer is
not that important to me (although I know it to be quite accurate). I
am aware that all thread analyzers report false positives.

What causes me concern are two things:

1. the fact that the number of race conditions reported drops by a
factor of 10 when mutex locking is applied. This can't be just a
timing change coincidence caused by changes in scheduling.

2. an out-of-line virtual function call is not (AFAIK) a thread
concurrency synchronization primitive.

But, I am also unwilling to give SunPro infallible status. So, here
are the results for the same exact test cases, this time from the
Intel Inspector 2003:

1. no mutex locking (with your perfect forwarding patch);

2. mutex locking (your perfect forwarding patch, preceded by mutex
lock plastered on top), in every public interface function:

These are Inspector XE 2013 binary blobs which can be opened by the
Intel inspector: /opt/intel/inspector_xe_2013/bin64/inspxe-gui (if
it's installed in /opt/intel).

These blobs contain the source files as well.

The results reported by Intel are very similar to those reported by SunPro.


Stefan Teleman
KDE e.V.

View raw message