NetBSD Problem Report #46618

From www@NetBSD.org  Thu Jun 21 19:57:45 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 076AD63B882
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 21 Jun 2012 19:57:45 +0000 (UTC)
Message-Id: <20120621195744.6354363B85F@www.NetBSD.org>
Date: Thu, 21 Jun 2012 19:57:44 +0000 (UTC)
From: o.vd.linden@quicknet.nl
Reply-To: o.vd.linden@quicknet.nl
To: gnats-bugs@NetBSD.org
Subject: realpath(3) isn't SUSv4 compliant (and causes flactag 2.0.4 to dump core)
X-Send-Pr-Version: www-1.0

>Number:         46618
>Category:       lib
>Synopsis:       realpath(3) isn't SUSv4 compliant (and causes flactag 2.0.4 to dump core)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 21 20:00:01 +0000 2012
>Closed-Date:    Fri Dec 21 20:47:09 +0000 2012
>Last-Modified:  Sat Apr 20 10:15:10 +0000 2013
>Originator:     Onno van der Linden
>Release:        NetBSD 6.99.7 i386
>Organization:
>Environment:
NetBSD sheep 6.99.7 NetBSD 6.99.7 (SHEEP) #9: Sat Jun 16 19:53:56 MEST 2012  onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
>Description:
Latest flactag 2.0.4 release calls realpath with NULL as second argument.
DIAGASSERT in the NetBSD code of realpath will cause a coredump.

And from http://comments.gmane.org/gmane.os.openbsd.tech/26065
2 opengroup url's containing the old and new standard:

http://pubs.opengroup.org/onlinepubs/009695399/functions/realpath.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html


>How-To-Repeat:
#include <stdio.h>
main(int argc, char *argv[])
{
realpath(argv[0],NULL);
}
>Fix:
Implement the SUSv4 standard for realpath or document in the manpage which standard(s) apply to realpath(3).

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46618 CVS commit: src/lib/libc/gen
Date: Thu, 21 Jun 2012 17:13:08 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Thu Jun 21 21:13:07 UTC 2012

 Modified Files:
 	src/lib/libc/gen: getcwd.c realpath.3

 Log Message:
 PR/46618: Onno van der Linden: realpath(3) isn't SUSv4 compliant (and causes
 flactag 2.0.4 to dump core). Fix to accept a NULL argument for resolvedpath.


 To generate a diff of this commit:
 cvs rdiff -u -r1.51 -r1.52 src/lib/libc/gen/getcwd.c
 cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/realpath.3

 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: dholland@NetBSD.org
State-Changed-When: Fri, 21 Dec 2012 20:47:09 +0000
State-Changed-Why:
Christos fixed it in June.


From: "Noriyuki Soda" <soda@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46618 CVS commit: src/lib/libc/gen
Date: Tue, 5 Mar 2013 02:46:33 +0000

 Module Name:	src
 Committed By:	soda
 Date:		Tue Mar  5 02:46:33 UTC 2013

 Modified Files:
 	src/lib/libc/gen: realpath.3

 Log Message:
 a sequel to getcwd.c revision 1.52 and realpath.3 revision 1.13 by christos:
 explicitly mention that NULL is allowed as second argument
 in the description part as well.

 PR/46618: Onno van der Linden: realpath(3) isn't SUSv4 compliant (and causes
 flactag 2.0.4 to dump core). Fix to accept a NULL argument for resolvedpath.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/realpath.3

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

From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46618 CVS commit: [netbsd-6] src/lib/libc/gen
Date: Sat, 20 Apr 2013 10:11:02 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sat Apr 20 10:11:02 UTC 2013

 Modified Files:
 	src/lib/libc/gen [netbsd-6]: getcwd.c realpath.3

 Log Message:
 Pull up following revision(s) (requested by christos in ticket #874):
 	lib/libc/gen/realpath.3: revision 1.13
 	lib/libc/gen/getcwd.c: revision 1.52
 PR/46618: Onno van der Linden: realpath(3) isn't SUSv4 compliant (and causes
 flactag 2.0.4 to dump core). Fix to accept a NULL argument for resolvedpath.


 To generate a diff of this commit:
 cvs rdiff -u -r1.50 -r1.50.6.1 src/lib/libc/gen/getcwd.c
 cvs rdiff -u -r1.12 -r1.12.46.1 src/lib/libc/gen/realpath.3

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

From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46618 CVS commit: [netbsd-6-0] src/lib/libc/gen
Date: Sat, 20 Apr 2013 10:11:44 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sat Apr 20 10:11:44 UTC 2013

 Modified Files:
 	src/lib/libc/gen [netbsd-6-0]: getcwd.c realpath.3

 Log Message:
 Pull up following revision(s) (requested by christos in ticket #874):
 	lib/libc/gen/realpath.3: revision 1.13
 	lib/libc/gen/getcwd.c: revision 1.52
 PR/46618: Onno van der Linden: realpath(3) isn't SUSv4 compliant (and causes
 flactag 2.0.4 to dump core). Fix to accept a NULL argument for resolvedpath.


 To generate a diff of this commit:
 cvs rdiff -u -r1.50 -r1.50.10.1 src/lib/libc/gen/getcwd.c
 cvs rdiff -u -r1.12 -r1.12.50.1 src/lib/libc/gen/realpath.3

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

>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.