xserver-multidpi/os
Vicente Olivert Riera 8b7e1f362b backtrace.c: Fix word cast to a pointer
backtrace.c uses a word size provided by libunwind. In some
architectures like MIPS, libunwind makes that word size 64-bit for all
variants of the architecture.

In the lines #90 and #98, backtrace.c tries to do a cast to a pointer,
which fails in all MIPS variants with 32-bit pointers, like MIPS32 or
MIPS64 n32, because it's trying to do a cast from a 64-bit wide variable
to a 32-bit pointer:

Making all in os
make[2]: Entering directory
`/home/test/test/1/output/build/xserver_xorg-server-1.15.1/os'
  CC     WaitFor.lo
  CC     access.lo
  CC     auth.lo
  CC     backtrace.lo
backtrace.c: In function 'xorg_backtrace':
backtrace.c:90:20: error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
	 if (dladdr((void *)(pip.start_ip + off), &dlinfo) &&
dlinfo.dli_fname &&
		    ^
backtrace.c:98:13: error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
	     (void *)(pip.start_ip + off));
	     ^
cc1: some warnings being treated as errors
make[2]: *** [backtrace.lo] Error 1
make[2]: *** Waiting for unfinished jobs....

Making the cast to a pointer-sized integer, and then to a pointer fixes
the problem.

Related:
  https://bugs.freedesktop.org/show_bug.cgi?id=79939

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit baa50f60ac)
2015-06-03 09:05:39 -04:00
..
.gitignore dix and os: gitignore dix.O and os.O 2011-09-23 17:14:47 -07:00
access.c os: support new implicit local user access mode [CVE-2015-3164 2/3] 2015-06-03 09:05:39 -04:00
auth.c os: support new implicit local user access mode [CVE-2015-3164 2/3] 2015-06-03 09:05:39 -04:00
backtrace.c backtrace.c: Fix word cast to a pointer 2015-06-03 09:05:39 -04:00
busfault.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
client.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
connection.c Clear ListenTransConns entries in CloseWellKnownConnections 2015-06-03 09:05:35 -04:00
io.c Fix overflow of ConnectionOutput->size and ->count 2014-11-30 11:37:56 -08:00
log.c os: Teach vpnprintf() how to handle "%*.*s" 2015-06-03 09:05:36 -04:00
Makefile.am Trap SIGBUS to handle truncated shared memory segments 2013-11-11 15:16:07 -08:00
mitauth.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
oscolor.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
osdep.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
osinit.c Move RTLD_DI_SETSIGNAL code into a separate block to quiet warning 2014-12-19 18:16:15 -08:00
rpcauth.c unchecked malloc may allow unauthed client to crash Xserver [CVE-2014-8091] 2014-12-08 18:09:46 -08:00
strcasecmp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strcasestr.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strlcat.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strlcpy.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strndup.c os: Ensure <dix-config.h> is included in strndup.c 2013-02-14 09:20:46 -08:00
utils.c os/utils.c: Don't try to build os_move_fd() for WIN32 2015-06-03 09:05:37 -04:00
WaitFor.c os: Fix timer race conditions 2015-01-26 10:40:30 -08:00
xdmauth.c os: Fix -Wshadow errors 2014-01-22 19:56:31 -08:00
xdmcp.c os/xdmcp.c: Include Xtrans.h when building for WIN32 2015-06-03 09:05:37 -04:00
xprintf.c os/xprintf: add Xvscnprintf and Xscnprintf 2012-05-03 14:59:23 +10:00
xsha1.c os/xsha1.c: Add license and copyright attribution. 2015-01-02 13:39:52 -08:00
xstrans.c Clean up a couple of warnings in os/ 2013-10-31 16:58:12 -07:00