Boost logo

Boost Users :

Subject: [Boost-users] [atomic] ThreadSanitizer reports a data race when using the code from "reference counting" example
From: Adam Romanek (romanek.adam_at_[hidden])
Date: 2014-06-29 15:16:45

Hi Boosters!

I'd like to draw your attention to an issue with Boost.Atomic that I
encountered when using ThreadSanitizer. The problem is that when using
the code shown in "reference counting" example [1] from the docs, the
ThreadSanitizer reports a data race. Everything is described in detail
in a StackOverflow thread [2] so I don't want to repeat all that here.

Please help me determine whether it's a false positive, an issue in
Boost.Atomic or a wrong usage of the code.

Additionally, I don't understand this:

Write of size 1 at 0x7d040000f7f0 by thread T2:
     #0 operator delete(void*) <null>:0 (a.out+0x00000004738b)

What kind of write does ThreadSanitizer might refer to?

Adam Romanek


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at