]> sourceware.org Git - glibc.git/commitdiff
nptl: Preserve error in setxid thread broadcast in coredumps [BZ #22153]
authorPeter Zelezny <peter.zelezny@dektech.com.au>
Fri, 13 Oct 2017 20:49:49 +0000 (22:49 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 13 Oct 2017 20:51:56 +0000 (22:51 +0200)
ChangeLog
nptl/allocatestack.c

index 5effbd7956593cc242800e9c9afb6e5acb8e0c0b..9121cf66d9f7fc8dbafce936c79e361912c3ef1f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-10-13  Peter Zelezny  <peter.zelezny@dektech.com.au>
+
+       [BZ #22153]
+       * nptl/allocatestack.c (__nptl_setxid_error): Preserve error code
+       in coredumps.
+
 2017-10-13  James Clarke  <jrtc27@jrtc27.com>
 
        * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela):
index 196371a88fbec857d808a238814a217b193c669d..ad9add8d2a7b10d6d1d9cc750c71ce6b42b61a57 100644 (file)
@@ -1105,8 +1105,13 @@ __nptl_setxid_error (struct xid_command *cmdp, int error)
       if (olderror == error)
        break;
       if (olderror != -1)
-       /* Mismatch between current and previous results.  */
-       abort ();
+       {
+         /* Mismatch between current and previous results.  Save the
+            error value to memory so that is not clobbered by the
+            abort function and preserved in coredumps.  */
+         volatile int xid_err __attribute__((unused)) = error;
+         abort ();
+       }
     }
   while (atomic_compare_and_exchange_bool_acq (&cmdp->error, error, -1));
 }
This page took 0.083985 seconds and 5 git commands to generate.