]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Merge branch 'master' of ssh://sourceware.org/git/glibc
authorThorsten Kukuk <kukuk@thkukuk.de>
Tue, 21 Mar 2017 15:47:00 +0000 (16:47 +0100)
committerThorsten Kukuk <kukuk@thkukuk.de>
Tue, 21 Mar 2017 15:47:00 +0000 (16:47 +0100)
Conflicts:
ChangeLog

ChangeLog
malloc/tst-interpose-aux.c

index f500b833def379fc393a0c4aec3200d1aa73ca01..c292a5bf29347e51622bb043198bfaa18bbb3faa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * nis/nis_subr.c: Likewise.
        * nis/nis_verifygroup.c: Likewise.
 
+2017-03-21  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * malloc/tst-interpose-aux.c (check_for_allocations):
+       Move compiler barrier before free.
+
 2017-03-20  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #21279]
index e80e979299854be54a6ce090059bbcde21a135bc..68282b41d5c03437e954925e915ebe23ea7ca8b7 100644 (file)
@@ -113,11 +113,11 @@ check_for_allocations (void)
     {
       /* Make sure that malloc is called at least once from libc.  */
       void *volatile ptr = strdup ("ptr");
-      free (ptr);
       /* Compiler barrier.  The strdup function calls malloc, which
          updates allocation_index, but strdup is marked __THROW, so
          the compiler could optimize away the reload.  */
       __asm__ volatile ("" ::: "memory");
+      free (ptr);
       /* If the allocation count is still zero, it means we did not
          interpose malloc successfully.  */
       if (allocation_index == 0)