Skip Menu |
 

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 65379
Status: open
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
jkeenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.33
Fixed in: (no value)



Subject: abs_path() errouneously returning undef because lstat() sets errno to EINVAL
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1296672638-17551-651"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 2366
Download (untitled) / with headers
text/plain 2.3k
Hello, I am seeing several systems behaving strangely (details below) in regards to abs_path. I am still tracing this out and wanted to post the details for reference and in case one of you gurus see what the cause could be right off hand, thanks! [ -- Working server -- ] # perl -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' Defined: /etc [ -- Affected server -- ] # perl -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' Undefined [ -- lower level -- ] If I add debug output before and after line 156 in Cwd.xs like so: printf("DEBUG Before %d %s\n", errno, resolved); struct stat sb; if (lstat(resolved, &sb) != 0) { printf("DEBUG After %d %s\n", errno, resolved); if (errno == ENOENT && p == NULL) { errno = serrno; return (resolved); } return (NULL); } printf("DEBUG I got past the return(NULL) above"); and rebuild it, then we now see that errno was changed from ENOENT to EINVAL and thus the return(NULL) is triggered: # perl -I. -I./blib/arch -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' DEBUG Before 2 /etc DEBUG After 22 /etc Undefined It is the same if we change lstat() to PerlLIO_lstat() [ -- misc info -- ] Both servers are • 64 bit • CentOS release 5.5 (Final) • Using Cwd 3.33 (but installing older version results in the same behavior) • have “d_lstat” set to “define” Working server: • This is perl, v5.8.8 built for x86_64-linux • from RPM: perl.x86_64 4:5.8.8-32.el5_5.2 (another affected server had perl.x86_64 4:5.8.8-27.el5 installed) Affected server: • This is perl, v5.8.8 built for x86_64-linux-thread-multi • from RPM: perl.x86_64 4:5.8.8-32.el5_5.1 (another affected server had perl.x86_64 4:5.8.8-27.el5 installed) A diff of the output of: perl -MConfig -e 'for $k (sort keys %Config) { print "$k:$Config{$k}\n"; }' on each box is attached as sorted_config.diff
Subject: sorted_config.diff
MIME-Version: 1.0
Content-Type: text/x-diff; name="sorted_config.diff"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="sorted_config.diff"
Content-Transfer-Encoding: binary
Content-Length: 28671
Download sorted_config.diff
text/x-diff 27.9k

Message body is not shown because it is too large.

MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-19313-1297962605-194.65379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 134
Download (untitled) / with headers
text/plain 134b
I was directed to use perlbug, here is the perlbug version of this report: http://rt.perl.org/rt3//Public/Bug/Display.html?id=84338
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-19313-1297962605-194.65379-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.8.HEAD-19313-1297962605-194.65379-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-16111-1385315488-51.65379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 248
Download (untitled) / with headers
text/plain 248b
On Thu Feb 17 12:10:05 2011, DMUEY wrote: Show quoted text
> I was directed to use perlbug, here is the perlbug version of this report: > > http://rt.perl.org/rt3//Public/Bug/Display.html?id=84338
I have taken perl:84338 for the purpose of closing it in 7 days.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.