[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-dev] mission drift proposal #2 -- C++0x memory model
Oh yeah, I never think about c1x (I think because so few compilers are
We'd definitely want to target both the c1x and c++0x/1x concurrency stuff.
On 06/09/2011 04:41 PM, Derek M Jones wrote:
I don't know anything about C++, so I don't know how similar the
are, but it would be great if what you generated could be used for C as
well. C1X has atomics with different kinds of memory ordering
and of course threads with locks and mutexes.
WG14 and WG21 worked closely together to make sure that the
common subset was compatible.
There were some last minute tweaks at he WG14 meeting in London a
couple of months ago.
On Thu, Jun 9, 2011 at 3:34 PM, John Regehr<firstname.lastname@example.org> wrote:
It looks like some compilers (for example GCC) are not too far from
ready to try to comply with the C++0x memory model. This will be a
and they do not yet fully understand how this model will interact
optimizer. It's fair to say that most other C++ compilers will be
into similar issues in coming years. We can help by adding C++0x memory
model constructs to the set of things Csmith can emit.
Note that I'm not suggesting that we emit "interesting" C++, which is a
very big job. Rather, we can emit C++ that looks very much like C but
contains locks, atomics, volatiles, etc. I can't imagine there's
difficult about this, given the infrastructure we already have.
Hans Boehm has an excellent slide deck on what can go wrong when
this sort of code:
The problem of determining the correctness of a compiler's
translation of a
piece of code containing C++0x concurrency primitives is not trivial,
basically it's not our problem. There exist (or will exist) some smart
checking tools for this sort of thing.