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 _Unwind_GetCFA return to _Unwind_Ptr first


_Unwind_GetCFA returns _Unwind_Word which may be 64bit on targets with
32bit pointers, like x32.  This patch casts _Unwind_GetCFA return to
_Unwind_Ptr first to silence GCC warning.  OK to install?

Thanks.


H.J.
---
2012-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	* unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
	_Unwind_Ptr first.

diff --git a/nptl/unwind.c b/nptl/unwind.c
index 0571026..7ccb213 100644
--- a/nptl/unwind.c
+++ b/nptl/unwind.c
@@ -68,7 +68,7 @@ unwind_stop (int version, _Unwind_Action actions,
 	 registered with the old method which would be unwound by this
 	 step.  */
       struct _pthread_cleanup_buffer *oldp = buf->priv.data.cleanup;
-      void *cfa = (void *) _Unwind_GetCFA (context);
+      void *cfa = (void *) (_Unwind_Ptr) _Unwind_GetCFA (context);
 
       if (curp != oldp && (do_longjump || FRAME_LEFT (cfa, curp, adj)))
 	{
-- 
1.7.6.5


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