[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

[perl #60326] [Bug in maint-perl-latest] utf8+locale substitution cause the Perl interpreter to hang.



# New Ticket Created by  Shlomi Fish 
# Please include the string:  [perl #60326]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60326 >


Hi all!

A correspondant who have choosen to remain anonymous has sent me this as he's 
been bitten by this bug.

When executing the following program (with a UTF-8 character in it) in 
maintperl, the program hangs at the s/// command:

<<<<<<<<<<<<<<<<
#!/usr/bin/perl

use strict;
use warnings;

use utf8;
use locale;

my $text = "  ”\001  ";

my $EOS = "\001";
$text =~ s/(\s\w\.\s+)$EOS/$1/sg;

binmode STDOUT, ":utf8";
print "$text\n";
>>>>>>>>>>>>>>>

I can confirm on perl-5.8.8 and on perl-5.8.x-latest (maint-perl-5.8.x), and 
it doesn't exist in my Mandriva Cooker's perl-5.10.0 ( 
perl-5.10.0-21mdv2009.0 ).

Regards,

	Shlomi Fish


---
Flags:
    category=
    severity=
---
Site configuration information for perl v5.8.8:

Configured by shlomi at Mon Nov  3 21:40:33 IST 2008.

Summary of my perl5 (revision 5 version 8 subversion 8 patch 34701) 
configuration:
  Platform:
    osname=linux, osvers=2.6.27.4, archname=i686-linux
    uname='linux telaviv1.shlomifish.org 2.6.27.4 #1 smp preempt mon oct 27 
15:10:25 ist 2008 i686 intel(r) pentium(r) 4 cpu 2.40ghz gnulinux '
    
config_args='-de -Dprefix=/home/shlomi/apps/perl/perl-5.8.x-latest -Doptimize=-g'
    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='cc', ccflags 
='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-g',
    
cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='4.3.2', 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='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/lib64
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.8.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.8'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib'

Locally applied patches:
    MAINT34689

---
@INC for perl v5.8.8:
    /home/shlomi/apps/perl/modules/lib/perl5/site_perl/5.10.0
    /home/shlomi/apps/perl/modules/lib/perl5/site_perl/5.8.8
    /home/shlomi/apps/perl/modules/lib/site_perl/5.10.0
    /home/shlomi/apps/perl/modules/lib/site_perl/5.8.8/i686-linux
    /home/shlomi/apps/perl/modules/lib/site_perl/5.8.8
    /home/shlomi/apps/perl/modules/lib/perl5/5.10.0
    /home/shlomi/apps/perl/modules/lib/perl5/5.8.8
    /home/shlomi/apps/perl/perl-5.8.x-latest/lib/5.8.8/i686-linux
    /home/shlomi/apps/perl/perl-5.8.x-latest/lib/5.8.8
    /home/shlomi/apps/perl/perl-5.8.x-latest/lib/site_perl/5.8.8/i686-linux
    /home/shlomi/apps/perl/perl-5.8.x-latest/lib/site_perl/5.8.8
    .

---
Environment for perl v5.8.8:
    HOME=/home/shlomi
    LANG=en_GB.UTF-8
    LANGUAGE=en_GB:en
    LC_ADDRESS=en_US.UTF-8
    LC_COLLATE=en_US.UTF-8
    LC_CTYPE=en_US.UTF-8
    LC_IDENTIFICATION=en_GB.UTF-8
    LC_MEASUREMENT=en_GB.UTF-8
    LC_MESSAGES=en_US.UTF-8
    LC_MONETARY=en_US.UTF-8
    LC_NAME=en_GB.UTF-8
    LC_NUMERIC=en_GB.UTF-8
    LC_PAPER=en_US.UTF-8
    LC_SOURCED=1
    LC_TELEPHONE=en_US.UTF-8
    LC_TIME=en_GB.UTF-8
    LD_LIBRARY_PATH=/home/shlomi/Download/unpack/gui/X/nouveau/mesa/mesa/lib
    LOGDIR (unset)
    
PATH=/opt/kde3/bin:/usr/lib/jvm/java-1.6.0-sun-1.6.0.06//bin:/home/shlomi/Download/unpack/graphics/fop/fop-0.93:/home/shlomi/apps/perl/modules/local/bin:/home/shlomi/apps/latemp/bin:/home/shlomi/apps/file/gringotts/bin:/home/shlomi/apps/gimageview/bin:/home/shlomi/apps/test/quadpres/bin:/home/shlomi/apps/docbook-builder/local/bin:/home/shlomi/bin:/usr/local/bin:/bin:/usr/bin:/usr/games:/usr/lib/qt4/bin:/usr/bin:/opt/kde3/bin:/usr/lib/ssh
    
PERL5LIB=/home/shlomi/apps/perl/modules/lib/perl5/site_perl/5.10.0:/home/shlomi/apps/perl/modules/lib/perl5/site_perl/5.8.8:/home/shlomi/apps/perl/modules/lib/site_perl/5.10.0:/home/shlomi/apps/perl/modules/lib/site_perl/5.8.8:/home/shlomi/apps/perl/modules/lib/perl5/5.10.0:/home/shlomi/apps/perl/modules/lib/perl5/5.8.8
    PERL_BADLANG (unset)
    SHELL=/bin/bash

-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://xrl.us/bjn8s

Shlomi, so what are you working on? Working on a new wiki about unit testing 
fortunes in freecell? -- Ran Eilam


References to:
Shlomi Fish <shlomif@iglu.org.il>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]