develooper Front page | perl.perl5.porters | Postings from February 2003

[perl #20667] unicode regex vs non-unicode regex

Thread Next
From:
Jean-Paul Jorda
Date:
February 3, 2003 07:11
Subject:
[perl #20667] unicode regex vs non-unicode regex
Message ID:
rt-20667-50086.18.479333738605@bugs6.perl.org
# New Ticket Created by  Jean-Paul Jorda 
# Please include the string:  [perl #20667]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20667 >


This is a bug report for perl from jorda@edpsciences.org,
generated with the help of perlbug 1.33 running under perl v5.6.1.


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

UNDER LINUX, perl 5.6 (see config below)
Running the following program leads to a 'Segmentation fault' :


#! /usr/bin/perl -w


$toto = 'Hello';
$toto =~ /\w/; # this line provokes the problem!


$name = 'A B';
if ($name =~ /(\p{IsUpper}) (\p{IsUpper})/){
    print "It's good! : $1 $2  \n";
} else {
    print "It's not good...\n";
}
# end of the program


UNDER SunOS,with perl 5.8

This leads to "It's not good...",
instead of the expected "It's good! A B". if I suppress 
$toto =~ /\w/; 
I get the right result.



CONFIG Perl  SunOS:
-------------------

$>perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos aragon 5.6 generic_105181-05 sun4u sparc sunw,ultra-250 '
    config_args='-Dcc=gcc'
    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 ='-I/usr/local/include -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-I/usr/local/include -I/opt/local/include'
    ccversion='', gccversion='2.8.1', gccosandvers='solaris2.6'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib '
    libpth=/usr/local/lib /opt/local/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldb -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Jan  2 2003 10:24:51
  %ENV:
    PERL5LIB="/home2/web/Perl:/usr/local/lib/perl5/site_perl/EDPS"
  @INC:
    /home2/web/Perl
    /usr/local/lib/perl5/site_perl/EDPS
    /usr/local/lib/perl5/5.8.0/sun4-solaris
    /usr/local/lib/perl5/5.8.0
    /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.8.0
    /usr/local/lib/perl5/site_perl




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

Configured by root at Fri Jun  7 11:06:35 PDT 2002.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.18, archname=i386-linux
    uname='linux midas 2.4.18 #4 fri may 31 01:25:31 pdt 2002 i686 unknown '
    config_args='-de -Dprefix=/usr -Dcccdlflags=-fPIC -Dd_dosuid -Darchname=i386-linux -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dsitelib=/usr/lib/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl/i386-linux'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release)', 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, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
  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.6.1:
    /home2/jorda/Perl
    /home2/jorda/Proto1/PERL
    /usr/lib/perl5/i386-linux
    /usr/lib/perl5
    /usr/lib/perl5/site_perl/i386-linux
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/site_perl
    .

---
Environment for perl v5.6.1:
    HOME=/home2/jorda
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=fr_FR
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home2/jorda/bin:/usr/local/TeX/TL/bin/i386-linux/:/usr/local/pgsql/bin:/home2/jorda/bin:/usr/local/TeX/TL/bin/i386-linux/:/usr/local/pgsql/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/local/bin/texmfbin:/usr/local/jdk1.2.2/bin:/usr/lib/qt-3.0.4/bin:.
    PERL5LIB=/home2/jorda/Perl:/home2/jorda/Proto1/PERL
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


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