NetBSD Problem Report #48497

From  Sat Jan  4 12:58:33 2014
Return-Path: <>
Received: from ( [])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "", Issuer "Postmaster" (not verified))
	by (Postfix) with ESMTPS id 25731A6469
	for <>; Sat,  4 Jan 2014 12:58:33 +0000 (UTC)
Message-Id: <>
Date: Sat,  4 Jan 2014 13:58:25 +0100 (CET)
From: Thomas Klausner <>
Reply-To: Thomas Klausner <>
Subject: realpath() does not conform to POSIX 2008
X-Send-Pr-Version: 3.95

>Number:         48497
>Category:       lib
>Synopsis:       realpath() does not conform to POSIX 2008
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 04 13:00:00 +0000 2014
>Closed-Date:    Tue Nov 03 22:38:58 +0000 2015
>Last-Modified:  Tue Nov 03 22:38:58 +0000 2015
>Originator:     Thomas Klausner
>Release:        NetBSD 6.99.28
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough

System: NetBSD 6.99.28 NetBSD 6.99.28 (KVOTHE) #23: Fri Dec 27 21:42:38 CET 2013 amd64
Architecture: x86_64
Machine: amd64
In the 2008 edition, realpath() was extended to allow NULL as second argument.
The description is:

"If resolved_name is a null pointer, the generated pathname shall
be stored as a null-terminated string in a buffer allocated as if
by a call to malloc()."

For details, see

The problem is that NetBSD currently just causes core dumps when
programs expect that behaviour to be supported.
Compile code that passes NULL as second argument (like wip/notmuch
if compiled without one of the patches in that package) and see a
core dump.
Implement support, please. Or at least catch NULL and return EINVAL
or similar.


From: Mateusz Kocielski <>
Subject: Re: lib/48497
Date: Tue, 3 Nov 2015 13:59:12 +0000

 Hi there,

  it seems that it was already fixed by christos@

  but this change is not pulled-up. Close it or request for pull-up?

  Best Regards,
  Mateusz Kocielski

From: (Christos Zoulas)
	Thomas Klausner <>
Subject: Re: lib/48497
Date: Tue, 3 Nov 2015 09:05:31 -0500

 On Nov 3,  2:00pm, (Mateusz Kocielski) wrote:
 -- Subject: Re: lib/48497

 Looks like it is pulled-up to -7.


State-Changed-From-To: open->closed
State-Changed-When: Tue, 03 Nov 2015 22:38:58 +0000
Fixed by christos, thanks!


NetBSD Home
NetBSD PR Database Search

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