|
List Info
Thread: File::Spec bug on VMS
|
|
| File::Spec bug on VMS |

|
2007-04-30 13:57:20 |
# New Ticket Created by swkronenfeld gmail.com
# Please include the string: [perl #42829]
# in the subject line of all future correspondence about
this issue.
# <URL: h
ttp://rt.perl.org/rt3/Ticket/Display.html?id=42829 >
This is a bug report for perl from swkronenfeld gmail.com,
generated with the help of perlbug 1.35 running under perl
v5.8.6.
------------------------------------------------------------
-----
[Please enter your report here]
Whenever my path length is a multiple of 8 + 1 (or a
multiple of 8+3 if you count the brackets), i.e. 9, 17, 23,
the path is formed incorrectly (as shown below). It discards
the second argument and forms a file path based on the first
argument only.
my $path = "[DIR.";
my $tmp = "";
for(my $x=0; $x<60; $x++) {
$tmp .= "a";
my $tmp2 = $path . $tmp . "]";
print File::Spec->catfile($tmp2, "file") .
"n";
}
-----------------------------
$ perl test.pl
USERS:[DIR.a]file
USERS:[DIR.aa]file
USERS:[DIR.aaa]file
USERS:[DIR.aaaa]file
USERS:[DIR]aaaaa
USERS:[DIR.aaaaaa]file
USERS:[DIR.aaaaaaa]file
USERS:[DIR.aaaaaaaa]file
USERS:[DIR.aaaaaaaaa]file
USERS:[DIR.aaaaaaaaaa]file
USERS:[DIR.aaaaaaaaaaa]file
USERS:[DIR.aaaaaaaaaaaa]file
USERS:[DIR]aaaaaaaaaaaaa
USERS:[DIR.aaaaaaaaaaaaaa]file
USERS:[DIR.aaaaaaaaaaaaaaa]file
USERS:[DIR.aaaaaaaaaaaaaaaa]file
I debugged this and found the following:
There is a bug in the function unixify (in VMS::Filespec). A
control character is added to the end of certain length
paths:
47: my($npath) = unixify($path);
DB<7> x $path 0 '[DIR.aaaaa]'
DB<8> s
File::Spec::VMS::eliminate_macros(/perl_root/lib/File/Spec/V
MS.pm:48):
48: my($complex) = 0;
DB<8> x $npath 0 "/USERS/DIR/aaaaac " #
<---- What's that c doing there?!
As opposed to
47: my($npath) = unixify($path);
DB<9> x $path 0 '[DIR.aaaaaaa]'
DB<10> s
File::Spec::VMS::eliminate_macros(/perl_root/lib/File/Spec/V
MS.pm:48):
48: my($complex) = 0;
DB<10> x $npath 0 '/USERS/DIR/aaaaaaa/'
[Please do not change anything below this line]
------------------------------------------------------------
-----
---
Flags:
category=utilities
severity=medium
---
Site configuration information for perl v5.8.6:
Configured by john at Wed Dec 8 16:58:35 CST 2004.
Summary of my perl5 (revision 5 version 8 subversion 6)
configuration:
Platform:
osname=linux, osvers=2.4.21-15.0.4.tlsmp,
archname=i686-linux-64int
uname='linux thugbert.cs.wisc.edu 2.4.21-15.0.4.tlsmp #1
smp tue aug 3 23:02:48 edt 2004 i686 unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef
use64bitint=define use64bitall=undef
uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe
-I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.4.1', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.3.2.so, so=so, useshrplib=false,
libperl=libperl.a
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared
-L/usr/local/lib'
Locally applied patches:
---
INC
for perl v5.8.6:
/s/perl-5.8.6/i386_tao10/lib/5.8.6/i686-linux-64int
/s/perl-5.8.6/i386_tao10/lib/5.8.6
/s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6/i686-linux-64in
t
/s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6
/s/perl-5.8.6/i386_tao10/lib/site_perl
.
---
Environment for perl v5.8.6:
HOME=/u/k/r/kronenfe
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/u/k/r/kronenfe/bin:/s/std/bin:/usr/afsws/bin:/opt/SUNW
spro/bin:/usr/ccs/bin:/usr/ucb:/bin:/usr/bin:/usr/stat/bin:/
usr/X11R6/bin:/unsup/condor/bin:/unsup/condor/sbin:/p/condor
/home/bin:/p/condor/workspaces/vdt/bin:/u/k/r/kronenfe/ruby/
ruby/bin:/u/k/r/kronenfe/ruby/ruby/lib/ruby/gems/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
|
|
| Re: File::Spec bug on VMS |

