develooper Front page | perl.perl5.porters | Postings from October 2005

[perl #37526] multiple encodings causes "panic: sv_setpvn called with negative strlen"

From:
Ken Hirsch
Date:
October 25, 2005 06:03
Subject:
[perl #37526] multiple encodings causes "panic: sv_setpvn called with negative strlen"
Message ID:
rt-3.0.11-37526-123253.14.2100677883631@perl.org
# New Ticket Created by  Ken Hirsch 
# Please include the string:  [perl #37526]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37526 >



This is a bug report for perl from kenhirsch@ftml.net,
generated with the help of perlbug 1.34 running under perl v5.8.0.


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


use encoding 'iso-8859-1';
binmode STDOUT, ':encoding(iso-8859-1)' or die "binmode:$!";
print "\xe1", "\n";
__END__
output is:
"\x{1280}" does not map to iso-8859-1.
panic: sv_setpvn called with negative strlen.

The same result is obtained with this program:
open OUTFILE, ">", "testout.txt" or die "open: $!";
binmode OUTFILE, ':encoding(iso-8859-1)' or die "binmode 1:$!";
binmode OUTFILE, ':encoding(iso-8859-1)' or die "binmode 2:$!";
print OUTFILE "\xe1", "\n";

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

Configured by Ken at Wed Mar  5 21:45:35  2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=cygwin, osvers=1.3.12(0.5432), archname=cygwin
    uname='cygwin_nt-5.1 dxhirx1 1.3.12(0.5432) 2002-07-06 02:16 i686 unknown '
    config_args='-d'
    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=y, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include',
    optimize='-O2',
    cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3-5 (cygwin special)', 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=4
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ld2', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -lcrypt -lutil
    perllibs=-lcrypt -lutil
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -L/usr/local/lib'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY

---
@INC for perl v5.8.0:
    /usr/local/lib/perl5/5.8.0/cygwin
    /usr/local/lib/perl5/5.8.0
    /usr/local/lib/perl5/site_perl/5.8.0/cygwin
    /usr/local/lib/perl5/site_perl/5.8.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.8.0:
    CYGWIN=tty
    HOME=/home/Ken
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/Ken/bin:/perl/bin:/usr/lib/subversion/bin:/usr/X11R6/bin:/usr/local/bin:/usr/bin:/bin:/Program Files/Microsoft.NET/FrameworkSDK/Bin/:/Program Files/Microsoft Visual Studio .NET/Common7/IDE/:/Program Files/Microsoft Visual Studio .NET/Vc7/bin/:/J2SDK_Forte/jdk1.4.0/bin:/Python21/:/usr/bin:/usr/bin/msnetcurr:/vim/current:/WINDOWS/system32:/WINDOWS:/WINDOWS/System32/Wbem:/Program Files/Common Files/Adaptec Shared/System:/Program Files/Microsoft SDK/Bin/:/Program Files/Microsoft SDK/Bin/WinNT/:/MSSQL7/BINN:/Program Files/Reflection/:/cygdrive/e/Program Files/Microsoft Visual Studio 8/Team Tools/Performance Tools/:/Program Files/Microsoft SQL Server/90/Tools/binn/:/Program Files/Microsoft Visual Studio/Common/Tools/WinNT:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin:/Program Files/Microsoft Visual Studio/Common/Tools:/Program Files/Microsoft Visual Studio/VC98/bin:/Program Files/Microsoft SDK/Bin/:/Program Files/Microsoft SDK/Bin/WinNT/:.:/PROGRA~1/COMM!
 ON~1/MUVEET~1/030625:.
    PERL_BADLANG (unset)
    PERL_MAILERS=smtp:c:\perl\bin\perl.exe
    SHELL (unset)




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