Front page | perl.perl5.porters |
Postings from October 2016
[perl #129859] Bleadperl v5.25.5-65-g5012eeb breaksSPROUT/Classic-Perl-0.06.tar.gz
Thread Next
From:
Dan Collins
Date:
October 12, 2016 17:49
Subject:
[perl #129859] Bleadperl v5.25.5-65-g5012eeb breaksSPROUT/Classic-Perl-0.06.tar.gz
Message ID:
rt-4.0.24-5791-1476294569-1057.129859-75-0@perl.org
# New Ticket Created by Dan Collins
# Please include the string: [perl #129859]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=129859 >
While smoking CPAN modules against various versions of Perl, I noticed the
following unexpected failure:
------
Bisects to:
HEAD is now at 1c56654 Time-HiRes: explicit clockid_t cast for C++11
good - zero exit from /tmp/OMLcMdGrFd/bin/perl -I /home/cpanbisect/.cpan
-MCPAN::MyConfig -MCPAN -e $CPAN::Config->{build_dir}=q{/tmp/TgbuOVrsHm};
-e install('Classic::Perl'); die unless CPAN::Shell->expand(Module =>
'Classic::Perl')->uptodate;
5012eebe5586df96a1869edfedea1382aa254085 is the first bad commit
commit 5012eebe5586df96a1869edfedea1382aa254085
Author: David Mitchell <davem@iabyn.com>
Date: Thu Sep 15 10:59:37 2016 +0100
make OP_SPLIT a PMOP, and eliminate OP_PUSHRE
Most ops that execute a regex, such as match and subst, are of type
PMOP.
A PMOP allows the actual regex to be attached directly to that op, due
to its extra fields.
OP_SPLIT is different; it is just a plain LISTOP, but it always has an
OP_PUSHRE as its first child, which *is* a PMOP and which has the regex
attached.
At runtime, pp_pushre()'s only job is to push itself (i.e. the current
PL_op) onto the stack. Later pp_split() pops this to get access to the
regex it wants to execute.
This is a bit unpleasant, because we're pushing an OP* onto the stack,
which is supposed to be an array of SV*'s. As a bit of a hack, on
DEBUGGING builds we push a PVLV with the PL_op address embedded instead,
but this still isn't very satisfactory.
Now that regexes are first-class SVs, we could push a REGEXP onto the
stack rather than PL_op. However, there is an optimisation of @array =
split which eliminates the assign and embeds the array's GV/padix
directly
in the PUSHRE op. So split still needs access to that op. But the pushre
op will always be splitop->op_first anyway, so one possibility is to
just
skip executing the pushre altogether, and make pp_split just directly
access op_first instead to get the regex and @array info.
But if we're doing that, then why not just go the full hog and make
OP_SPLIT into a PMOP, and eliminate the OP_PUSHRE op entirely: with the
data that was spread across the two ops now combined into just the one
split op.
That is exactly what this commit does.
For a simple compile-time pattern like split(/foo/, $s, 1), the optree
looks like:
before:
<@> split[t2] lK
</> pushre(/"foo"/) s/RTIME
<0> padsv[$s:1,2] s
<$> const(IV 1) s
after:
</> split(/"foo"/)[t2] lK/RTIME
<0> padsv[$s:1,2] s
<$> const[IV 1] s
while for a run-time expression like split(/$pat/, $s, 1),
before:
<@> split[t3] lK
</> pushre() sK/RTIME
<|> regcomp(other->8) sK
<0> padsv[$pat:2,3] s
<0> padsv[$s:1,3] s
<$> const(IV 1)s
after:
</> split()[t3] lK/RTIME
<|> regcomp(other->8) sK
<0> padsv[$pat:2,3] s
<0> padsv[$s:1,3] s
<$> const[IV 1] s
This makes the code faster and simpler.
At the same time, two new private flags have been added for OP_SPLIT -
OPpSPLIT_ASSIGN and OPpSPLIT_LEX - which make it explicit that the
assign op has been optimised away, and if so, whether the array is
lexical.
Also, deparsing of split has been improved, to the extent that
perl TEST -deparse op/split.t
now passes.
Also, a couple of panic messages in pp_split() have been replaced with
asserts().
:040000 040000 e627cd701d4a5444ae8edc9c666e594dddc5636a
7d421043f46e71ad9f4fd25f0e50d7a771684107 M Porting
:040000 040000 f8bbfc17c9fdd2aff02ea11bce05bfa1770729da
f131c344c83491ff9af26b2b1796749b8d81bdd9 M cpan
:040000 040000 0ccc007f8052b8f22afca7e299cf0a3adfb584b5
23423271d085aff18c2df2c690d1d37bbfbccb60 M dist
:100644 100644 e69421be6faa2f7cb3ad763b7f134ffda9648a16
5f753389744983c1bd6c9a74f52d92df5329c0c3 M dump.c
:100644 100644 168fe689779a5147f27b9ce3a7c1badf18358606
e4c4e30b283f18daa655c0a876572007361a43f7 M embed.fnc
:040000 040000 3f43bc5b57e03a3939299a654830b43814a0f38b
36dcce02a21c1db6e478c02cde3da2f713e77dc4 M ext
:040000 040000 a587e32369a751d18c0dcf05b2f5a7fca27830ef
eb92409e290e5e54112e01904078ce69b7ef5b90 M lib
:100644 100644 5621d07f3aa8bc881c481cc15066cdd9cd4a27a3
d3c9001d493fe8af0adaecc83fd1f92646449200 M op.c
:100644 100644 3ded4bb318eeeba2e33c0225a24cbda1c83f95d7
47e626550038b192e3430b4f98af60555d3a64b0 M op.h
:100644 100644 565cc9f353ae84d527969a74c542baf2ea803775
5dc68056703d58e2da9b99a8474d7eb95d090437 M opcode.h
:100644 100644 e04d331a7ca73dcc03790308928aa84ee223aa47
62bed505deb7b546c0fceb31433b189338193249 M opnames.h
:040000 040000 4cc8fe1b1429f85d2c7dfd0838a88dd2828a3b0c
9e6569dfbb7cbdd06d6a08ecf36b975011e2234e M pod
:100644 100644 837b67b85c8c0e77aff2eb6e33909d986ca0d4a4
eab970d3ccd528b04007ebb96b3785d77c2250ef M pp.c
:100644 100644 afc3b4b9e4df91e1f9c9c9044f283e6d78506fc5
36b68b61fb46ced469de18f135d72b5d79238565 M pp_ctl.c
:100644 100644 3c07674954340b2e999464369f877224e654cb2e
ee908c5460ba423a9014f84846150298f8e1bf3f M pp_hot.c
:100644 100644 16b172934840f1e06fec5a4a1bcd61c6b9961171
e9315467999c997e43d5b17ae9573ba70519a66b M pp_proto.h
:100644 100644 b30a5933cea3ec64fd9bbf9fc5dbdb7f5c0b5547
9f504eae1c246e15bf241df4b16947ff47fdebcc M proto.h
:040000 040000 7f9c63d3f45a26bd50818ab488b3bdd502a82c3e
2a1b6a5ac2663e38f22df51676caae188e8fc277 M regen
:100644 100644 8a471f9d0b4585cf8e6de0a3c84a9a1c42a99c3e
7351afdc765a6109dcbbebb7575946e5d8b63d98 M regexp.h
:040000 040000 9c95e2c563d7e541cb2c057f35da70783e12609a
3ba9d046ca6099b01b5fde6881ad3a0e49095ac5 M t
bisect run success
That took 1813 seconds.
------
Diagnostics attached. Luckily this appears to be the only CPAN module that
does this thing. I suspect that it is the CPAN module, and not core, that
will have to change, since I suspect the module was relying on internals
that have changed.
------
Perl -V:
Summary of my perl5 (revision 5 version 25 subversion 6) configuration:
Commit id: 11a12be6c2df2fcd9601f9fde8c7df8c7538c956
Platform:
osname=linux
osvers=3.16.0-4-amd64
archname=x86_64-linux-thread-multi
uname='linux digitalis 3.16.0-4-amd64 #1 smp debian 3.16.36-1+deb8u1
(2016-09-03) x86_64 gnulinux '
config_args='-Dusedevel -DDEBUGGING -Dusethreads
-Dprefix=/home/cpan2/install -Uversiononly -des'
hint=recommended
useposix=true
d_sigaction=define
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
bincompat5005=undef
Compiler:
cc='cc'
ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2 -g'
cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='4.9.2'
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='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.19.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.19'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
DEBUGGING
HAS_TIMES
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_TRACK_MEMPOOL
PERL_USE_DEVEL
USE_64_BIT_ALL
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_REENTRANT_API
Built under linux
Compiled at Oct 11 2016 16:20:18
%ENV:
PERLBREW_BASHRC_VERSION="0.76"
PERLBREW_HOME="/home/dcollins/.perlbrew"
PERLBREW_ROOT="/home/dcollins/toolchain/perl5"
@INC:
/home/cpan2/install/lib/perl5/site_perl/5.25.6/x86_64-linux-thread-multi
/home/cpan2/install/lib/perl5/site_perl/5.25.6
/home/cpan2/install/lib/perl5/5.25.6/x86_64-linux-thread-multi
/home/cpan2/install/lib/perl5/5.25.6
.
Thread Next
-
[perl #129859] Bleadperl v5.25.5-65-g5012eeb breaksSPROUT/Classic-Perl-0.06.tar.gz
by Dan Collins