ports/152580: [PATCH] sysutils/wmupmon: Segmentation fault on CURRENT amd64
Rainer Hurling
rhurlin at gwdg.de
Thu Nov 25 21:20:11 UTC 2010
>Number: 152580
>Category: ports
>Synopsis: [PATCH] sysutils/wmupmon: Segmentation fault on CURRENT amd64
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 25 21:20:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Rainer Hurling
>Release: 9.0-CURRENT amd64
>Organization:
>Environment:
FreeBSD xxx.xxx.xxx 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Tue Nov 23 18:47:29 CET 2010 xxx at xxx.xxx.xxx:/usr/obj/usr/src/sys/CUSTOM amd64
>Description:
For a long time now sysutils/wmupmon segfaults on all my CURRENT amd64 boxes.
Obviously there is a problem with the handling of xpm files. I found a patch in the web (see http://www.dockapps.org/file.php/id/188), which seems to solve this (thanks to tao).
P.S.: The port currently has no maintainer. If nobody else is interested, I could take the maintainership.
>How-To-Repeat:
Install systutils/wmupmon (version 0.1.3_4) on CURRENT amd64 and run it.
>Fix:
I updated the ports Makefile, distinfo and created files/patch-src_main.c, see below.
One problem remains: The distfiles original URL http://j-z-s.com/projects/downloads/ does not exist anymore (checked with distilator). I changed it against a newer one, http://www.dockapps.org/download.php/id/547. In addition I had to comment USE_BZIP2=yes.
With this, manually fetching the distfile 'wmupmon-0.1.3.tar.gz' works, but the ports fetch tells about error 302 (Moved temporarily). I am not aware how to solve this and could need some advice, please.
Patch attached with submission follows:
diff -Naur wmupmon/Makefile wmupmon/Makefile
--- wmupmon/Makefile 2010-10-16 16:54:56.000000000 +0200
+++ wmupmon/Makefile 2010-11-25 21:46:20.000000000 +0100
@@ -2,14 +2,14 @@
# Date created: Thu Jul 3 14:49:14 EDT 2003
# Whom: pat
#
-# $FreeBSD: ports/sysutils/wmupmon/Makefile,v 1.15 2010/10/16 11:52:38 ade Exp $
+# $FreeBSD$
#
PORTNAME= wmupmon
PORTVERSION= 0.1.3
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= sysutils windowmaker
-MASTER_SITES= http://j-z-s.com/projects/downloads/
+MASTER_SITES= http://www.dockapps.org/download.php/id/547
MAINTAINER= ports at FreeBSD.org
COMMENT= An uptime showing dockapp with a similar look to wmcpuload
diff -Naur wmupmon/distinfo wmupmon/distinfo
--- wmupmon/distinfo 2006-01-24 19:32:58.000000000 +0100
+++ wmupmon/distinfo 2010-11-25 21:41:51.000000000 +0100
@@ -1,3 +1,2 @@
-MD5 (wmupmon-0.1.3.tar.bz2) = 5de5cf7c074f15bb5d8d7d6beb5f4268
SHA256 (wmupmon-0.1.3.tar.bz2) = 7583f163fa472ec72a4f952c2ece8648a3ca709e4594b2b1591987671b0f38bc
SIZE (wmupmon-0.1.3.tar.bz2) = 90108
diff -Naur wmupmon/files/patch-src_main.c wmupmon/files/patch-src_main.c
--- wmupmon/files/patch-src_main.c 1970-01-01 01:00:00.000000000 +0100
+++ wmupmon/files/patch-src_main.c 2010-11-25 21:13:27.000000000 +0100
@@ -0,0 +1,40 @@
+--- src/main.c 2004-12-11 19:07:21.000000000 +0000
++++ src/main.c 2007-01-31 12:20:47.000000000 +0000
+@@ -66,10 +66,8 @@
+ int main(int argc, char **argv)
+ {
+ int i, a, aa, b, bb;
+- char* real_off_xpm[(style == 2 ? sizeof(backlight2_off_xpm) :
+- sizeof(backlight_off_xpm))];
+- char* real_on_xpm[(style == 2 ? sizeof(backlight2_on_xpm) :
+- sizeof(backlight_on_xpm))];
++ char** real_off_xpm;
++ char** real_on_xpm;
+ XEvent event;
+ XpmColorSymbol colors[2] = { {"Back0", NULL, 0}, {"Back1", NULL, 0} };
+ int ncolor = 0;
+@@ -79,20 +77,12 @@
+
+ /* setup pixmap to use - this is ugly but it works */
+
+- a = sizeof(backlight2_off_xpm);
+- aa = sizeof(backlight2_on_xpm);
+- b = sizeof(backlight_off_xpm);
+- bb = sizeof(backlight_on_xpm);
+ if(style == 2){
+- for(i=0; i<a; i++)
+- real_off_xpm[i] = backlight2_off_xpm[i];
+- for(i=0; i<aa; i++)
+- real_on_xpm[i] = backlight2_on_xpm[i];
++ real_off_xpm = backlight2_off_xpm;
++ real_on_xpm = backlight2_on_xpm;
+ } else {
+- for(i=0; i<b; i++)
+- real_off_xpm[i] = backlight_off_xpm[i];
+- for(i=0; i<bb; i++)
+- real_on_xpm[i] = backlight_on_xpm[i];
++ real_off_xpm = backlight_off_xpm;
++ real_on_xpm = backlight_on_xpm;
+ }
+
+ /* Initialize Application */
>Release-Note:
>Audit-Trail:
>Unformatted:
>wmupmon
Segmentation fault
More information about the freebsd-ports-bugs
mailing list