Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re/pat_advanced.t test 396 fails under -Dusethreads -Duse64bitall (solaris) #14640

Closed
p5pRT opened this issue Apr 20, 2015 · 22 comments
Closed

Comments

@p5pRT
Copy link

p5pRT commented Apr 20, 2015

Migrated from rt.perl.org#124348 (status was 'resolved')

Searchable as RT124348$

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2015

From @tonycoz

Created by @tonycoz

This requires both -Dusethread and -Duse64bitall and does not occur
with -DDEBUGGING.

This was bisected to​:

commit 64935bc
Author​: Karl Williamson <khw@​cpan.org>
Date​: Tue Feb 17 15​:03​:32 2015 -0700

  Add qr/\b{gcb}/
 
  A function implements seeing if the space between any two characters is
  a grapheme cluster break. Afer I wrote this, I realized that an array
  lookup might be a better implementation, but the deadline for v5.22 was
  too close to change it. I did see that my gcc optimized it down to
  an array lookup.
 
  This makes the implementation of \X go from being complicated to
  trivial.

Setting -Doptimize=-g also prevents it from occuring.

Separating out the test into a separate file, like​:

#!perl -l
package Str;
use overload q /""/ => sub {${$_ [0]};};
sub new {my ($c, $v) = @​_; bless \$v, $c;}

package main;
$_ = Str -> new ("a\x{100}/\x{100}b");
my @​temp = /\b(.)\x{100}/g;
print join ("​:", @​temp); #, "a​:/", "re_intuit_start and PL_bostr";

produces​:

/

as the output.

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.21.11:

Configured by tony at Mon Apr 20 16:42:53 EST 2015.

Summary of my perl5 (revision 5 version 21 subversion 11) configuration:
  Commit id: 6e8a73f25951830af805a38e0f612768bfcda4a5
  Platform:
    osname=solaris, osvers=2.11, archname=i86pc-solaris-thread-multi-64
    uname='sunos nereid 5.11 11.1 i86pc i386 i86pc '
    config_args='-des -Dusedevel -Dusethreads -Duse64bitall'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='/opt/solarisstudio12.3/bin/cc', ccflags ='-D_REENTRANT -m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV',
    optimize='-O',
    cppflags='-D_REENTRANT -m64'
    ccversion='Sun C 5.12 SunOS_i386 2011/11/16', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='/opt/solarisstudio12.3/bin/cc', ldflags =' -m64 -L/opt/solarisstudio12.3/prod/lib/amd64 -L/lib/64 -L/usr/gnu/lib '
    libpth=/opt/solarisstudio12.3/prod/lib/amd64 /lib/64 /usr/gnu/lib /usr/lib /usr/ccs/lib
    libs=-lpthread -lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
    perllibs=-lpthread -lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags=' -G -m64 -L/opt/solarisstudio12.3/prod/lib/amd64 -L/lib/64 -L/usr/gnu/lib'



@INC for perl 5.21.11:
    lib
    /opt/lib/perl5/site_perl/5.21.11/i86pc-solaris-thread-multi-64
    /opt/lib/perl5/site_perl/5.21.11
    /opt/lib/perl5/5.21.11/i86pc-solaris-thread-multi-64
    /opt/lib/perl5/5.21.11
    .


Environment for perl 5.21.11:
    HOME=/home/tony
    LANG=C
    LANGUAGE (unset)
    LC_ALL=
    LC_COLLATE=
    LC_CTYPE=
    LC_MESSAGES=
    LC_MONETARY=
    LC_NUMERIC=
    LC_TIME=
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/opt/solarisstudio12.3/bin/:/usr/bin:/usr/sbin
    PERL_BADLANG (unset)
    SHELL=/usr/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2015

From @khwilliamson

On 04/20/2015 01​:21 AM, Tony Cook (via RT) wrote​:

# New Ticket Created by Tony Cook
# Please include the string​: [perl #124348]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124348 >

This is a bug report for perl from tony@​develop-help.com,
generated with the help of perlbug 1.40 running under perl 5.21.11.

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

This requires both -Dusethread and -Duse64bitall and does not occur
with -DDEBUGGING.

This was bisected to​:

