This is a bug report for perl from d...@dgl.cx
generated with the help of perlbug 1.39 running under perl 5.12.0.
-----------------------------------------------------------------
If a source file or eval is in UTF-8 (i.e. use utf8 for files, or a UTF-8
string for evals) some codepoints cause the parser to hang if used unquoted.
The codepoints that cause a hang depend on the version of unicode perl is using.
Perl 5.10.0:
PERL_SIGNALS=unsafe perl -M'charnames()' -e'$SIG{ALRM} = sub { printf "U+%X - %s\n", $_, charnames::viacode($_); die }; for(0..0x10FFFF) { alarm 1; eval chr $_; alarm 0 }'
U+2118 - SCRIPT CAPITAL P
U+212E - ESTIMATED SYMBOL
U+309B - KATAKANA-HIRAGANA VOICED SOUND MARK
U+309C - KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
Perl 5.12.0 RC3:
PERL_SIGNALS=unsafe perl -M'charnames()' -e'$SIG{ALRM} = sub { printf "U+%X - %s\n", $_, charnames::viacode($_); die }; for(0..0x10FFFF) { alarm 1; eval chr $_; alarm 0 }'
U+387 - GREEK ANO TELEIA
U+1369 - ETHIOPIC DIGIT ONE
U+136A - ETHIOPIC DIGIT TWO
U+136B - ETHIOPIC DIGIT THREE
U+136C - ETHIOPIC DIGIT FOUR
U+136D - ETHIOPIC DIGIT FIVE
U+136E - ETHIOPIC DIGIT SIX
U+136F - ETHIOPIC DIGIT SEVEN
U+1370 - ETHIOPIC DIGIT EIGHT
U+1371 - ETHIOPIC DIGIT NINE
U+2118 - SCRIPT CAPITAL P
U+212E - ESTIMATED SYMBOL
U+309B - KATAKANA-HIRAGANA VOICED SOUND MARK
U+309C - KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.12.0:
Configured by dgl at Sat Apr 3 10:17:37 BST 2010.
Summary of my perl5 (revision 5 version 12 subversion 0) configuration:
Commit id: 928e1fe927c71900e18cc53df7af320cbe4a2843
Platform:
osname=linux, osvers=2.6.31-10-generic, archname=x86_64-linux
uname='linux mogao 2.6.31-10-generic #34-ubuntu smp wed sep 16 01:09:15 utc 2009 x86_64 gnulinux '
config_args='-de -Dprefix=/home/dgl/perls/bleadperl'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.1', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.11.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.11.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Locally applied patches:
RC3
---
@INC for perl 5.12.0:
/home/dgl/perls/bleadperl/lib/site_perl/5.12.0/x86_64-linux
/home/dgl/perls/bleadperl/lib/site_perl/5.12.0
/home/dgl/perls/bleadperl/lib/5.12.0/x86_64-linux
/home/dgl/perls/bleadperl/lib/5.12.0
.
---
Environment for perl 5.12.0:
HOME=/home/dgl
LANG=en_GB.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/dgl/perls/bleadperl/bin:/home/dgl/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PERL_BADLANG (unset)
SHELL=/bin/zsh
This problem goes away if 'use utf8' is added to the program, which it
should be. I agree it shouldn't hang.
That doesn't always seem to be the case:
perl -C -le'print "use utf8;\n\x{212e}"' | perl
It is looping, and eventually my computer runs out of memory. If I
store the output of the first perl in a file, I can't get the second to
fail; similarly with the evals in the initial report.