bin/73319: realpath() produces incorrect results when called from
threaded programs
James Van Bokkelen
jbvb at sandstorm.net
Sat Oct 30 10:50:27 PDT 2004
>Number: 73319
>Category: bin
>Synopsis: realpath() produces incorrect results when called from threaded programs
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 30 17:50:22 GMT 2004
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-bugs
mailing list