From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 1 19:00:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BD032A3A for ; Sat, 1 Jun 2013 19:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id A2AF9B2B for ; Sat, 1 Jun 2013 19:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r51J02Bb095027 for ; Sat, 1 Jun 2013 19:00:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r51J02K5095026; Sat, 1 Jun 2013 19:00:02 GMT (envelope-from gnats) Resent-Date: Sat, 1 Jun 2013 19:00:02 GMT Resent-Message-Id: <201306011900.r51J02K5095026@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Wolfskill Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 85F4A9DA for ; Sat, 1 Jun 2013 18:53:26 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4873DB0C for ; Sat, 1 Jun 2013 18:53:25 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.7/8.14.7) with ESMTP id r51IrOJj057865; Sat, 1 Jun 2013 11:53:24 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.7/8.14.7/Submit) id r51IrOUZ057864; Sat, 1 Jun 2013 11:53:24 -0700 (PDT) (envelope-from david) Message-Id: <201306011853.r51IrOUZ057864@albert.catwhisker.org> Date: Sat, 1 Jun 2013 11:53:24 -0700 (PDT) From: David Wolfskill To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/179179: Fix piewm SIGSEGV for FreeBSD/amd64 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: David Wolfskill List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jun 2013 19:00:02 -0000 >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 ++#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: