develooper Front page | perl.perl5.porters | Postings from September 2012

[perl #115080] m?? doesn't only once match on -Duseithreads

Thread Previous | Thread Next
From:
ina cpan
Date:
September 28, 2012 23:25
Subject:
[perl #115080] m?? doesn't only once match on -Duseithreads
Message ID:
rt-3.6.HEAD-11172-1348899915-871.115080-75-0@perl.org
# New Ticket Created by  ina cpan 
# Please include the string:  [perl #115080]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115080 >


Cc: ina@cpan.org
Subject: m?? doesn't only once match on -Duseithreads
Message-Id: <5.17.3_27618_1348898317@hinaba-desktop>
Reply-To: ina@cpan.org
To: perlbug@perl.org
From: ina@cpan.org


This is a bug report for perl from ina@cpan.org,
generated with the help of perlbug 1.39 running under perl 5.17.3.


-----------------------------------------------------------------
[Please describe your issue here]

m?? doesn't only once match on -Duseithreads

On perl 5.17.x

Without -Duseithreads
  test1 = (1 0 0) m?AAA$var?  $ver=qr//        # ok
  test2 = (1 0 0) m?AAA$var?  $ver=qr/(?{1})/  # ok
  test3 = (1 0 0) m?AAA$var?o $ver=qr/(?{1})/  # ok

With -Duseithreads
  test1 = (1 0 0) m?AAA$var?  $ver=qr//        # ok
  test2 = (1 1 1) m?AAA$var?  $ver=qr/(?{1})/  # not only once!
  test3 = (1 0 0) m?AAA$var?o $ver=qr/(?{1})/  # ok

# match_once.pl

$var = qr//;
@m_once = ();
for (qw(AAA AAA AAA)) {
     if (m?AAA$var?) {
        push @m_once, 1;
    }
    else {
        push @m_once, 0;
    }
}
print qq{test1 = (@m_once) m?AAA¥$var?  ¥$ver=qr//¥n};

$var = qr/(?{1})/;
@m_once = ();
for (qw(AAA AAA AAA)) {
     if (m?AAA$var?) {
        push @m_once, 1;
    }
    else {
        push @m_once, 0;
    }
}
print qq{test2 = (@m_once) m?AAA¥$var?  ¥$ver=qr/(?{1})/¥n};

$var = qr/(?{1})/;
@m_once = ();
for (qw(AAA AAA AAA)) {
     if (m?AAA$var?o) { # with /o
        push @m_once, 1;
    }
    else {
        push @m_once, 0;
    }
}
print qq{test3 = (@m_once) m?AAA¥$var?o ¥$ver=qr/(?{1})/¥n};

__END__

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

Configured by hinaba at Sat Sep 29 13:36:48 JST 2012.

Summary of my perl5 (revision 5 version 17 subversion 3) configuration:

  Platform:
    osname=linux, osvers=2.6.27-7-generic, archname=i686-linux-thread-multi
    uname='linux hinaba-desktop 2.6.27-7-generic #1 smp thu oct 30
04:18:38 utc 2008 i686 gnulinux '
    config_args='-de -Duserelocatableinc
-Dprefix=/home/hinaba/perl5/perlbrew/perls/perl-5.17.3 -Duseithreads
-Dusedevel -Aeval:scriptdir=/home/hinaba/perl5/perlbrew/perls/perl-5.17.3/bin'
    hint=recommended, useposix=true, d_sigaction=define
    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='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
    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 =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.8.90.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.8.90'
  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:


---
@INC for perl 5.17.3:
    /home/hinaba/perl5/perlbrew/perls/perl-5.17.3/lib/site_perl/5.17.3/i686-linux-thread-multi
    /home/hinaba/perl5/perlbrew/perls/perl-5.17.3/lib/site_perl/5.17.3
    /home/hinaba/perl5/perlbrew/perls/perl-5.17.3/lib/5.17.3/i686-linux-thread-multi
    /home/hinaba/perl5/perlbrew/perls/perl-5.17.3/lib/5.17.3
    .

---
Environment for perl 5.17.3:
    HOME=/home/hinaba
    LANG=ja_JP.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Previous | 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