FAQ
Description:
glob function returns garbage in long file names, usually a ^G (control-G) in 29th byte.

Ramblings:
I thought this might be a problem with a file name length limit on my installation of
AIX 4.3. I don't know much about AIX, but I did find this, which seems to indicate that
the file name can be up to 255 chars, and the path name up to 1024:

$ /usr/bin/getconf NAME_MAX .
255
$ /usr/bin/getconf PATH_MAX .
1024

The above commands were executed in the same directory from where I ran the test case
Perl script (see below), and the path and file names that caused the error were well
below both of these limits.

Other stuff:
Doesn't happen with Perl 5.6.0 on AIX 4.2, or any other platform that I've used.

-------------------------------------------------
Test Case:

#!/usr/bin/perl -w

foreach (glob shift) {
print "$_\n";
}
__END__

Execute this script like this:

scriptname '*'
-------------------------------------------------
$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=aix, osvers=4.3, archname=aix
uname='aix orbit 3 4 00201295e800 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384'
ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -q32 -D_LARGE_FILES -qlonglong'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib -b32'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW -liconv
libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/usr/local/lib/perl5/5.6.0/aix/CORE/perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lC -lc -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under aix
Compiled at Dec 11 2000 13:30:34
@INC:
/usr/local/lib/perl5/5.6.0/aix
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/aix
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.
------------------------------------------------------

Thanks!

Steve Hart
steve.hart@cp.net

Search Discussions

  • Alexandr Ciornii via RT at Apr 19, 2010 at 11:48 am
    Can somebody test this on perl 5.12.0/AIX 4.3?
    On Fri Mar 09 07:40:20 2001, steve.hart@cp.net wrote:
    Ramblings:
    I thought this might be a problem with a file name length limit on
    my installation of
    AIX 4.3. I don't know much about AIX, but I did find this, which
    seems to indicate that
    the file name can be up to 255 chars, and the path name up to 1024:

    $ /usr/bin/getconf NAME_MAX .
    255
    $ /usr/bin/getconf PATH_MAX .
    1024

    The above commands were executed in the same directory from where I
    ran the test case
    Perl script (see below), and the path and file names that caused
    the error were well
    below both of these limits.

    Other stuff:
    Doesn't happen with Perl 5.6.0 on AIX 4.2, or any other platform
    that I've used.

    -------------------------------------------------
    Test Case:

    #!/usr/bin/perl -w

    foreach (glob shift) {
    print "$_\n";
    }
    __END__

    Execute this script like this:

    scriptname '*'
    -------------------------------------------------
    $ perl -V
    Summary of my perl5 (revision 5.0 version 6 subversion 0)
    configuration:
    Platform:
    osname=aix, osvers=4.3, archname=aix
    uname='aix orbit 3 4 00201295e800 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
    usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usesocks=undef
    Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
    -qmaxmem=16384'
    ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
    -qmaxmem=16384 -q32 -D_LARGE_FILES -qlonglong'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
    lseeksize=8
    alignbytes=8, usemymalloc=n, prototype=define
    Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib -b32'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lbind -lnsl -ldbm -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW
    -liconv
    libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
    Dynamic Linking:
    dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='
    -bE:/usr/local/lib/perl5/5.6.0/aix/CORE/perl.exp'
    cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE
    -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lC -lc
    -L/usr/local/lib'


    Characteristics of this binary (from libperl):
    Compile-time options: USE_LARGE_FILES
    Built under aix
    Compiled at Dec 11 2000 13:30:34
    @INC:
    /usr/local/lib/perl5/5.6.0/aix
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/aix
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .
    ------------------------------------------------------

    Thanks!

    Steve Hart
    steve.hart@cp.net

    --
    Alexandr Ciornii, http://chorny.net
  • Darin McBride via RT at May 1, 2012 at 4:26 am
    I don't have access to AIX 4.3, and, besides, it's way out of support by
    now. I can't reproduce this with the system perl (5.10.1) or perl 5.14.2
    (path/file names going up over 100 characters anyway) on AIX 6.1, so I
    vote to close this.

    ---
    via perlbug: queue: perl5 status: open
    https://rt.perl.org:443/rt3/Ticket/Display.html?id=6002
  • Nicholas Clark at May 1, 2012 at 2:50 pm

    On Mon, Apr 30, 2012 at 09:26:30PM -0700, Darin McBride via RT wrote:
    I don't have access to AIX 4.3, and, besides, it's way out of support by
    now. I can't reproduce this with the system perl (5.10.1) or perl 5.14.2
    (path/file names going up over 100 characters anyway) on AIX 6.1, so I
    vote to close this.
    I *can* however reproduce this with 5.6.0 on current-ish AIX.

    My bisect run to find out what "fixed" it has got mired down in a tarpit
    of skips. I'm curious to see whether we "fixed" it or fixed it.

    Nicholas Clark
  • Nicholas Clark at May 3, 2012 at 10:07 am

    On Tue, May 01, 2012 at 03:49:51PM +0100, Nicholas Clark wrote:
    On Mon, Apr 30, 2012 at 09:26:30PM -0700, Darin McBride via RT wrote:
    I don't have access to AIX 4.3, and, besides, it's way out of support by
    now. I can't reproduce this with the system perl (5.10.1) or perl 5.14.2
    (path/file names going up over 100 characters anyway) on AIX 6.1, so I
    vote to close this.
    I *can* however reproduce this with 5.6.0 on current-ish AIX.

    My bisect run to find out what "fixed" it has got mired down in a tarpit
    of skips. I'm curious to see whether we "fixed" it or fixed it.
    Most strange. We did fix it, but not in the way I would have guessed:

    commit 61d42ce43847d6cea183d4f40e2921e53606f13f
    Author: Jarkko Hietaniemi <jhi@iki.fi>
    Date: Wed Jun 13 02:23:16 2001 +0000

    New AIX dynaloading code from Jens-Uwe Mager.
    Does break binary compatibility.

    p4raw-id: //depot/perl@10554



    The SEGV (due to an illegal instruction) goes away once perl switched to using
    dlopen() for dynamic linking on AIX.

    So my hunch that this bug was interesting was right, but not for reason I'd
    guessed.

    Nicholas Clark

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedMar 9, '01 at 11:40p
activeMay 3, '12 at 10:07a
posts5
users3
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase