Subject: Re: pkg/37054 (WindowMaker triggers a crash in Xlib on sparc64)
To: None <pkgsrc-bugs@NetBSD.org>
From: Pierre Pronchery <khorben@defora.org>
List: pkgsrc-bugs
Date: 10/02/2007 16:15:53
This is a multi-part message in MIME format.
--------------050809000108090003040708
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
martin@netbsd.org wrote:
> Synopsis: WindowMaker triggers a crash in Xlib on sparc64
>
> Responsible-Changed-From-To: xsrc-manager->pkg-manager
> Responsible-Changed-By: martin@netbsd.org
> Responsible-Changed-When: Tue, 02 Oct 2007 14:03:29 +0000
> Responsible-Changed-Why:
> It's a pkg problem
The attached patch got WindowMaker to start correctly.
There are probably many, many more places to fix though.
Cheers,
--
khorben
--------------050809000108090003040708
Content-Type: text/plain;
name="patch-am"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-am"
$NetBSD$
--- src/wmspec.c.orig 2007-10-02 15:40:36.000000000 +0200
+++ src/wmspec.c
@@ -27,6 +27,8 @@
* This file needs to be checked for all calls to XGetWindowProperty() and
* proper checks need to be made on the returned values. Only checking for
* return to be Success is not enough. -Dan
+ * This file also needs to be checked for all calls to XChangeProperty(),
+ * where the fifth argument needs to be aligned on the size of long.
*/
#include "wconfig.h"
@@ -392,7 +394,8 @@ wNETWMGetCurrentDesktopFromHint(WScreen
static CARD32*
findBestIcon(CARD32 *data, unsigned long items)
{
- int size, wanted, d, distance;
+ int size, wanted;
+ long d, distance;
unsigned long i;
CARD32 *icon;
@@ -487,7 +490,7 @@ updateIconImage(WScreen *scr, WWindow *w
static void
updateShowDesktop(WScreen * scr, Bool show)
{
- CARD32 foo;
+ long foo;
foo = (show == True);
XChangeProperty(dpy, scr->root_win, net_showing_desktop, XA_CARDINAL, 32,
@@ -793,7 +796,7 @@ updateClientListStacking(WScreen *scr, W
static void
updateWorkspaceCount(WScreen *scr) /* changeable */
{
- CARD32 count;
+ long count;
count = scr->workspace_count;
@@ -805,7 +808,7 @@ updateWorkspaceCount(WScreen *scr) /* ch
static void
updateCurrentWorkspace(WScreen *scr) /* changeable */
{
- CARD32 count;
+ long count;
count = scr->current_workspace;
@@ -852,7 +855,7 @@ updateFocusHint(WScreen *scr, WWindow *w
static void
updateWorkspaceHint(WWindow *wwin, Bool fake, Bool del)
{
- CARD32 l;
+ long l;
if (del) {
XDeleteProperty(dpy, wwin->client_win, net_wm_desktop);
--------------050809000108090003040708--