From nobody@FreeBSD.org  Sat Oct 30 17:42:04 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2166416A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2004 17:42:04 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1241543D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2004 17:42:04 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9UHg38Z040244
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2004 17:42:03 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i9UHg3No040242;
	Sat, 30 Oct 2004 17:42:03 GMT
	(envelope-from nobody)
Message-Id: <200410301742.i9UHg3No040242@www.freebsd.org>
Date: Sat, 30 Oct 2004 17:42:03 GMT
From: James Van Bokkelen <jbvb@sandstorm.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: realpath() produces incorrect results when called from threaded programs
X-Send-Pr-Version: www-2.3

>Number:         73319
>Category:       bin
>Synopsis:       realpath() produces incorrect results when called from threaded programs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 30 17:50:22 GMT 2004
>Closed-Date:    Thu Nov 04 02:03:00 GMT 2004
>Last-Modified:  Thu Nov 04 02:03:00 GMT 2004
>Originator:     James Van Bokkelen
>Release:        FreeBSD 5.3-RC1
>Organization:
Sandstorm Enterprises Inc.
>Environment:
FreeBSD j3.sandstorm.net 5.3RC1 FreeBSD 5.3-RC1 #0 Sun Oct 17 01:25:37 UTC 2004  root@wv1u.samsco.home:/usr/obj/src/sys/GENERIC i386
>Description:
      When invoked via the 'realpath' command or from a non-threaded application, realpath("/usr/ni", buf) returns "/usr/ni".  But when invoked from a threaded app, it returns "/us/ni".  Other paths using more than one '/' character fail in the same way.
>How-To-Repeat:
      A threaded Qt application we are porting from 4.8 failed because its QFileDialog objects could not navigate the file system.  Using gdb, we found that realpath() was returning incorrect results.  I then wrote a simple test program, which worked right, as does the 'realpath' command.  I then added a call to realpath() to a threaded C-language app (no Qt or C++ use at all), and it fails the same way.  If requested, I will put together a simple demonstration, but I thought I'd submit the inital report ASAP. 
>Fix:
      haven't begun to review the source yet.
>Release-Note:
>Audit-Trail:

From: "James VanBokkelen" <jbvb@ex.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <jbvb@sandstorm.net>
Cc:  
Subject: Re: bin/73319: realpath() produces incorrect results when called from threaded programs
Date: Wed, 3 Nov 2004 20:36:46 -0500

 Problem diagnosed as a bug in a non-FreeBSD library implementation
 of strlcat().  Please disregard, my apologies.
 
 jbvb
 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Thu Nov 4 02:02:39 GMT 2004 
State-Changed-Why:  
Closed at submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73319 
>Unformatted:
