Bug 179179 - Fix x11-wm/piewm SIGSEGV for FreeBSD/amd64
Summary: Fix x11-wm/piewm SIGSEGV for FreeBSD/amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2013-06-01 20:00 UTC by david
Modified: 2013-06-11 22:20 UTC (History)
0 users

See Also:

file.diff (1.04 KB, patch)
2013-06-01 20:00 UTC, david
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description david 2013-06-01 20:00:00 UTC
	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.

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
How-To-Repeat: 	Boot up a FreeBSD/amd64 system, install ports/x11-wm/piewm, then
	invoke piewm.
Comment 1 Edwin Groothuis freebsd_committer 2013-06-03 12:31:45 UTC
Class Changed
From-To: sw-bug->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Raphael Kubo da Costa freebsd_committer 2013-06-11 22:19:44 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer 2013-06-11 22:19:49 UTC
Author: rakuco
Date: Tue Jun 11 21:19:37 2013
New Revision: 320644
URL: http://svnweb.freebsd.org/changeset/ports/320644

  Add a patch to stop crashing on amd64.
  PR:		ports/179179
  Submitted by:	David Wolfskill <david@catwhisker.org> (maintainer)

  head/x11-wm/piewm/files/patch-twm.h   (contents, props changed)

Modified: head/x11-wm/piewm/Makefile
--- head/x11-wm/piewm/Makefile	Tue Jun 11 21:06:30 2013	(r320643)
+++ head/x11-wm/piewm/Makefile	Tue Jun 11 21:19:37 2013	(r320644)
@@ -3,7 +3,7 @@
 PORTNAME=	piewm
 MASTER_SITES=	http://www.crynwr.com/piewm/

Added: head/x11-wm/piewm/files/patch-twm.h
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/piewm/files/patch-twm.h	Tue Jun 11 21:19:37 2013	(r320644)
@@ -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>
++extern char *malloc(), *calloc(), *realloc(), *getenv();
++extern int free();
+ extern void Reborder(), Done();
+ void ComputeCommonTitleOffsets();
+ void ComputeWindowTitleOffsets(), ComputeTitleLocation();
svn-ports-all@freebsd.org mailing list
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"