]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/54172 (__cxa_guard_acquire thread-safety issue)
authorJakub Jelinek <jakub@redhat.com>
Tue, 11 Sep 2012 15:22:54 +0000 (17:22 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 11 Sep 2012 15:22:54 +0000 (17:22 +0200)
PR libstdc++/54172
* libsupc++/guard.cc (__cxa_guard_acquire): Fix up the last
argument of the first __atomic_compare_exchange_n.

From-SVN: r191190

libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/guard.cc

index 4ecedf818bd1326ed8425400dad7dcb504bc6bb5..3c53345173d30d0ce15980cb0cc50e3e465e769f 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR libstdc++/54172
+       * libsupc++/guard.cc (__cxa_guard_acquire): Fix up the last
+       argument of the first __atomic_compare_exchange_n.
+
 2012-09-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>
            Jonathan Wakely  <jwakely.gcc@gmail.com>
 
index 60165cdecb459a72655f30a5d04c1987590c6a70..f8550c03fae1e8cef2c3dd7b83c51bdfbf24f27e 100644 (file)
@@ -253,7 +253,7 @@ namespace __cxxabiv1
            int expected(0);
            if (__atomic_compare_exchange_n(gi, &expected, pending_bit, false,
                                            __ATOMIC_ACQ_REL,
-                                           __ATOMIC_RELAXED))
+                                           __ATOMIC_ACQUIRE))
              {
                // This thread should do the initialization.
                return 1;