[PATCH] backtrace.c: Fix word cast to a pointer
Keith Packard
keithp at keithp.com
Thu Jan 8 14:36:36 PST 2015
Vicente Olivert Riera <Vincent.Riera at imgtec.com> writes:
> Making the cast to a pointer-sized integer, and then to a pointer fixes
> the problem.
> - if (dladdr((void *)(pip.start_ip + off), &dlinfo) && dlinfo.dli_fname &&
> + if (dladdr((void *)(long)(pip.start_ip + off), &dlinfo) && dlinfo.dli_fname &&
I'd suggest using uintptr_t instead of long if you want a pointer-sized
integer.
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150108/70cbb8d9/attachment.sig>
More information about the xorg-devel
mailing list