develooper Front page | perl.perl5.porters | Postings from May 2004

[perl #29568] curious bug: $a[0x7FFFFFFF]

Thread Next
From:
powerman @ sky . net . ua
Date:
May 14, 2004 01:13
Subject:
[perl #29568] curious bug: $a[0x7FFFFFFF]
Message ID:
rt-3.0.9-29568-87373.8.8431571585798@perl.org
# New Ticket Created by  powerman@sky.net.ua 
# Please include the string:  [perl #29568]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29568 >



This is a bug report for perl from powerman@sky.net.ua,
generated with the help of perlbug 1.34 running under perl v5.8.2.


-----------------------------------------------------------------
[Please enter your report here]

I think segfault shouldn't happen here... :-)

$ perl -e '$a[0x7FFFFFFE]=1;'
Out of memory!
$ perl -e '$a[0x7FFFFFFF]=1;'
Segmentation fault
$ perl -e '$a[0x80000000]=1;'
Modification of non-creatable array value attempted, subscript -2147483648 at -e line 1.


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.8.2:

Configured by root at Thu Feb 12 16:19:25 Local time zone must be set--see zic manual page 2004.

Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
  Platform:
    osname=linux, osvers=2.4.22, archname=i686-linux
    uname='linux home.power 2.4.22 #1 ðÔÎ îÏÑ 28 12:14:27 eet 2003 i686 amd athlon(tm) xp 1600+ authenticamd gnulinux '
    config_args='-des -Darchname=i686-linux -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dcc=gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth=  -Doptimize=-O3 -march=athlon-xp -pipe -fomit-frame-pointer -funroll-loops -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman3ext=3pm -Dcf_by=Gentoo -Ud_csh -Di_gdbm -Di_db -Di_ndbm'
    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=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3 -march=athlon-xp -pipe -fomit-frame-pointer -funroll-loops',
    cppflags='-DPERL5 -fno-strict-aliasing'
    ccversion='', gccversion='3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, 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=-lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -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='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.8.2:
    /etc/perl
    /usr/lib/perl5/site_perl/5.8.2/i686-linux
    /usr/lib/perl5/site_perl/5.8.2
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.2/i686-linux
    /usr/lib/perl5/vendor_perl/5.8.2
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.2/i686-linux
    /usr/lib/perl5/5.8.2
    /usr/local/lib/site_perl
    .

---
Environment for perl v5.8.2:
    HOME=/home/powerman
    LANG=ru_RU.KOI8-R
    LANGUAGE (unset)
    LC_NUMERIC=POSIX
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/powerman/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/kde/3.2/bin/
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About