NetBSD Problem Report #47068
From njoly@lanfeust.sis.pasteur.fr Sat Oct 13 16:49:40 2012
Return-Path: <njoly@lanfeust.sis.pasteur.fr>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 42A9463DD3F
for <gnats-bugs@gnats.NetBSD.org>; Sat, 13 Oct 2012 16:49:40 +0000 (UTC)
Message-Id: <20121013164700.0179C903B8@lanfeust.sis.pasteur.fr>
Date: Sat, 13 Oct 2012 18:46:59 +0200 (CEST)
From: njoly@pasteur.fr
Reply-To: njoly@pasteur.fr
To: gnats-bugs@gnats.NetBSD.org
Subject: unifdef(1) with cpp directive on last line without newline
X-Send-Pr-Version: 3.95
>Number: 47068
>Category: bin
>Synopsis: unifdef(1) with cpp directive on last line without newline
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 13 16:50:01 +0000 2012
>Closed-Date: Mon Oct 15 17:57:34 +0000 2012
>Last-Modified: Mon Oct 15 17:57:34 +0000 2012
>Originator: Nicolas Joly
>Release: NetBSD 6.99.12
>Organization:
Institut Pasteur
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 6.99.12 NetBSD 6.99.12 (LANFEUST) #7: Sat Oct 13 10:03:30 CEST 2012 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
unifdef(1) crash when a source file has a cpp directive on the last line but
miss a newline.
>How-To-Repeat:
njoly@lanfeust [~]> printf '#ifdef foo\n#endif' >input
njoly@lanfeust [~]> unifdef -Ubar input
#ifdef foo
zsh: abort (core dumped) unifdef -Ubar input
njoly@lanfeust [~]> printf '#ifdef foo\n#endif\n' >input
njoly@lanfeust [~]> unifdef -Ubar input
#ifdef foo
#endif
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47068 CVS commit: src/usr.bin/unifdef
Date: Sat, 13 Oct 2012 14:26:03 -0400
Module Name: src
Committed By: christos
Date: Sat Oct 13 18:26:03 UTC 2012
Modified Files:
src/usr.bin/unifdef: unifdef.c
Log Message:
PR/47068: unifdef(1) with cpp directive on last line without newline
Remove bogus test; if there is no newline, the state does not change.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/unifdef/unifdef.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nicolas Joly" <njoly@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47068 CVS commit: src/tests/usr.bin/unifdef
Date: Mon, 15 Oct 2012 17:49:59 +0000
Module Name: src
Committed By: njoly
Date: Mon Oct 15 17:49:59 UTC 2012
Modified Files:
src/tests/usr.bin/unifdef: t_basic.sh
Log Message:
Add a small testcase for PR/47068.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/unifdef/t_basic.sh
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: njoly@NetBSD.org
State-Changed-When: Mon, 15 Oct 2012 17:57:34 +0000
State-Changed-Why:
Confirmed fixed, thanks christos.
:w
>Unformatted:
(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.