|
2007-04-30 19:33:41 |
On 4/30/07, via RT swkronenfeld gmail. com
<perlbug-followup perl.org> wrote:
> # New Ticket Created by swkronenfeld gmail.com
> # Please include the string: [perl #42829]
> # in the subject line of all future correspondence
about this issue.
> # <URL: h
ttp://rt.perl.org/rt3/Ticket/Display.html?id=42829 >
>
>
>
> This is a bug report for perl from swkronenfeld gmail.com,
> generated with the help of perlbug 1.35 running under
perl v5.8.6.
Please confirm that you are actually using File::Spec::VMS
from Perl
5.8.6 on Linux. If not, please report the Perl and OS
versions where
you observe the problem.
>
>
>
------------------------------------------------------------
-----
> [Please enter your report here]
>
> Whenever my path length is a multiple of 8 + 1 (or a
multiple of 8+3 if you count the brackets), i.e. 9, 17, 23,
the path is formed incorrectly (as shown below). It discards
the second argument and forms a file path based on the first
argument only.
>
> my $path = "[DIR.";
> my $tmp = "";
> for(my $x=0; $x<60; $x++) {
> $tmp .= "a";
> my $tmp2 = $path . $tmp . "]";
> print File::Spec->catfile($tmp2,
"file") . "n";
> }
>
> -----------------------------
> $ perl test.pl
> USERS:[DIR.a]file
> USERS:[DIR.aa]file
> USERS:[DIR.aaa]file
> USERS:[DIR.aaaa]file
> USERS:[DIR]aaaaa
> USERS:[DIR.aaaaaa]file
> USERS:[DIR.aaaaaaa]file
> USERS:[DIR.aaaaaaaa]file
> USERS:[DIR.aaaaaaaaa]file
> USERS:[DIR.aaaaaaaaaa]file
> USERS:[DIR.aaaaaaaaaaa]file
> USERS:[DIR.aaaaaaaaaaaa]file
> USERS:[DIR]aaaaaaaaaaaaa
> USERS:[DIR.aaaaaaaaaaaaaa]file
> USERS:[DIR.aaaaaaaaaaaaaaa]file
> USERS:[DIR.aaaaaaaaaaaaaaaa]file
In the current development version of Perl (blead 31105) on
OpenVMS
Alpha v8.3, this bug does not appear to be present:
$ perl test.pl
D0:[DIR.a]file
D0:[DIR.aa]file
D0:[DIR.aaa]file
D0:[DIR.aaaa]file
D0:[DIR.aaaaa]file
D0:[DIR.aaaaaa]file
D0:[DIR.aaaaaaa]file
D0:[DIR.aaaaaaaa]file
D0:[DIR.aaaaaaaaa]file
D0:[DIR.aaaaaaaaaa]file
D0:[DIR.aaaaaaaaaaa]file
D0:[DIR.aaaaaaaaaaaa]file
D0:[DIR.aaaaaaaaaaaaa]file
D0:[DIR.aaaaaaaaaaaaaa]file
D0:[DIR.aaaaaaaaaaaaaaa]file
D0:[DIR.aaaaaaaaaaaaaaaa]file
<snip>
> I debugged this and found the following:
>
> There is a bug in the function unixify (in
VMS::Filespec). A control character is added to the end of
certain length paths:
>
> 47: my($npath) = unixify($path);
> DB<7> x $path 0 '[DIR.aaaaa]'
> DB<8> s
File::Spec::VMS::eliminate_macros(/perl_root/lib/File/Spec/V
MS.pm:48):
> 48: my($complex) = 0;
> DB<8> x $npath 0 "/USERS/DIR/aaaaac " #
<---- What's that c doing there?!
>
> As opposed to
>
> 47: my($npath) = unixify($path);
> DB<9> x $path 0 '[DIR.aaaaaaa]'
> DB<10> s
File::Spec::VMS::eliminate_macros(/perl_root/lib/File/Spec/V
MS.pm:48):
> 48: my($complex) = 0;
> DB<10> x $npath 0 '/USERS/DIR/aaaaaaa/'
>
>
> [Please do not change anything below this line]
>
------------------------------------------------------------
-----
> ---
> Flags:
> category=utilities
> severity=medium
> ---
> Site configuration information for perl v5.8.6:
>
> Configured by john at Wed Dec 8 16:58:35 CST 2004.
>
> Summary of my perl5 (revision 5 version 8 subversion 6)
configuration:
> Platform:
> osname=linux, osvers=2.4.21-15.0.4.tlsmp,
archname=i686-linux-64int
> uname='linux thugbert.cs.wisc.edu
2.4.21-15.0.4.tlsmp #1 smp tue aug 3 23:02:48 edt 2004 i686
unknown '
> config_args=''
> hint=recommended, useposix=true,
d_sigaction=define
> usethreads=undef use5005threads=undef
useithreads=undef usemultiplicity=undef
> useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef
> use64bitint=define use64bitall=undef
uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='gcc', ccflags ='-fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
> optimize='-O2',
> cppflags='-fno-strict-aliasing -pipe
-I/usr/local/include -I/usr/include/gdbm'
> ccversion='', gccversion='3.4.1', gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=12345678
> d_longlong=define, longlongsize=8,
d_longdbl=define, longdblsize=12
> ivtype='long long', ivsize=8, nvtype='double',
nvsize=8, Off_t='off_t', lseeksize=8
> alignbytes=4, prototype=define
> Linker and Libraries:
> ld='gcc', ldflags =' -L/usr/local/lib'
> libpth=/usr/local/lib /lib /usr/lib
> libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
> perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
> libc=/lib/libc-2.3.2.so, so=so, useshrplib=false,
libperl=libperl.a
> gnulibc_version='2.3.2'
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-Wl,-E'
> cccdlflags='-fpic', lddlflags='-shared
-L/usr/local/lib'
>
> Locally applied patches:
>
>
> ---
> INC for perl v5.8.6:
>
/s/perl-5.8.6/i386_tao10/lib/5.8.6/i686-linux-64int
> /s/perl-5.8.6/i386_tao10/lib/5.8.6
>
/s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6/i686-linux-64in
t
> /s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6
> /s/perl-5.8.6/i386_tao10/lib/site_perl
> .
>
> ---
> Environment for perl v5.8.6:
> HOME=/u/k/r/kronenfe
> LANG=en_US.UTF-8
> LANGUAGE (unset)
> LD_LIBRARY_PATH (unset)
> LOGDIR (unset)
>
PATH=/u/k/r/kronenfe/bin:/s/std/bin:/usr/afsws/bin:/opt/SUNW
spro/bin:/usr/ccs/bin:/usr/ucb:/bin:/usr/bin:/usr/stat/bin:/
usr/X11R6/bin:/unsup/condor/bin:/unsup/condor/sbin:/p/condor
/home/bin:/p/condor/workspaces/vdt/bin:/u/k/r/kronenfe/ruby/
ruby/bin:/u/k/r/kronenfe/ruby/ruby/lib/ruby/gems/bin
> PERL_BADLANG (unset)
> SHELL=/bin/bash
>
>
|
|
[1-2]
|
|