This is the mail archive of the libc-alpha@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]

PATCH: Cast to _Unwind_Exception_Class when setting exc.exception_class


Hi,

exc.exception_class is 64-bit.  We should cast to _Unwind_Exception_Class.
Otherwise the upper 32-bits may be undefined.  OK to install?

Thanks.

-- 
H.J.
---
2012-09-18  H.J. Lu  <hongjiu.lu@intel.com>

           * unwind.c (__pthread_unwind): Cast to _Unwind_Exception_Class when
           setting exc.exception_class.

diff --git a/nptl/unwind.c b/nptl/unwind.c
index 7ccb213..ae6ab38 100644
--- a/nptl/unwind.c
+++ b/nptl/unwind.c
@@ -123,7 +123,7 @@ __pthread_unwind (__pthread_unwind_buf_t *buf)
 #ifdef HAVE_FORCED_UNWIND
   /* This is not a catchable exception, so don't provide any details about
      the exception type.  We do need to initialize the field though.  */
-  THREAD_SETMEM (self, exc.exception_class, 0);
+  THREAD_SETMEM (self, exc.exception_class, (_Unwind_Exception_Class) 0);
   THREAD_SETMEM (self, exc.exception_cleanup, unwind_cleanup);

   _Unwind_ForcedUnwind (&self->exc, unwind_stop, ibuf);


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