Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jun 2013 11:53:24 -0700 (PDT)
From:      David Wolfskill <david@catwhisker.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/179179: Fix piewm SIGSEGV for FreeBSD/amd64
Message-ID:  <201306011853.r51IrOUZ057864@albert.catwhisker.org>
Resent-Message-ID: <201306011900.r51J02K5095026@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         179179
>Category:       ports
>Synopsis:       Fix piewm SIGSEGV for FreeBSD/amd64
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 01 19:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     David Wolfskill
>Release:        FreeBSD 9.1-STABLE i386
>Organization:
Wolfskill & Dowling Residence
>Environment:
System: FreeBSD g1-227.catwhisker.org 9.1-STABLE FreeBSD 9.1-STABLE #12  r251193M/251216:901504: Sat Jun  1 08:41:25 PDT 2013     root@g1-227.catwhisker.org:/usr/obj/usr/src/sys/CANARY  amd64

Ports: /usr/ports working copy is at r319559.

>Description:
	piewm works without the attached patch in FreeBSD/i386, but
	in FreeBSD/amd64, it gets a SIGSEGV in the very early stages
	of its execution from an attempt to refer to the value of
	the HOME environment variable.

	tvtwm (on which piewm is based) does not exhibit this mode
	of failure.

	After some discussion on ports@ (particularly with Stefan
	Ehmann), it seems to me that the below patch -- cribbed from
	tvtwm's version of twm.h -- made the most sense for this issue.

	I can't really justify a high Priority, given that very few
	folks (that I know of) actually use piewm.

	Also: I am the port maintainer.  I tried (on 10 May 2013) to
	contact Russ Nelson, maintainer of the upstream site, but have
	yet to receive a response (as far as I can tell).  In the mean
	time, lack of this fix breaks piewm for FreeBSD/and64, so it
	needs to be fixed.

>How-To-Repeat:
	Boot up a FreeBSD/amd64 system, install ports/x11-wm/piewm, then
	invoke piewm.
>Fix:
	The intent of the below patch is to add a new patch file
	("patch-twm.h") to ports/x11-wm/piewm/files (and bump
	PORTREVISION).

diff -ruN piewm.orig/Makefile piewm/Makefile
--- piewm.orig/Makefile	2013-01-18 03:42:17.000000000 -0800
+++ piewm/Makefile	2013-06-01 11:44:06.000000000 -0700
@@ -3,7 +3,7 @@
 
 PORTNAME=	piewm
 PORTVERSION=	1.04
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	x11-wm
 MASTER_SITES=	http://www.crynwr.com/piewm/
 
diff -ruN piewm.orig/files/patch-twm.h piewm/files/patch-twm.h
--- piewm.orig/files/patch-twm.h	1969-12-31 16:00:00.000000000 -0800
+++ piewm/files/patch-twm.h	2013-06-01 08:27:11.000000000 -0700
@@ -0,0 +1,15 @@
+--- twm.h.orig	1998-06-03 08:42:52.000000000 -0700
++++ twm.h	2013-06-01 08:23:26.000000000 -0700
+@@ -305,6 +305,12 @@
+ #define TBPM_MENU ":menu"	/* name of titlebar pixmap for menus */
+ #define TBPM_QUESTION ":question"	/* name of unknown titlebar pixmap */
+ 
++#ifndef X_NOT_STDC_ENV
++#include <stdlib.h>
++#else
++extern char *malloc(), *calloc(), *realloc(), *getenv();
++extern int free();
++#endif
+ extern void Reborder(), Done();
+ void ComputeCommonTitleOffsets();
+ void ComputeWindowTitleOffsets(), ComputeTitleLocation();
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306011853.r51IrOUZ057864>