commit 64935bc
Author​: Karl Williamson <khw@​cpan.org>
Date​: Tue Feb 17 15​:03​:32 2015 -0700

 Add qr/\\b\{gcb\}/

 A function implements seeing if the space between any two characters is
 a grapheme cluster break\.  Afer I wrote this\, I realized that an array
 lookup might be a better implementation\, but the deadline for v5\.22 was
 too close to change it\.  I did see that my gcc optimized it down to
 an array lookup\.

 This makes the implementation of \\X go from being complicated to
 trivial\.

Setting -Doptimize=-g also prevents it from occuring.

Separating out the test into a separate file, like​:

#!perl -l
package Str;
use overload q /""/ => sub {${$_ [0]};};
sub new {my ($c, $v) = @​_; bless \$v, $c;}

package main;
$_ = Str -> new ("a\x{100}/\x{100}b");
my @​temp = /\b(.)\x{100}/g;
print join ("​:", @​temp); #, "a​:/", "re_intuit_start and PL_bostr";

produces​:

/

as the output.

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Is this only on solaris? Is it a 5.22 blocker in your opinion?

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2015

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2015

From @tonycoz

On Mon Apr 20 10​:11​:55 2015, public@​khwilliamson.com wrote​:

On 04/20/2015 01​:21 AM, Tony Cook (via RT) wrote​:

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Is this only on solaris? Is it a 5.22 blocker in your opinion?

I think so, both use64bitall and usethreads are common.

The smoke has been consistently failing since the commit.

I'll get you access to the VM where this is happening, if you like.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2015

From @khwilliamson

On 04/20/2015 04​:12 PM, Tony Cook via RT wrote​:

On Mon Apr 20 10​:11​:55 2015, public@​khwilliamson.com wrote​:

On 04/20/2015 01​:21 AM, Tony Cook (via RT) wrote​:

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Is this only on solaris? Is it a 5.22 blocker in your opinion?

I think so, both use64bitall and usethreads are common.

The smoke has been consistently failing since the commit.

I'll get you access to the VM where this is happening, if you like.

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124348

I now have access, and can reproduce the problem. Interestingly it goes
away if 'use re qw(Debug COMPILE)' is added.

But I can't find a gdb on the system to use to trace the execution.

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2015

From @iabyn

On Tue, Apr 21, 2015 at 12​:30​:24PM -0600, Karl Williamson wrote​:

But I can't find a gdb on the system to use to trace the execution.

IIRC (and I probably don't) the Solaris equivalent of gdb is dbx or
something like that.

--
The optimist believes that he lives in the best of all possible worlds.
As does the pessimist.

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2015

From @tonycoz

On Wed, Apr 22, 2015 at 11​:04​:43AM +0100, Dave Mitchell wrote​:

On Tue, Apr 21, 2015 at 12​:30​:24PM -0600, Karl Williamson wrote​:

But I can't find a gdb on the system to use to trace the execution.

IIRC (and I probably don't) the Solaris equivalent of gdb is dbx or
something like that.

adb, which on Solaris 11 is a link to mdb.

But I've installed gdb.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2015

From @Tux

On Wed, 22 Apr 2015 20​:54​:27 +1000, Tony Cook <tony@​develop-help.com>
wrote​:

On Wed, Apr 22, 2015 at 11​:04​:43AM +0100, Dave Mitchell wrote​:

On Tue, Apr 21, 2015 at 12​:30​:24PM -0600, Karl Williamson wrote​:

But I can't find a gdb on the system to use to trace the execution.

IIRC (and I probably don't) the Solaris equivalent of gdb is dbx or
something like that.

adb, which on Solaris 11 is a link to mdb.

adb (absolute debugger or advanced debugger) is more of an old-style
debugger present on most old-style OS's and is has a completely
different interface but supports both COFF and ELF. The advanced
debugger adb is the standard UNIX debugger found on Solaris 1 & 2,
HP-UX and SCO. It is the successor of a debugger called db.

dbx is a source-level debugger found primarily on Solaris, AIX, IRIX,
Tru64 UNIX, Linux and BSD operating systems. dbx was originally
developed at University of California, Berkeley, and subsequently made
its way to various vendors who had licensed BSD. dbx supports DWARF.

aix $ dbx --help
dbx​: fatal error​: DBX Startup Options​:

dbx [-a ProcessID] [-B DebugFile] [-c CommandFile] [-I Directory]
[ -E DebugEnvironment ] [-p [OldPath=NewPath​:... | File]] [-k]
[-v] [-u] [-x] [-F] [-L] [-r] [-C CoreFile | ObjectFile [CoreFile]]

  -a ProcessID Attach to specified process
  -c CommandFile Run dbx subcommands in specified file first
  -I Directory Include Directory in list of directories
  searched for source files
  -C CoreFile Allow to analyze core dump without ObjectFile
  -p OldPath=NewPath Substitute library path for core examination
  or when attaching to a process
  File Read library path substitutions for core
  examination or when attaching to a process
  from File
  -E DebugEnvironment Specifies the environment variable for the
  debug program
  -B DebugFile Specify an alternate debug file on startup
  -v Relax core file validity checking
  -k Map memory addresses
  -u Prepend file name symbols with an '@​'
  -x Strip postfix '_' from FORTRAN symbols
  -F Read all symbols at start-up time
  -L Keep linkage symbols
  -r Run object file immediately

aix $ adb --help
1281-061​: Usage​: adb [ -w ] [ -Idir ] [ -k ] [ -pPROMPT ] [ a.out [ core ]]

hpux $ adb --help
cannot open `--help'
hpux $ man adb
NAME
  adb - absolute debugger

SYNOPSIS
  adb [-w] [-Idir] [-k] [-m] [-Ppid] objfil [corfil]

HP bundles a set of debuggers with an umbrella GUI wdb (Wildebeast
Debugger).

$ wdb -version
HP WDB-GUI - HP Debugger Graphical User Interface - Version 1.1
$ wdb -?
usage​: wdb [gdb options] [Xt options] [executable-file [core-file or process-id]]

$ dde -v
dde, version 4.04.Z2

$ xdb -v
HP92453-02A.10.10/A.10.20 HP-UX SYMBOLIC DEBUGGER (XDB) $Revision​: 75.08 $

NAME
  xdb - C, FORTRAN, Pascal, and C++ Symbolic Debugger

SYNOPSIS
  xdb [-d dir] [-r file] [-R file] [-p file] [-P process_ID] [-L] [-l
  library]
  [-i file] [-o file] [-e file] [-S num] [-s] [objectfile [corefile]]

$ xdb --help
Usage​: xdb [options ...] [objfile [corefile]]

  Options​:
  -d dir specify alternate source directory
  -r file record debugger commands to file
  -p file playback debugger commands from file
  -R file restore-state file (from 'ss' command)
  -P pid adopt a running process
  -i path redirect child stdin to file or device
  -o path redirect child stdout to file or device
  -e path redirect child stderr to file or device
  -s enable debugging of shared libraries
  -l lib pre-load data from named shared library
  -S num increase string-cache size
  -L line mode (default is screen mode)
  -v print version and exit

$ /opt/langtools/bin/pxdb --help
/opt/langtools/bin/pxdb​: illegal option -- -
Usage​: pxdb [-m][-v] progfile
  pxdb [-x dbinfofile [-t statusfile] [-f listfile]] objfile ...
  pxdb [-m] [-s {on|off|enable|disable|status}] progfile

and finally GNU gdb

$ /opt/langtools/bin/gdb --version
HP gdb 1.1
Copyright 1986 - 1999 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 1.1 (based on GDB 4.17-hpwdb-980821)

But I've installed gdb.

Tony

--
H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/
using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/
http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2015

From @khwilliamson

On 04/20/2015 04​:12 PM, Tony Cook via RT wrote​:

On Mon Apr 20 10​:11​:55 2015, public@​khwilliamson.com wrote​:

On 04/20/2015 01​:21 AM, Tony Cook (via RT) wrote​:

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Is this only on solaris? Is it a 5.22 blocker in your opinion?

I think so, both use64bitall and usethreads are common.

The smoke has been consistently failing since the commit.

I'll get you access to the VM where this is happening, if you like.

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124348

The latest info about this is​:

Turning on compile and/or execute re debugging causes it to not fail.

Compiling with -O1 doesn't fail.

perl won't fully compile with -O0, failing at the last moment in
mktables (while writing out the list of files that it changed).

If I don't clean the workspace from an -O1, but re-run Configure with
instead -O0, then 'make test' (so that mktables doesn't run), the
project compiles, but with many many test failures.

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2015

From pdb_ml@yahoo.com.au

On Wed, Apr 22, 2015 4​:24​:52 PM, public@​khwilliamson.com wrote​:

On 04/20/2015 04​:12 PM, Tony Cook via RT wrote​:

On Mon Apr 20 10​:11​:55 2015, public@​khwilliamson.com wrote​:

On 04/20/2015 01​:21 AM, Tony Cook (via RT) wrote​:

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Is this only on solaris? Is it a 5.22 blocker in your opinion?

I think so, both use64bitall and usethreads are common.

The smoke has been consistently failing since the commit.

I'll get you access to the VM where this is happening, if you like.

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124348

The latest info about this is​:

Turning on compile and/or execute re debugging causes it to not fail.

Compiling with -O1 doesn't fail.

perl won't fully compile with -O0, failing at the last moment in
mktables (while writing out the list of files that it changed).

If I don't clean the workspace from an -O1, but re-run Configure with
instead -O0, then 'make test' (so that mktables doesn't run), the
project compiles, but with many many test failures.

Just some additional information,

TL;DR​: this bug does not seem to affect perl-5.21.11 built with GCC.

Yesterday I built 12 variants of perl 5.21.11 using GCC 4.8.4 and GCC 4.9.2, on X86 32-bit and 64-bit Compile Servers, running Sun Solaris 10 Update 8, Oracle Solaris 10 Update 11 and Oracle Solaris 11.2. No failures seen in any "gmake test" runs. These GCC were locally built not vendor provided. The 32-bit builds trigger a much larger set of warnings than the 64-bit builds but no compilation aborts.

64-bit systems using -DDuse64bitall
32-bit systems using -Duse64bitint
All systems using -Dusethreads -Dusedtrace

Other options to change installation paths, use bison, and be explicit about a few Solaris default like -Duselargefiles.
Before starting Configure, removed all instances of -G from hints/solaris_2.h (overkill I know) and used -Dlddlflags='-shared'

Regards,
Peter

PS​: VM Host names show the combinations explicitly.

sol10u08-gcc48-x86-32
sol10u08-gcc48-x86-64
sol10u08-gcc49-x86-32
sol10u08-gcc49-x86-64
sol10u11-gcc48-x86-32
sol10u11-gcc48-x86-64
sol10u11-gcc49-x86-32
sol10u11-gcc49-x86-64
sol11u02-gcc48-x86-32
sol11u02-gcc48-x86-64
sol11u02-gcc49-x86-32
sol11u02-gcc49-x86-64

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2015

From [Unknown Contact. See original ticket]

On Wed, Apr 22, 2015 4​:24​:52 PM, public@​khwilliamson.com wrote​:

On 04/20/2015 04​:12 PM, Tony Cook via RT wrote​:

On Mon Apr 20 10​:11​:55 2015, public@​khwilliamson.com wrote​:

On 04/20/2015 01​:21 AM, Tony Cook (via RT) wrote​:

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Is this only on solaris? Is it a 5.22 blocker in your opinion?

I think so, both use64bitall and usethreads are common.

The smoke has been consistently failing since the commit.

I'll get you access to the VM where this is happening, if you like.

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124348

The latest info about this is​:

Turning on compile and/or execute re debugging causes it to not fail.

Compiling with -O1 doesn't fail.

perl won't fully compile with -O0, failing at the last moment in
mktables (while writing out the list of files that it changed).

If I don't clean the workspace from an -O1, but re-run Configure with
instead -O0, then 'make test' (so that mktables doesn't run), the
project compiles, but with many many test failures.

Just some additional information,

TL;DR​: this bug does not seem to affect perl-5.21.11 built with GCC.

Yesterday I built 12 variants of perl 5.21.11 using GCC 4.8.4 and GCC 4.9.2, on X86 32-bit and 64-bit Compile Servers, running Sun Solaris 10 Update 8, Oracle Solaris 10 Update 11 and Oracle Solaris 11.2. No failures seen in any "gmake test" runs. These GCC were locally built not vendor provided. The 32-bit builds trigger a much larger set of warnings than the 64-bit builds but no compilation aborts.

64-bit systems using -DDuse64bitall
32-bit systems using -Duse64bitint
All systems using -Dusethreads -Dusedtrace

Other options to change installation paths, use bison, and be explicit about a few Solaris default like -Duselargefiles.
Before starting Configure, removed all instances of -G from hints/solaris_2.h (overkill I know) and used -Dlddlflags='-shared'

Regards,
Peter

PS​: VM Host names show the combinations explicitly.

sol10u08-gcc48-x86-32
sol10u08-gcc48-x86-64
sol10u08-gcc49-x86-32
sol10u08-gcc49-x86-64
sol10u11-gcc48-x86-32
sol10u11-gcc48-x86-64
sol10u11-gcc49-x86-32
sol10u11-gcc49-x86-64
sol11u02-gcc48-x86-32
sol11u02-gcc48-x86-64
sol11u02-gcc49-x86-32
sol11u02-gcc49-x86-64

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2015

From @Tux

On Thu, 23 Apr 2015 18​:02​:37 -0700, "Peter Bray via RT"
<perlbug-comment@​perl.org> wrote​:

On Wed, Apr 22, 2015 4​:24​:52 PM, public@​khwilliamson.com wrote​:

On 04/20/2015 04​:12 PM, Tony Cook via RT wrote​:

On Mon Apr 20 10​:11​:55 2015, public@​khwilliamson.com wrote​:

On 04/20/2015 01​:21 AM, Tony Cook (via RT) wrote​:

The correct result ("a​:/") is produced if a non-overloaded value is
used.

Is this only on solaris? Is it a 5.22 blocker in your opinion?

I think so, both use64bitall and usethreads are common.

The smoke has been consistently failing since the commit.

I'll get you access to the VM where this is happening, if you like.

Tony

The latest info about this is​:

Turning on compile and/or execute re debugging causes it to not fail.

Compiling with -O1 doesn't fail.

perl won't fully compile with -O0, failing at the last moment in
mktables (while writing out the list of files that it changed).

If I don't clean the workspace from an -O1, but re-run Configure with
instead -O0, then 'make test' (so that mktables doesn't run), the
project compiles, but with many many test failures.

Just some additional information,

TL;DR​: this bug does not seem to affect perl-5.21.11 built with GCC.

Yesterday I built 12 variants of perl 5.21.11 using GCC 4.8.4 and GCC
4.9.2, on X86 32-bit and 64-bit Compile Servers, running Sun Solaris
10 Update 8, Oracle Solaris 10 Update 11 and Oracle Solaris 11.2. No
failures seen in any "gmake test" runs. These GCC were locally built
not vendor provided. The 32-bit builds trigger a much larger set of
warnings than the 64-bit builds but no compilation aborts.

Do you have the resources to run Test​::Smoke on these boxes? We do not
have that range of Solaris well-covered, so if that is an option, it
would give us a nice addition to our test suite.

64-bit systems using -DDuse64bitall
32-bit systems using -Duse64bitint
All systems using -Dusethreads -Dusedtrace

Other options to change installation paths, use bison, and be explicit
about a few Solaris default like -Duselargefiles.
Before starting Configure, removed all instances of -G from
hints/solaris_2.h (overkill I know) and used -Dlddlflags='-shared'

Regards,
Peter

PS​: VM Host names show the combinations explicitly.

sol10u08-gcc48-x86-32
sol10u08-gcc48-x86-64
sol10u08-gcc49-x86-32
sol10u08-gcc49-x86-64
sol10u11-gcc48-x86-32
sol10u11-gcc48-x86-64
sol10u11-gcc49-x86-32
sol10u11-gcc49-x86-64
sol11u02-gcc48-x86-32
sol11u02-gcc48-x86-64
sol11u02-gcc49-x86-32
sol11u02-gcc49-x86-64

--
H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/
using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/
http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2015

From pdb_ml@yahoo.com.au

On 24/04/15 06​:45 PM, H.Merijn Brand wrote​:

Do you have the resources to run Test​::Smoke on these boxes? We do not
have that range of Solaris well-covered, so if that is an option, it
would give us a nice addition to our test suite.

Not at the moment, the project I'm working on will keep these systems at
very high utilization for the next few months. I'll add a personal todo,
to look at the requirements after the project is complete.

Regards,
Peter

@p5pRT
Copy link
Author

p5pRT commented Apr 27, 2015

From @rjbs

On Wed Apr 22 16​:24​:52 2015, public@​khwilliamson.com wrote​:

The latest info about this is​:
[...]

So, where do we stand? The impression I get is that we don't have a clear route forward here. Any suggestions as to what can be done to move this forward?

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Apr 27, 2015

From @tonycoz

On Mon Apr 27 15​:26​:16 2015, rjbs wrote​:

On Wed Apr 22 16​:24​:52 2015, public@​khwilliamson.com wrote​:

The latest info about this is​:
[...]

So, where do we stand? The impression I get is that we don't have a
clear route forward here. Any suggestions as to what can be done to
move this forward?

This appears to be a code generation bug in solaris studio 12.3.

When calculating PL_charclass['\n'] it's using a bogus value from the stack
frame instead of looking up the value in the global PL_charclass array.

The non-overloaded version is only working by accident.

If I move the '\n' to a variable the code works correctly, of course, this will slow down all implementations to work around what appears to be a real bug in
one compiler.

An alternative might be to use C< 0 > instead of C< isWORDCHAR_L1('\n') >
but I assume we're using the second for a reason (it's self-documenting
if nothing else.)

The code that's misbehaving is this code in S_regmatch()​:

  case TRADITIONAL_BOUND​:
  ln = (locinput == reginfo->strbeg)
  ? isWORDCHAR_L1('\n')
  : isWORDCHAR_utf8(reghop3((U8*)locinput, -1,
  (U8*)(reginfo->strbeg)));
  n = (NEXTCHR_IS_EOS)
  ? isWORDCHAR_L1('\n')
  : isWORDCHAR_utf8((U8*)locinput);
  match = cBOOL(ln != n);
  break;

The code generated for the isWORDCHAR_L1('\n') appears to be​:

{ 5632 } movl -600(%rbp),%eax / sym=.CV12B
{ 5632 } andl $1,%eax
{ 5632 } setne %al
{ 5632 } movsbl %al,%eax / dest0=#tmp496,

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2015

From @khwilliamson

On 04/27/2015 05​:33 PM, Tony Cook via RT wrote​:

On Mon Apr 27 15​:26​:16 2015, rjbs wrote​:

On Wed Apr 22 16​:24​:52 2015, public@​khwilliamson.com wrote​:

The latest info about this is​:
[...]

So, where do we stand? The impression I get is that we don't have a
clear route forward here. Any suggestions as to what can be done to
move this forward?

This appears to be a code generation bug in solaris studio 12.3.

When calculating PL_charclass['\n'] it's using a bogus value from the stack
frame instead of looking up the value in the global PL_charclass array.

The non-overloaded version is only working by accident.

If I move the '\n' to a variable the code works correctly, of course, this will slow down all implementations to work around what appears to be a real bug in
one compiler.

An alternative might be to use C< 0 > instead of C< isWORDCHAR_L1('\n') >
but I assume we're using the second for a reason (it's self-documenting
if nothing else.)

The only reason was to make it self-documenting, at no apparent runtime
cost, as the compiler should evaluate it and replace it by 0. But one
can document it by doing what I do in the attached patch, which I will
smoke.

I'm still concerned that compiling with -O0 causes perl to not build. A
final option is to use -O1, for the particular combination of Configure
options that cause this failure. But what else in this compiler is broken?

The code that's misbehaving is this code in S_regmatch()​:

                 case TRADITIONAL\_BOUND&#8203;:
                     ln = \(locinput == reginfo\->strbeg\)
                          ? isWORDCHAR\_L1\('\\n'\)
                          : isWORDCHAR\_utf8\(reghop3\(\(U8\*\)locinput\, \-1\,
                                                             \(U8\*\)\(reginfo\->strbeg\)\)\);
                     n = \(NEXTCHR\_IS\_EOS\)
                         ? isWORDCHAR\_L1\('\\n'\)
                         : isWORDCHAR\_utf8\(\(U8\*\)locinput\);
                     match = cBOOL\(ln \!= n\);
                     break;

The code generated for the isWORDCHAR_L1('\n') appears to be​:

{ 5632 } movl -600(%rbp),%eax / sym=.CV12B
{ 5632 } andl $1,%eax
{ 5632 } setne %al
{ 5632 } movsbl %al,%eax / dest0=#tmp496,

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124348

@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2015

From @khwilliamson

0001-PATCH-perl-124348-XXX.patch
From 236603201bd10cef4fee81a23d74a1e9e7386316 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Mon, 27 Apr 2015 21:52:02 -0600
Subject: [PATCH] PATCH: [perl #124348] XXX

XXX Fill in
---
 regexec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/regexec.c b/regexec.c
index 7247259..893ce3b 100644
--- a/regexec.c
+++ b/regexec.c
@@ -5623,11 +5623,11 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
                 switch((bound_type) FLAGS(scan)) {
                     case TRADITIONAL_BOUND:
                         ln = (locinput == reginfo->strbeg)
-                             ? isWORDCHAR_L1('\n')
+                             ? 0 /* isWORDCHAR_L1('\n') */
                              : isWORDCHAR_utf8(reghop3((U8*)locinput, -1,
                                                                 (U8*)(reginfo->strbeg)));
                         n = (NEXTCHR_IS_EOS)
-                            ? isWORDCHAR_L1('\n')
+                            ? 0 /* isWORDCHAR_L1('\n') */
                             : isWORDCHAR_utf8((U8*)locinput);
                         match = cBOOL(ln != n);
                         break;
@@ -5693,10 +5693,10 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
                 switch((bound_type) FLAGS(scan)) {
                     case TRADITIONAL_BOUND:
                         ln = (locinput == reginfo->strbeg)
-                            ? isWORDCHAR_L1('\n')
+                            ? 0 /* isWORDCHAR_L1('\n') */
                             : isWORDCHAR_L1(UCHARAT(locinput - 1));
                         n = (NEXTCHR_IS_EOS)
-                            ? isWORDCHAR_L1('\n')
+                            ? 0 /* isWORDCHAR_L1('\n') */
                             : isWORDCHAR_L1(nextchr);
                         match = cBOOL(ln != n);
                         break;
-- 
2.1.0

@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2015

From @khwilliamson

On 04/27/2015 09​:56 PM, Karl Williamson wrote​:

On 04/27/2015 05​:33 PM, Tony Cook via RT wrote​:

On Mon Apr 27 15​:26​:16 2015, rjbs wrote​:

On Wed Apr 22 16​:24​:52 2015, public@​khwilliamson.com wrote​:

The latest info about this is​:
[...]

So, where do we stand? The impression I get is that we don't have a
clear route forward here. Any suggestions as to what can be done to
move this forward?

This appears to be a code generation bug in solaris studio 12.3.

When calculating PL_charclass['\n'] it's using a bogus value from the
stack
frame instead of looking up the value in the global PL_charclass array.

The non-overloaded version is only working by accident.

If I move the '\n' to a variable the code works correctly, of course,
this will slow down all implementations to work around what appears to
be a real bug in
one compiler.

An alternative might be to use C< 0 > instead of C< isWORDCHAR_L1('\n') >
but I assume we're using the second for a reason (it's self-documenting
if nothing else.)

The only reason was to make it self-documenting, at no apparent runtime
cost, as the compiler should evaluate it and replace it by 0. But one
can document it by doing what I do in the attached patch, which I will
smoke.

I forgot to mention that doing this causes the the tests to not fail on
Tony's machine that failed prior to the patch.

I'm still concerned that compiling with -O0 causes perl to not build. A
final option is to use -O1, for the particular combination of Configure
options that cause this failure. But what else in this compiler is broken?

The code that's misbehaving is this code in S_regmatch()​:

                 case TRADITIONAL\_BOUND&#8203;:
                     ln = \(locinput == reginfo\->strbeg\)
                          ? isWORDCHAR\_L1\('\\n'\)
                          : isWORDCHAR\_utf8\(reghop3\(\(U8\*\)locinput\,

-1,

(U8*)(reginfo->strbeg)));
n = (NEXTCHR_IS_EOS)
? isWORDCHAR_L1('\n')
: isWORDCHAR_utf8((U8*)locinput);
match = cBOOL(ln != n);
break;

The code generated for the isWORDCHAR_L1('\n') appears to be​:

{ 5632 } movl -600(%rbp),%eax / sym=.CV12B
{ 5632 } andl $1,%eax
{ 5632 } setne %al
{ 5632 } movsbl %al,%eax / dest0=#tmp496,

Tony

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124348

@p5pRT
Copy link
Author

p5pRT commented Apr 30, 2015

From @khwilliamson

Thanks to Tony Cook for tracking this down

Fixed by not having the compiler do any evaluation
in commit 996de84

--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Apr 30, 2015

@khwilliamson - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2015

From @khwilliamson

Thank you for submitting this ticket.

The issue should now be resolved with the release today of Perl v5.22, which is available at http​://www.perl.org/get.html
--
Karl Williamson for the Perl 5 team

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2015

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant