Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: sv_setpvn called with negative strlen #6778

Closed
p5pRT opened this issue Sep 22, 2003 · 3 comments
Closed

panic: sv_setpvn called with negative strlen #6778

p5pRT opened this issue Sep 22, 2003 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 22, 2003

Migrated from rt.perl.org#23937 (status was 'resolved')

Searchable as RT23937$

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2003

From Ken.Yap@cisra.canon.com.au

Created by ken_yap_aus@yahoo.com

#!/usr/bin/perl -w

require 5.008;

my $string = pack('Z*Z*Z*', "hello", "blksize", "1500");
my ($first, %hash) = unpack('Z*Z*Z*Z*Z*', $string);
print "$first\n";
foreach my $i (keys %hash) {
  print "$i $hash{$i}\n";
}
exit;

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl v5.8.0:

Configured by bhcompile at Tue Feb 18 22:17:47 EST 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.20-2.48smp,
archname=i386-linux-thread-multi
    uname='linux stripples.devel.redhat.com 2.4.20-2.48smp #1 smp thu
feb 13 11:44:55 est 2003 i686 i686 i386 gnulinux '
    config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -g
-Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red
Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
-Dvendorprefix=/usr -Dsiteprefix=/usr
-Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db
-Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less
-isr'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -march=i386 -mcpu=i686 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.2.2 20030213 (Red Hat Linux 8.0
3.2.2-1)', 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=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=/lib/libc-2.3.1.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    MAINT18379


@INC for perl v5.8.0:
    /opt/perl_local/rh9/5.6.1
    /opt/css
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    .


Environment for perl v5.8.0:
    HOME=/u/kenyap
    LANG=en_AU
    LANGUAGE (unset)
    LC_COLLATE=C
    LD_LIBRARY_PATH=/home/rasul/kenyap/local/lib
    LOGDIR (unset)
   
PATH=/u/kenyap/bin:/u/kenyap/local/bin:/opt/jakarta-ant-1.5/bin:/opt/j2sdk-sun-1.4.1_01/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/lib/nmh:/usr/X11R6/bin
    PERL5LIB=/opt/perl_local/rh9/5.6.1:/opt/css
    PERL_BADLANG (unset)
    SHELL=/bin/bash




@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2003

From @iabyn

On Mon, Sep 22, 2003 at 06​:33​:11AM -0000, Ken.Yap@​cisra.canon.com.au (via RT) wrote​:

#!/usr/bin/perl -w

require 5.008;

my $string = pack('Z*Z*Z*', "hello", "blksize", "1500");
my ($first, %hash) = unpack('Z*Z*Z*Z*Z*', $string);
print "$first\n";
foreach my $i (keys %hash) {
print "$i $hash{$i}\n";
}
exit;

Thanks for the report. This has been fixed in Perl version 5.8.1, which
is due to be released Real Soon Now.

Dave.

--
In my day, we used to edit the inodes by hand. With magnets.

@p5pRT p5pRT closed this as completed Sep 22, 2003
@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2003

@iabyn - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant