[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XFree86 SVN commit: rev 1014 - in branches/4.3.0/sid/debian: . patches



Author: branden
Date: 2004-02-09 01:15:08 -0500 (Mon, 09 Feb 2004)
New Revision: 1014

Modified:
   branches/4.3.0/sid/debian/TODO
   branches/4.3.0/sid/debian/patches/200_alpha_xpm_get_long64.diff
Log:
Restore annotations to patch (lost from trunk) that make the case for its
inclusion.


Modified: branches/4.3.0/sid/debian/TODO
===================================================================
--- branches/4.3.0/sid/debian/TODO	2004-02-09 06:11:52 UTC (rev 1013)
+++ branches/4.3.0/sid/debian/TODO	2004-02-09 06:15:08 UTC (rev 1014)
@@ -7,7 +7,6 @@
     http://lists.debian.org/debian-x/2004/debian-x-200401/msg00475.html
     * PATCH APPLIED, FIX NEEDS TESTING
 * Investigate/forward-port the following patches from trunk:
-  + 203_Xpm_wordsize.diff
   + 351_newport_range.diff
   + 906_debian_xfs
   (see patch forward-port status chart below for more details)
@@ -195,7 +194,7 @@
 200_alpha_GLX_align_fix.diff				irrelevant	according to Mike Harris (according to Daniel Stone)
 201_alpha_truetype_gcc_bugfix.diff			merged		201_alpha_freetype_gcc_2.95_bugfix
 202_saverproto_datatypes.diff				upstream	comments were stripped out
-203_Xpm_wordsize.diff					INCOMPLETE	200_alpha_xpm_get_long64; restore patch annotation
+203_Xpm_wordsize.diff					merged		200_alpha_xpm_get_long64
 311_arm_compiler_h.diff					merged		part of 302_arm_compiler_h
 312_riscpc_xkb_keycodes.diff				unchanged	300_riscpc_xkb_keycodes
 314_not_all_arm_boxes_run_netbsd.diff			unchanged	301_not_all_arm_boxes_run_netbsd

Modified: branches/4.3.0/sid/debian/patches/200_alpha_xpm_get_long64.diff
===================================================================
--- branches/4.3.0/sid/debian/patches/200_alpha_xpm_get_long64.diff	2004-02-09 06:11:52 UTC (rev 1013)
+++ branches/4.3.0/sid/debian/patches/200_alpha_xpm_get_long64.diff	2004-02-09 06:15:08 UTC (rev 1014)
@@ -1,8 +1,31 @@
 $Id$
 
-This patch is needed to pull in the definition of LONG64 on Alpha. Thanks to
-Kalle Olavi Niemitalo for this one.
+This patch by Kalle Olavi Niemetalo.
 
+	Nighthawk 1.0-14 dies with SIGSEGV on Alpha before it displays
+	anything.  With GDB and mcheck_pedantic(), I traced the problem
+	to heap corruption in the Xpm library.  xpmParseDataAndCreate (in
+	xc/extras/Xpm/lib/create.c) sets ximage->f.put_pixel=PutPixel32,
+	but the PutPixel32 function assumes that unsigned long is 32-bit,
+	although it's actually 64-bit on the Alpha.  XPutPixel will then
+	write past the end of the pixel and often also past the end of a
+	malloced block.
+
+	The Xpm library already tries to support 64-bit processors: if
+	the WORD64 or LONG64 macro is defined, it disables PutPixel32 and
+	always uses the more portable functions PitPixel32MSB or
+	PutPixel32LSB instead.  However, it seems the library was
+	compiled without these macros.
+
+	I guess that WORD64 means int is 64-bit and LONG64 means long is
+	64-bit; then LONG64 would be appropriate for Debian on the Alpha.
+
+	What would be a good place to define the macro?  <X11/Xmd.h>
+	already conditionally defines it; should the Xpm sources then
+	include this header?
+
+Not submitted upstream yet.
+
 --- xc/extras/Xpm/lib/XpmI.h.orig	Wed Jan 15 07:47:42 2003
 +++ xc/extras/Xpm/lib/XpmI.h	Wed Jan 15 07:48:00 2003
 @@ -58,6 +58,7 @@



Reply to: