diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-09-11 17:22:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-09-11 17:22:54 +0200 |
commit | 635442bfd859e2629711596be1471f6d70006de6 (patch) | |
tree | 95c3b09d64b39746331650638be0ae486e038ebc | |
parent | 6211feb0ffbc3d594796f8e63b174ff48dc4a64c (diff) | |
download | gcc-635442bfd859e2629711596be1471f6d70006de6.zip gcc-635442bfd859e2629711596be1471f6d70006de6.tar.gz gcc-635442bfd859e2629711596be1471f6d70006de6.tar.bz2 |
re PR libstdc++/54172 (__cxa_guard_acquire thread-safety issue)
PR libstdc++/54172
* libsupc++/guard.cc (__cxa_guard_acquire): Fix up the last
argument of the first __atomic_compare_exchange_n.
From-SVN: r191190
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/guard.cc | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4ecedf8..3c53345 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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> diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc index 60165cd..f8550c0 100644 --- a/libstdc++-v3/libsupc++/guard.cc +++ b/libstdc++-v3/libsupc++/guard.cc @@ -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; |