NetBSD Problem Report #47917

From makoto@mx.ki.nu  Tue Jun 11 15:54:02 2013
Return-Path: <makoto@mx.ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 092E5705D6
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 11 Jun 2013 15:54:02 +0000 (UTC)
Message-Id: <201306111553.r5BFrwkm015927@mx.ki.nu>
Date: Wed, 12 Jun 2013 00:53:58 +0900 (JST)
From: makoto@ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.NetBSD.org
Subject: shells/posh segmentation faults
X-Send-Pr-Version: 3.95

>Number:         47917
>Category:       pkg
>Synopsis:       shells/posh segmentation faults
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mef
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 11 15:55:00 +0000 2013
>Closed-Date:    Tue Jun 11 21:46:49 +0000 2013
>Last-Modified:  Tue Jun 11 21:46:49 +0000 2013
>Originator:     Makoto Fujiwara
>Release:        NetBSD 6.1
>Organization:
KINU Corporation
>Environment:


System: NetBSD modena 6.1 NetBSD 6.1 (GENERIC) amd64
Architecture: x86_64
Machine: amd64
>Description:
	shells/posh will Segmentation fault just after invocation.
	Thanks ryoon@ for reporting this problem.
>How-To-Repeat:
	(cd /usr/pkgsrs/shells/posh; make package-install)
	posh
>Fix:
Index: shells/posh/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/shells/posh/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- shells/posh/distinfo	10 Nov 2005 22:25:13 -0000	1.6
+++ shells/posh/distinfo	11 Jun 2013 15:51:14 -0000
@@ -5,3 +5,4 @@
 Size (posh_0.3.14.tar.gz) = 668729 bytes
 SHA1 (patch-aa) = bdd8ffb67ccd60064b0fb5bda7935001f6807380
 SHA1 (patch-ab) = 1e638fd21d7cab2e0a98c6383ca02e3f7acbd14f
+SHA1 (patch-main.c) = f2970c631b3ef43b642a5ab0909fdadf3567d17a
Index: shells/posh/patches/patch-main.c
===================================================================
RCS file: shells/posh/patches/patch-main.c
diff -N shells/posh/patches/patch-main.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ shells/posh/patches/patch-main.c	11 Jun 2013 15:51:14 -0000
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Avoid getting following warning, 
+  main.c: In function 'main':
+  main.c:205:15: warning: assignment makes pointer from integer without a cast
+and segfaults just after invocation on NetBSD/amd64 6.1
+
+--- main.c.orig	2004-06-09 00:51:50.000000000 +0900
++++ main.c	2013-06-12 00:40:13.000000000 +0900
+@@ -7,6 +7,7 @@
+ #include "sh.h"
+ #include "ksh_stat.h"
+ #include "ksh_time.h"
++#include "src/compat.h"
+ 
+ extern char **environ;
+ 

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->mef
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Tue, 11 Jun 2013 16:53:33 +0000
Responsible-Changed-Why:
Looks good, please commit and send upstream.
Thanks.


From: "Makoto Fujiwara" <mef@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47917 CVS commit: pkgsrc/shells/posh
Date: Tue, 11 Jun 2013 21:43:13 +0000

 Module Name:	pkgsrc
 Committed By:	mef
 Date:		Tue Jun 11 21:43:13 UTC 2013

 Modified Files:
 	pkgsrc/shells/posh: distinfo
 Added Files:
 	pkgsrc/shells/posh/patches: patch-main.c

 Log Message:
 Add patches/patch-main.c
 to fix segmentation fault just after invocation, at least on
 NetBSD/amd64 6.1, which is reported as PR pkg/47917.
 The problem was also reported by gcc (4.5.3) as:
  main.c: In function 'main':
  main.c:206:15: warning: assignment makes pointer from integer without a cast
 At following location:
    203                          char *simplified;
    ....
    206                          simplified = canonicalize_file_name(current_wd);


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/shells/posh/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/shells/posh/patches/patch-main.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: mef@NetBSD.org
State-Changed-When: Tue, 11 Jun 2013 21:46:49 +0000
State-Changed-Why:
Patch committed with slight comment lines change. Thanks wiz@


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.