]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't use catomic functions in mcount (BZ #16912)
authorAndreas Schwab <schwab@suse.de>
Tue, 6 May 2014 09:55:24 +0000 (11:55 +0200)
committerAndreas Schwab <schwab@suse.de>
Tue, 6 May 2014 14:30:48 +0000 (16:30 +0200)
mcount cannot use catomic functions since it is called by
__libc_start_main before TLS is set up.  This reverts the change made by
commit 8099361.

ChangeLog
NEWS
gmon/mcount.c

index 64d9ed71bb6273be4b8428d69050fb01bd6fd71d..6ccf04111bf368bdbd4d8edd1c5d48e55dc25321 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-05-06  Andreas Schwab  <schwab@suse.de>
+
+       [BZ #16912]
+       * gmon/mcount.c (_MCOUNT_DECL): Use
+       atomic_compare_and_exchange_bool_acq instead of
+       catomic_compare_and_exchange_bool_acq.
+
 2014-05-05  Roland McGrath  <roland@hack.frob.com>
 
        * elf/Makefile (others, install-bin): Remove pldd.
diff --git a/NEWS b/NEWS
index 1351c01e23c8c7682f456d01a315bf4c407b7733..47c951bf8817186058116e2bde7b0a4f9e59dd2a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ Version 2.20
   16677, 16680, 16683, 16689, 16695, 16701, 16706, 16707, 16712, 16713,
   16714, 16731, 16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770,
   16786, 16789, 16791, 16799, 16800, 16815, 16823, 16824, 16831, 16838,
-  16854, 16885, 16888, 16890.
+  16854, 16885, 16888, 16890, 16912.
 
 * The minimum Linux kernel version that this version of the GNU C Library
   can be used with is 2.6.32.
index 0c2acd2890dd7ed9795b081fa300dbb2fbdafac2..9d4a1a50fa6ab21af97293c4ec59a199c06f0a5d 100644 (file)
@@ -69,8 +69,8 @@ _MCOUNT_DECL(frompc, selfpc)  /* _mcount; may be static, inline, etc */
         * check that we are profiling
         * and that we aren't recursively invoked.
         */
-       if (catomic_compare_and_exchange_bool_acq (&p->state, GMON_PROF_BUSY,
-                                                  GMON_PROF_ON))
+       if (atomic_compare_and_exchange_bool_acq (&p->state, GMON_PROF_BUSY,
+                                                 GMON_PROF_ON))
          return;
 
        /*