OSDN Git Service

Fix a structure initialisation in pthread_exit().
authorAnton Kirilov <anton.kirilov@linaro.org>
Fri, 19 Feb 2016 18:19:08 +0000 (18:19 +0000)
committerElliott Hughes <enh@google.com>
Fri, 26 Feb 2016 04:49:15 +0000 (20:49 -0800)
The purpose of this change is to silence Valgrind's warning about a
syscall parameter pointing to uninitialised bytes.

Change-Id: I2737235f9ac288dbc8ec4be0c6f1cef181c9b7d7

libc/bionic/pthread_exit.cpp

index ceda931..6b68bb7 100644 (file)
@@ -81,8 +81,7 @@ void pthread_exit(void* return_value) {
 
   if (thread->alternate_signal_stack != NULL) {
     // Tell the kernel to stop using the alternate signal stack.
-    stack_t ss;
-    ss.ss_sp = NULL;
+    stack_t ss = {};
     ss.ss_flags = SS_DISABLE;
     sigaltstack(&ss, NULL);