This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Cast _Unwind_GetCFA return to _Unwind_Ptr first in_JMPBUF_CFA_UNWINDS_ADJ
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 16 Mar 2012 11:02:08 -0700
- Subject: PATCH: Cast _Unwind_GetCFA return to _Unwind_Ptr first in_JMPBUF_CFA_UNWINDS_ADJ
- References: <20120316175058.GA7671@intel.com>
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
On Fri, Mar 16, 2012 at 10:50:58AM -0700, H.J. Lu wrote:
> _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?
>
Here is another instance to cast _Unwind_GetCFA return to _Unwind_Ptr
first. OK to install?
Thanks.
H.J.
---
2012-03-16 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ): Cast
_Unwind_GetCFA return to _Unwind_Ptr first.
diff --git a/sysdeps/x86_64/jmpbuf-unwind.h b/sysdeps/x86_64/jmpbuf-unwind.h
index 646615d..890037e 100644
--- a/sysdeps/x86_64/jmpbuf-unwind.h
+++ b/sysdeps/x86_64/jmpbuf-unwind.h
@@ -28,7 +28,9 @@
((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP]))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, \
+ (void *) (_Unwind_Ptr) _Unwind_GetCFA (_context), \
+ _adj)
static inline uintptr_t __attribute__ ((unused))
_jmpbuf_sp (__jmp_buf regs)
--
1.7.6.5