This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.28.9000-108-gd330f31


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d330f31af68f96dde82840d1e9343b479a8c179e (commit)
      from  2bda273aa37e47bb5afdaf122605440391dac7c5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d330f31af68f96dde82840d1e9343b479a8c179e

commit d330f31af68f96dde82840d1e9343b479a8c179e
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Thu Aug 30 11:01:33 2018 -0400

    Fix test failure with -DNDEBUG.
    
    The elf/tst-dlopen-aout.c test uses asserts to verify properties of the
    test execution.  Instead of using assert it should use xpthread_create
    and xpthread_join to catch errors starting the threads and fail the
    test.  This shows up in Fedora 28 when building for i686-pc-linux-gnu
    and using gcc 8.1.1.
    
    Tested on i686, and fixes a check failure with -DNDEBUG.
    
    Signed-off-by: Carlos O'Donell <carlos@redhat.com>

diff --git a/ChangeLog b/ChangeLog
index b3689a6..21d9141 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-30  Carlos O'Donell  <carlos@redhat.com>
+
+	* elf/tst-dlopen-aout.c: Include support/xthread.h. Use
+	xpthread_create and xpthread_join.
+
 2018-08-30  Florian Weimer  <fweimer@redhat.com>
 
 	* stdlib/stdlib.h (reallocarray): Make available under __USE_MISC.
diff --git a/elf/tst-dlopen-aout.c b/elf/tst-dlopen-aout.c
index 9038e20..b026451 100644
--- a/elf/tst-dlopen-aout.c
+++ b/elf/tst-dlopen-aout.c
@@ -27,6 +27,7 @@
 #include <dlfcn.h>
 #include <stdio.h>
 #include <pthread.h>
+#include <support/xthread.h>
 
 __thread int x;
 
@@ -45,7 +46,6 @@ do_test (int argc, char *argv[])
     {
       pthread_t thr;
       void *p;
-      int rc;
 
       p = dlopen (argv[0], RTLD_LAZY);
       if (p != NULL)
@@ -53,11 +53,11 @@ do_test (int argc, char *argv[])
           fprintf (stderr, "dlopen unexpectedly succeeded\n");
           return 1;
         }
-      rc = pthread_create (&thr, NULL, fn, NULL);
-      assert (rc == 0);
-
-      rc = pthread_join (thr, NULL);
-      assert (rc == 0);
+      /* We create threads to force TLS allocation, which triggers
+	 the original bug i.e. running out of surplus slotinfo entries
+	 for TLS.  */
+      thr = xpthread_create (NULL, fn, NULL);
+      xpthread_join (thr);
     }
 
   return 0;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |    5 +++++
 elf/tst-dlopen-aout.c |   12 ++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]