36 changes: 18 additions & 18 deletions Porting/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ api_subversion='0'
api_version='30'
api_versionstring='5.30.0'
ar='ar'
archlib='/opt/perl/lib/5.30.2/x86_64-linux'
archlibexp='/opt/perl/lib/5.30.2/x86_64-linux'
archlib='/opt/perl/lib/5.30.3/x86_64-linux'
archlibexp='/opt/perl/lib/5.30.3/x86_64-linux'
archname64=''
archname='x86_64-linux'
archobjs=''
Expand Down Expand Up @@ -845,21 +845,21 @@ incpath=''
incpth='/usr/lib/gcc/x86_64-linux-gnu/4.9/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/include'
inews=''
initialinstalllocation='/opt/perl/bin'
installarchlib='/opt/perl/lib/5.30.2/x86_64-linux'
installarchlib='/opt/perl/lib/5.30.3/x86_64-linux'
installbin='/opt/perl/bin'
installhtml1dir=''
installhtml3dir=''
installman1dir='/opt/perl/man/man1'
installman3dir='/opt/perl/man/man3'
installprefix='/opt/perl'
installprefixexp='/opt/perl'
installprivlib='/opt/perl/lib/5.30.2'
installprivlib='/opt/perl/lib/5.30.3'
installscript='/opt/perl/bin'
installsitearch='/opt/perl/lib/site_perl/5.30.2/x86_64-linux'
installsitearch='/opt/perl/lib/site_perl/5.30.3/x86_64-linux'
installsitebin='/opt/perl/bin'
installsitehtml1dir=''
installsitehtml3dir=''
installsitelib='/opt/perl/lib/site_perl/5.30.2'
installsitelib='/opt/perl/lib/site_perl/5.30.3'
installsiteman1dir='/opt/perl/man/man1'
installsiteman3dir='/opt/perl/man/man3'
installsitescript='/opt/perl/bin'
Expand Down Expand Up @@ -984,7 +984,7 @@ perl_patchlevel=''
perl_static_inline='static __inline__'
perladmin='yourname@yourhost.yourplace.com'
perllibs='-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc'
perlpath='/opt/perl/bin/perl5.30.2'
perlpath='/opt/perl/bin/perl5.30.3'
pg='pg'
phostname=''
pidtype='pid_t'
Expand All @@ -993,8 +993,8 @@ pmake=''
pr=''
prefix='/opt/perl'
prefixexp='/opt/perl'
privlib='/opt/perl/lib/5.30.2'
privlibexp='/opt/perl/lib/5.30.2'
privlib='/opt/perl/lib/5.30.3'
privlibexp='/opt/perl/lib/5.30.3'
procselfexe='"/proc/self/exe"'
ptrsize='8'
quadkind='2'
Expand Down Expand Up @@ -1059,17 +1059,17 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
sig_size='69'
signal_t='void'
sitearch='/opt/perl/lib/site_perl/5.30.2/x86_64-linux'
sitearchexp='/opt/perl/lib/site_perl/5.30.2/x86_64-linux'
sitearch='/opt/perl/lib/site_perl/5.30.3/x86_64-linux'
sitearchexp='/opt/perl/lib/site_perl/5.30.3/x86_64-linux'
sitebin='/opt/perl/bin'
sitebinexp='/opt/perl/bin'
sitehtml1dir=''
sitehtml1direxp=''
sitehtml3dir=''
sitehtml3direxp=''
sitelib='/opt/perl/lib/site_perl/5.30.2'
sitelib='/opt/perl/lib/site_perl/5.30.3'
sitelib_stem='/opt/perl/lib/site_perl'
sitelibexp='/opt/perl/lib/site_perl/5.30.2'
sitelibexp='/opt/perl/lib/site_perl/5.30.3'
siteman1dir='/opt/perl/man/man1'
siteman1direxp='/opt/perl/man/man1'
siteman3dir='/opt/perl/man/man3'
Expand All @@ -1095,7 +1095,7 @@ src='.'
ssizetype='ssize_t'
st_ino_sign='1'
st_ino_size='8'
startperl='#!/opt/perl/bin/perl5.30.2'
startperl='#!/opt/perl/bin/perl5.30.3'
startsh='#!/bin/sh'
static_ext=' '
stdchar='char'
Expand All @@ -1107,7 +1107,7 @@ stdio_ptr='((fp)->_IO_read_ptr)'
stdio_stream_array=''
strerror_r_proto='0'
submit=''
subversion='2'
subversion='3'
sysman='/usr/share/man/man1'
sysroot=''
tail=''
Expand Down Expand Up @@ -1205,8 +1205,8 @@ vendorprefix=''
vendorprefixexp=''
vendorscript=''
vendorscriptexp=''
version='5.30.2'
version_patchlevel_string='version 30 subversion 2'
version='5.30.3'
version_patchlevel_string='version 30 subversion 3'
versiononly='define'
vi=''
xlibpth='/usr/lib/386 /lib/386'
Expand All @@ -1216,7 +1216,7 @@ zcat=''
zip='zip'
PERL_REVISION=5
PERL_VERSION=30
PERL_SUBVERSION=2
PERL_SUBVERSION=3
PERL_API_REVISION=5
PERL_API_VERSION=30
PERL_API_SUBVERSION=0
Expand Down
18 changes: 9 additions & 9 deletions Porting/config_H
Original file line number Diff line number Diff line change
Expand Up @@ -1239,8 +1239,8 @@
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#define ARCHLIB "/opt/perl/lib/5.30.2/x86_64-linux" /**/
#define ARCHLIB_EXP "/opt/perl/lib/5.30.2/x86_64-linux" /**/
#define ARCHLIB "/opt/perl/lib/5.30.3/x86_64-linux" /**/
#define ARCHLIB_EXP "/opt/perl/lib/5.30.3/x86_64-linux" /**/

/* BIN:
* This symbol holds the path of the bin directory where the package will
Expand Down Expand Up @@ -1293,8 +1293,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#define PRIVLIB "/opt/perl/lib/5.30.2" /**/
#define PRIVLIB_EXP "/opt/perl/lib/5.30.2" /**/
#define PRIVLIB "/opt/perl/lib/5.30.3" /**/
#define PRIVLIB_EXP "/opt/perl/lib/5.30.3" /**/

/* SITEARCH:
* This symbol contains the name of the private library for this package.
Expand All @@ -1311,8 +1311,8 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#define SITEARCH "/opt/perl/lib/site_perl/5.30.2/x86_64-linux" /**/
#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.30.2/x86_64-linux" /**/
#define SITEARCH "/opt/perl/lib/site_perl/5.30.3/x86_64-linux" /**/
#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.30.3/x86_64-linux" /**/

/* SITELIB:
* This symbol contains the name of the private library for this package.
Expand All @@ -1334,8 +1334,8 @@
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
#define SITELIB "/opt/perl/lib/site_perl/5.30.2" /**/
#define SITELIB_EXP "/opt/perl/lib/site_perl/5.30.2" /**/
#define SITELIB "/opt/perl/lib/site_perl/5.30.3" /**/
#define SITELIB_EXP "/opt/perl/lib/site_perl/5.30.3" /**/
#define SITELIB_STEM "/opt/perl/lib/site_perl" /**/

/* PERL_VENDORARCH:
Expand Down Expand Up @@ -4109,7 +4109,7 @@
* script to make sure (one hopes) that it runs with perl and not
* some shell.
*/
#define STARTPERL "#!/opt/perl/bin/perl5.30.2" /**/
#define STARTPERL "#!/opt/perl/bin/perl5.30.3" /**/

/* HAS_STDIO_STREAM_ARRAY:
* This symbol, if defined, tells that there is an array
Expand Down
67 changes: 66 additions & 1 deletion Porting/epigraphs.pod
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,34 @@ Consult your favorite dictionary for details.

=head1 EPIGRAPHS

=head2 v5.31.11 - John F. Kennedy, National Committee for a Sane Nuclear Policy

L<Announced on 2020-04-28 by Sawyer X|https://www.nntp.perl.org/group/perl.perl5.porters/2020/04/msg257385.html>

Mankind must put an end to war, or war will put an end to mankind.

=head2 v5.31.10 - Christina Rossetti, "Remember"

L<Announced on 2020-03-20 by Sawyer X|https://www.nntp.perl.org/group/perl.perl5.porters/2020/03/msg257274.html>

Remember me when I am gone away,
Gone far away into the silent land;
When you can no more hold me by the hand,
Nor I half turn to go yet turning stay.
Remember me when no more day by day
You tell me of our future that you plann'd:
Only remember me; you understand
It will be late to counsel then or pray.
Yet if you should forget me for a while
And afterwards remember, do not grieve:
For if the darkness and corruption leave
A vestige of the thoughts that once I had,
Better by far you should forget and smile
Than that you should remember and be sad.

=head2 v5.31.9 - Sten Nadolny, book The Discovery of Slowness

L<Announced on 2020-01-20 by Renee Bäcker|https://www.nntp.perl.org/group/perl.perl5.porters/2020/02/msg257144.html>
L<Announced on 2020-02-20 by Renee Bäcker|https://www.nntp.perl.org/group/perl.perl5.porters/2020/02/msg257144.html>

„When people talk too fast the content becomes as superfluous as the speed.“

Expand Down Expand Up @@ -219,6 +244,46 @@ L<Announced on 2019-05-24 by Sawyer X|https://www.nntp.perl.org/group/perl.perl5
The secrets inside her mind are like flowers in a garden at
nighttime, filling the darkness with perfume.

=head2 v5.30.2 - Francesco Maria Piave, trans. Deutsche Grammophon GmbH, "La traviata", Act II, Scene 2

L<Announced on 2020-03-14 by Steve Hay|http://www.nntp.perl.org/group/perl.perl5.porters/2020/03/msg257227.html>

FLORA, GASTON, DOCTOR, MARQUIS, CHORUS
(to Violetta)
Yes, you have suffered, but take heart!
Every one of us has shared your pain;
friends are around you to dry the tears
you have shed.

GERMONT
(I alone know the true devotion
this poor girl hides within her breast;
I know her faithful heart,
but I'm vowed so cruelly to silence.)

BARON
(softly to Alfredo)
Your deadly insult to this lady
offends us all, but such an outrage
shall not go unavenged!
I shall find a way to humble your pride!

ALFREDO
(Alas, what have I done? I feel terrible about it.
She will never forgive me.)

VIOLETTA
(coming to herself)
Alfredo, how should you understand
all the love that's in my heart?
How should you know that I have proved it,
even at the price of your contempt?

But the time will come when you will know,
when you'll admit how much I loved you.
God save you then from all remorse!
Even after death I shall still love you.

=head2 v5.30.2-RC1 - Francesco Maria Piave, trans. Deutsche Grammophon GmbH, "La traviata", Act II, Scene 2

L<Announced on 2020-02-29 by Steve Hay|http://www.nntp.perl.org/group/perl.perl5.porters/2020/02/msg257163.html>
Expand Down
2 changes: 1 addition & 1 deletion Porting/perldelta_template.pod
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ died, add a short obituary here.

XXX Generate this with:

perl Porting/acknowledgements.pl v5.30.2..HEAD
perl Porting/acknowledgements.pl v5.30.3..HEAD

=head1 Reporting Bugs

Expand Down
12 changes: 8 additions & 4 deletions Porting/release_schedule.pod
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ Code freezes (which happen in the 5.31.X series)
2020-01-20 5.31.8 ✓ Contentious changes freeze
2020-02-20 5.31.9 ✓ User-visible changes to correctly
functioning programs freeze
2020-03-20 5.31.10 Full code freeze
2020-04-20 5.32.0 Stable release!
2020-03-20 5.31.10 ✓ Full code freeze
2020-04-28 5.31.11 ✓ Full code freeze (clearing BBCs)
2020-05-20 5.32.0 Stable release! (Hopefully)

=head2 Perl 5.30

2019-05-22 5.30.0 ✓ Sawyer X
2019-11-10 5.30.1 ✓ Steve Hay
2020-03-?? 5.30.2 Steve Hay
2020-03-14 5.30.2 ✓ Steve Hay
2020-06-01 5.30.3 Steve Hay

=head2 Perl 5.28

2018-05-20 5.28.0 ✓ Sawyer X
2018-11-29 5.28.1 ✓ Steve Hay
2019-04-19 5.28.2 ✓ Steve Hay
2020-06-01 5.28.3 Steve Hay

=head2 Perl 5.26

Expand Down Expand Up @@ -66,7 +69,8 @@ you should reset the version numbers to the next blead series.
2019-12-20 5.31.7 ✓ Atoomic
2020-01-20 5.31.8 ✓ Matthew Horsfall
2020-02-20 5.31.9 ✓ Renee Bäcker
2020-03-20 5.31.10 Sawyer X
2020-03-20 5.31.10 ✓ Sawyer X
2020-04-28 5.31.11 ✓ Sawyer X

(RC0 for 5.32.0 will be released once we think that all the blockers have been
addressed. This typically means some time in April or May.)
Expand Down
4 changes: 2 additions & 2 deletions README.haiku
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ The build procedure is completely standard:
Make perl executable and create a symlink for libperl:

chmod a+x /boot/common/bin/perl
cd /boot/common/lib; ln -s perl5/5.30.2/BePC-haiku/CORE/libperl.so .
cd /boot/common/lib; ln -s perl5/5.30.3/BePC-haiku/CORE/libperl.so .

Replace C<5.30.2> with your respective version of Perl.
Replace C<5.30.3> with your respective version of Perl.

=head1 KNOWN PROBLEMS

Expand Down
8 changes: 4 additions & 4 deletions README.macosx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ perlmacosx - Perl under Mac OS X

This document briefly describes Perl under Mac OS X.

curl -O http://www.cpan.org/src/perl-5.30.2.tar.gz
tar -xzf perl-5.30.2.tar.gz
cd perl-5.30.2
curl -O http://www.cpan.org/src/perl-5.30.3.tar.gz
tar -xzf perl-5.30.3.tar.gz
cd perl-5.30.3
./Configure -des -Dprefix=/usr/local/
make
make test
sudo make install

=head1 DESCRIPTION

The latest Perl release (5.30.2 as of this writing) builds without changes
The latest Perl release (5.30.3 as of this writing) builds without changes
under all versions of Mac OS X from 10.3 "Panther" onwards.

In order to build your own version of Perl you will need 'make',
Expand Down
2 changes: 1 addition & 1 deletion README.os2
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ C<set PERLLIB_PREFIX> in F<Config.sys>, see L</"C<PERLLIB_PREFIX>">.

=item Additional Perl modules

unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.30.2/
unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.30.3/

Same remark as above applies. Additionally, if this directory is not
one of directories on @INC (and @INC is influenced by C<PERLLIB_PREFIX>), you
Expand Down
4 changes: 2 additions & 2 deletions README.vms
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ You may need to set up a foreign symbol for the unpacking utility of
choice. Once you have done so, use a command like the following to
unpack the archive:

vmstar -xvf perl-5^.30^.2.tar
vmstar -xvf perl-5^.30^.3.tar

Then set default to the top-level source directory like so:

set default [.perl-5^.30^.2]
set default [.perl-5^.30^.3]

and proceed with configuration as described in the next section.

Expand Down
9 changes: 9 additions & 0 deletions dist/Module-CoreList/Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
5.20200601_30
- Updated for v5.30.3

5.20200428
- Updated for v5.31.11

5.20200320
- Updated for v5.31.10

5.20200314
- Updated for v5.30.2

Expand Down
8 changes: 6 additions & 2 deletions dist/Module-CoreList/Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
use ExtUtils::MakeMaker;

use strict;
use warnings;

my @extra;
push @extra, 'INSTALLDIRS' => 'perl' if $] >= 5.008009 and $] < 5.012;

push @extra, 'META_MERGE' => {
resources => {
repository => 'git://perl5.git.perl.org/perl.git',
bugtracker => 'https://rt.perl.org/rt3/',
repository => 'git://github.com/Perl/perl5.git',
bugtracker => 'https://github.com/Perl/perl5/issues',
homepage => "http://dev.perl.org/",
},
} unless $ExtUtils::MakeMaker::VERSION < 6.46;
Expand Down
142 changes: 140 additions & 2 deletions dist/Module-CoreList/lib/Module/CoreList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
our ( %released, %version, %families, %upstream, %bug_tracker, %deprecated, %delta );

use version;
our $VERSION = '5.20200314';
our $VERSION = '5.20200601_30';

sub PKG_PATTERN () { q#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z# }
sub _looks_like_invocant ($) { local $@; !!eval { $_[0]->isa(__PACKAGE__) } }
Expand Down Expand Up @@ -360,7 +360,10 @@ sub changes_between {
5.031007 => '2019-12-20',
5.031008 => '2020-01-20',
5.031009 => '2020-02-20',
5.030002 => '2020-03-07',
5.030002 => '2020-03-14',
5.031010 => '2020-03-20',
5.031011 => '2020-04-28',
5.030003 => '2020-06-01',
);

for my $version ( sort { $a <=> $b } keys %released ) {
Expand Down Expand Up @@ -17355,6 +17358,120 @@ for my $version ( sort { $a <=> $b } keys %released ) {
removed => {
}
},
5.031010 => {
delta_from => 5.031009,
changed => {
'B::Op_private' => '5.031010',
'Config' => '5.03101',
},
removed => {
}
},
5.031011 => {
delta_from => 5.031010,
changed => {
'B::Deparse' => '1.53',
'B::Op_private' => '5.031011',
'Config' => '5.031011',
'DynaLoader' => '1.47',
'Encode' => '3.04',
'IPC::Open2' => '1.05',
'IPC::Open3' => '1.21',
'Module::CoreList' => '5.20200428',
'Module::CoreList::Utils'=> '5.20200428',
'Opcode' => '1.47',
'POSIX' => '1.93',
'PerlIO' => '1.11',
'Storable' => '3.20',
'Test2' => '1.302175',
'Test2::API' => '1.302175',
'Test2::API::Breakage' => '1.302175',
'Test2::API::Context' => '1.302175',
'Test2::API::Instance' => '1.302175',
'Test2::API::Stack' => '1.302175',
'Test2::Event' => '1.302175',
'Test2::Event::Bail' => '1.302175',
'Test2::Event::Diag' => '1.302175',
'Test2::Event::Encoding'=> '1.302175',
'Test2::Event::Exception'=> '1.302175',
'Test2::Event::Fail' => '1.302175',
'Test2::Event::Generic' => '1.302175',
'Test2::Event::Note' => '1.302175',
'Test2::Event::Ok' => '1.302175',
'Test2::Event::Pass' => '1.302175',
'Test2::Event::Plan' => '1.302175',
'Test2::Event::Skip' => '1.302175',
'Test2::Event::Subtest' => '1.302175',
'Test2::Event::TAP::Version'=> '1.302175',
'Test2::Event::V2' => '1.302175',
'Test2::Event::Waiting' => '1.302175',
'Test2::EventFacet' => '1.302175',
'Test2::EventFacet::About'=> '1.302175',
'Test2::EventFacet::Amnesty'=> '1.302175',
'Test2::EventFacet::Assert'=> '1.302175',
'Test2::EventFacet::Control'=> '1.302175',
'Test2::EventFacet::Error'=> '1.302175',
'Test2::EventFacet::Hub'=> '1.302175',
'Test2::EventFacet::Info'=> '1.302175',
'Test2::EventFacet::Info::Table'=> '1.302175',
'Test2::EventFacet::Meta'=> '1.302175',
'Test2::EventFacet::Parent'=> '1.302175',
'Test2::EventFacet::Plan'=> '1.302175',
'Test2::EventFacet::Render'=> '1.302175',
'Test2::EventFacet::Trace'=> '1.302175',
'Test2::Formatter' => '1.302175',
'Test2::Formatter::TAP' => '1.302175',
'Test2::Hub' => '1.302175',
'Test2::Hub::Interceptor'=> '1.302175',
'Test2::Hub::Interceptor::Terminator'=> '1.302175',
'Test2::Hub::Subtest' => '1.302175',
'Test2::IPC' => '1.302175',
'Test2::IPC::Driver' => '1.302175',
'Test2::IPC::Driver::Files'=> '1.302175',
'Test2::Tools::Tiny' => '1.302175',
'Test2::Util' => '1.302175',
'Test2::Util::ExternalMeta'=> '1.302175',
'Test2::Util::Facets2Legacy'=> '1.302175',
'Test2::Util::HashBase' => '1.302175',
'Test2::Util::Trace' => '1.302175',
'Test::Builder' => '1.302175',
'Test::Builder::Formatter'=> '1.302175',
'Test::Builder::Module' => '1.302175',
'Test::Builder::Tester' => '1.302175',
'Test::Builder::Tester::Color'=> '1.302175',
'Test::Builder::TodoDiag'=> '1.302175',
'Test::More' => '1.302175',
'Test::Simple' => '1.302175',
'Test::Tester' => '1.302175',
'Test::Tester::Capture' => '1.302175',
'Test::Tester::CaptureRunner'=> '1.302175',
'Test::Tester::Delegate'=> '1.302175',
'Test::use::ok' => '1.302175',
'Time::Piece' => '1.3401',
'Time::Seconds' => '1.3401',
'Unicode::UCD' => '0.75',
'XS::APItest' => '1.09',
'_charnames' => '1.47',
'charnames' => '1.47',
'ok' => '1.302175',
'open' => '1.12',
're' => '0.39',
'warnings' => '1.47',
},
removed => {
}
},
5.030003 => {
delta_from => 5.030002,
changed => {
'B::Op_private' => '5.030003',
'Config' => '5.030003',
'Module::CoreList' => '5.20200601_30',
'Module::CoreList::Utils'=> '5.20200601_30',
},
removed => {
}
},
);

sub is_core
Expand Down Expand Up @@ -18441,6 +18558,27 @@ sub is_core
removed => {
}
},
5.031010 => {
delta_from => 5.031009,
changed => {
},
removed => {
}
},
5.031011 => {
delta_from => 5.03101,
changed => {
},
removed => {
}
},
5.030003 => {
delta_from => 5.030002,
changed => {
},
removed => {
}
},
);

%deprecated = _undelta(\%deprecated);
Expand Down
23 changes: 22 additions & 1 deletion dist/Module-CoreList/lib/Module/CoreList/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use warnings;
use Module::CoreList;

our $VERSION = '5.20200314';
our $VERSION = '5.20200601_30';
our %utilities;

sub utilities {
Expand Down Expand Up @@ -1587,6 +1587,27 @@ my %delta = (
removed => {
}
},
5.031010 => {
delta_from => 5.031009,
changed => {
},
removed => {
}
},
5.031011 => {
delta_from => 5.031010,
changed => {
},
removed => {
}
},
5.030003 => {
delta_from => 5.030002,
changed => {
},
removed => {
}
},
);

%utilities = Module::CoreList::_undelta(\%delta);
Expand Down
3 changes: 2 additions & 1 deletion embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -2480,7 +2480,8 @@ Es |SSize_t|study_chunk |NN RExC_state_t *pRExC_state \
|NULLOK struct scan_data_t *data \
|I32 stopparen|U32 recursed_depth \
|NULLOK regnode_ssc *and_withp \
|U32 flags|U32 depth
|U32 flags|U32 depth|bool was_mutate_ok
Es |void |rck_elide_nothing|NN regnode *node
EsR |SV * |get_ANYOFM_contents|NN const regnode * n
EsRn |U32 |add_data |NN RExC_state_t* const pRExC_state \
|NN const char* const s|const U32 n
Expand Down
3 changes: 2 additions & 1 deletion embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@
#define parse_lparen_question_flags(a) S_parse_lparen_question_flags(aTHX_ a)
#define parse_uniprop_string(a,b,c,d,e,f,g,h,i) Perl_parse_uniprop_string(aTHX_ a,b,c,d,e,f,g,h,i)
#define populate_ANYOF_from_invlist(a,b) S_populate_ANYOF_from_invlist(aTHX_ a,b)
#define rck_elide_nothing(a) S_rck_elide_nothing(aTHX_ a)
#define reg(a,b,c,d) S_reg(aTHX_ a,b,c,d)
#define reg2Lanode(a,b,c,d) S_reg2Lanode(aTHX_ a,b,c,d)
#define reg_node(a,b) S_reg_node(aTHX_ a,b)
Expand Down Expand Up @@ -1238,7 +1239,7 @@
#define ssc_is_cp_posixl_init S_ssc_is_cp_posixl_init
#define ssc_or(a,b,c) S_ssc_or(aTHX_ a,b,c)
#define ssc_union(a,b,c) S_ssc_union(aTHX_ a,b,c)
#define study_chunk(a,b,c,d,e,f,g,h,i,j,k) S_study_chunk(aTHX_ a,b,c,d,e,f,g,h,i,j,k)
#define study_chunk(a,b,c,d,e,f,g,h,i,j,k,l) S_study_chunk(aTHX_ a,b,c,d,e,f,g,h,i,j,k,l)
# endif
# if defined(PERL_IN_REGCOMP_C) || defined (PERL_IN_DUMP_C)
#define _invlist_dump(a,b,c,d) Perl__invlist_dump(aTHX_ a,b,c,d)
Expand Down
4 changes: 2 additions & 2 deletions hints/catamount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
# mkdir -p /opt/perl-catamount
# mkdir -p /opt/perl-catamount/include
# mkdir -p /opt/perl-catamount/lib
# mkdir -p /opt/perl-catamount/lib/perl5/5.30.2
# mkdir -p /opt/perl-catamount/lib/perl5/5.30.3
# mkdir -p /opt/perl-catamount/bin
# cp *.h /opt/perl-catamount/include
# cp libperl.a /opt/perl-catamount/lib
# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.30.2
# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.30.3
# cp miniperl perl run.sh cc.sh /opt/perl-catamount/lib
#
# With the headers and the libperl.a you can embed Perl to your Catamount
Expand Down
2 changes: 1 addition & 1 deletion lib/B/Op_private.pm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ package B::Op_private;
our %bits;


our $VERSION = "5.030002";
our $VERSION = "5.030003";

$bits{$_}{3} = 'OPpENTERSUB_AMPER' for qw(entersub rv2cv);
$bits{$_}{6} = 'OPpENTERSUB_DB' for qw(entersub rv2cv);
Expand Down
2 changes: 1 addition & 1 deletion patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#define PERL_REVISION 5 /* age */
#define PERL_VERSION 30 /* epoch */
#define PERL_SUBVERSION 2 /* generation */
#define PERL_SUBVERSION 3 /* generation */

/* The following numbers describe the earliest compatible version of
Perl ("compatibility" here being defined as sufficient binary/API
Expand Down
10 changes: 5 additions & 5 deletions plan9/config.plan9
Original file line number Diff line number Diff line change
Expand Up @@ -3131,8 +3131,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#define PRIVLIB "/sys/lib/perl/5.30.2" /**/
#define PRIVLIB_EXP "/sys/lib/perl/5.30.2" /**/
#define PRIVLIB "/sys/lib/perl/5.30.3" /**/
#define PRIVLIB_EXP "/sys/lib/perl/5.30.3" /**/

/* PTRSIZE:
* This symbol contains the size of a pointer, so that the C preprocessor
Expand Down Expand Up @@ -3259,9 +3259,9 @@
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
#define SITELIB "/sys/lib/perl/5.30.2/site_perl" /**/
#define SITELIB_EXP "/sys/lib/perl/5.30.2/site_perl" /**/
#define SITELIB_STEM "/sys/lib/perl/5.30.2/site_perl" /**/
#define SITELIB "/sys/lib/perl/5.30.3/site_perl" /**/
#define SITELIB_EXP "/sys/lib/perl/5.30.3/site_perl" /**/
#define SITELIB_STEM "/sys/lib/perl/5.30.3/site_perl" /**/

/* Size_t_size:
* This symbol holds the size of a Size_t in bytes.
Expand Down
32 changes: 16 additions & 16 deletions plan9/config_sh.sample
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ api_subversion='0'
api_version='30'
api_versionstring='5.30.0'
ar='ar'
archlib='/sys/lib/perl5/5.30.2/386'
archlibexp='/sys/lib/perl5/5.30.2/386'
archlib='/sys/lib/perl5/5.30.3/386'
archlibexp='/sys/lib/perl5/5.30.3/386'
archname64=''
archname='386'
archobjs=''
Expand Down Expand Up @@ -815,17 +815,17 @@ inc_version_list=' '
inc_version_list_init='0'
incpath=''
inews=''
installarchlib='/sys/lib/perl/5.30.2/386'
installarchlib='/sys/lib/perl/5.30.3/386'
installbin='/usr/bin'
installman1dir='/sys/man/1pub'
installman3dir='/sys/man/2pub'
installprefix='/usr'
installprefixexp='/usr'
installprivlib='/sys/lib/perl/5.30.2'
installprivlib='/sys/lib/perl/5.30.3'
installscript='/usr/bin'
installsitearch='/sys/lib/perl/5.30.2/site_perl/386'
installsitearch='/sys/lib/perl/5.30.3/site_perl/386'
installsitebin='/usr/bin'
installsitelib='/sys/lib/perl/5.30.2/site_perl'
installsitelib='/sys/lib/perl/5.30.3/site_perl'
installstyle='lib/perl5'
installusrbinperl='undef'
installvendorarch=''
Expand Down Expand Up @@ -950,8 +950,8 @@ pmake=''
pr=''
prefix='/usr'
prefixexp='/usr'
privlib='/sys/lib/perl/5.30.2'
privlibexp='/sys/lib/perl/5.30.2'
privlib='/sys/lib/perl/5.30.3'
privlibexp='/sys/lib/perl/5.30.3'
procselfexe=''
prototype='define'
ptrsize='4'
Expand Down Expand Up @@ -1016,13 +1016,13 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 0'
sig_size='50'
signal_t='void'
sitearch='/sys/lib/perl/5.30.2/site_perl/386'
sitearch='/sys/lib/perl/5.30.3/site_perl/386'
sitearchexp='/sys/lib/perl/site_perl/386'
sitebin='/usr/bin'
sitebinexp='/usr/bin'
sitelib='/sys/lib/perl/5.30.2/site_perl'
sitelib_stem='/sys/lib/perl/5.30.2/site_perl'
sitelibexp='/sys/lib/perl/5.30.2/site_perl'
sitelib='/sys/lib/perl/5.30.3/site_perl'
sitelib_stem='/sys/lib/perl/5.30.3/site_perl'
sitelibexp='/sys/lib/perl/5.30.3/site_perl'
siteprefix='/usr'
siteprefixexp='/usr'
sizesize='4'
Expand Down Expand Up @@ -1055,7 +1055,7 @@ stdio_stream_array=''
strerror_r_proto='0'
strings='/sys/include/ape/string.h'
submit=''
subversion='2'
subversion='3'
sysman='/sys/man/1pub'
tail=''
tar=''
Expand Down Expand Up @@ -1136,8 +1136,8 @@ vendorlib_stem=''
vendorlibexp=''
vendorprefix=''
vendorprefixexp=''
version='5.30.2'
version_patchlevel_string='version 30 subversion 2'
version='5.30.3'
version_patchlevel_string='version 30 subversion 3'
versiononly='undef'
vi=''
xlibpth=''
Expand All @@ -1151,7 +1151,7 @@ config_args=''
config_argc=0
PERL_REVISION=5
PERL_VERSION=30
PERL_SUBVERSION=2
PERL_SUBVERSION=3
PERL_API_REVISION=5
PERL_API_VERSION=30
PERL_API_SUBVERSION=0
Expand Down
2 changes: 1 addition & 1 deletion pod/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/roffitall

# generated
/perl5302delta.pod
/perl5303delta.pod
/perlapi.pod
/perlintern.pod
/perlmodlib.pod
Expand Down
1 change: 1 addition & 0 deletions pod/perl.pod
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ aux h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp

perlhist Perl history records
perldelta Perl changes since previous version
perl5302delta Perl changes in version 5.30.2
perl5301delta Perl changes in version 5.30.1
perl5300delta Perl changes in version 5.30.0
perl5282delta Perl changes in version 5.28.2
Expand Down
174 changes: 174 additions & 0 deletions pod/perl5302delta.pod
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
=encoding utf8

=head1 NAME

perl5302delta - what is new for perl v5.30.2

=head1 DESCRIPTION

This document describes differences between the 5.30.1 release and the 5.30.2
release.

If you are upgrading from an earlier release such as 5.30.0, first read
L<perl5301delta>, which describes differences between 5.30.0 and 5.30.1.

=head1 Incompatible Changes

There are no changes intentionally incompatible with 5.30.0. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting Bugs>
below.

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<Compress::Raw::Bzip2> has been upgraded from version 2.084 to 2.089.

=item *

L<Module::CoreList> has been upgraded from version 5.20191110 to 5.20200314.

=back

=head1 Documentation

=head2 Changes to Existing Documentation

We have attempted to update the documentation to reflect the changes
listed in this document. If you find any we have missed, send email
to L<https://github.com/Perl/perl5/issues>.

=head1 Configuration and Compilation

=over 4

=item *

GCC 10 is now supported by F<Configure>.

=back

=head1 Testing

Tests were added and changed to reflect the other additions and changes in this
release.

=head1 Platform Support

=head2 Platform-Specific Notes

=over 4

=item Windows

The MYMALLOC (PERL_MALLOC) build on Windows has been fixed.

=back

=head1 Selected Bug Fixes

=over 4

=item *

printf() or sprintf() with the C<%n> format no longer cause a panic on
debugging builds, or report an incorrectly cached length value when producing
C<SVfUTF8> flagged strings.

[L<GH #17221|https://github.com/Perl/perl5/issues/17221>]

=item *

A memory leak in regular expression patterns has been fixed.

[L<GH #17218|https://github.com/Perl/perl5/issues/17218>]

=item *

A read beyond buffer in grok_infnan has been fixed.

[L<GH #17370|https://github.com/Perl/perl5/issues/17370>]

=item *

An assertion failure in the regular expression engine has been fixed.

[L<GH #17372|https://github.com/Perl/perl5/issues/17372>]

=item *

C<(?{...})> eval groups in regular expressions no longer unintentionally
trigger "EVAL without pos change exceeded limit in regex".

[L<GH #17490|https://github.com/Perl/perl5/issues/17490>]

=back

=head1 Acknowledgements

Perl 5.30.2 represents approximately 4 months of development since Perl 5.30.1
and contains approximately 2,100 lines of changes across 110 files from 15
authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 920 lines of changes to 30 .pm, .t, .c and .h files.

Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.30.2:

Chris 'BinGOs' Williams, Dan Book, David Mitchell, Hugo van der Sanden, Karen
Etheridge, Karl Williamson, Matthew Horsfall, Nicolas R., Petr Písař, Renee
Baecker, Sawyer X, Steve Hay, Tomasz Konojacki, Tony Cook, Yves Orton.

The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.

Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.

For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.

=head1 Reporting Bugs

If you find what you think is a bug, you might check the perl bug database at
L<https://rt.perl.org/>. There may also be information at
L<http://www.perl.org/>, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.

If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see L<perlsec/SECURITY
VULNERABILITY CONTACT INFORMATION> for details of how to report the issue.

=head1 Give Thanks

If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:

perlthanks

This will send an email to the Perl 5 Porters list with your show of thanks.

=head1 SEE ALSO

The F<Changes> file for an explanation of how to view exhaustive details on
what changed.

The F<INSTALL> file for how to build Perl.

The F<README> file for general stuff.

The F<Artistic> and F<Copying> files for copyright information.

=cut
142 changes: 55 additions & 87 deletions pod/perldelta.pod
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,72 @@

=head1 NAME

perldelta - what is new for perl v5.30.2
perldelta - what is new for perl v5.30.3

=head1 DESCRIPTION

This document describes differences between the 5.30.1 release and the 5.30.2
This document describes differences between the 5.30.2 release and the 5.30.3
release.

If you are upgrading from an earlier release such as 5.30.0, first read
L<perl5301delta>, which describes differences between 5.30.0 and 5.30.1.
If you are upgrading from an earlier release such as 5.30.1, first read
L<perl5302delta>, which describes differences between 5.30.1 and 5.30.2.

=head1 Incompatible Changes
=head1 Security

There are no changes intentionally incompatible with 5.30.0. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting Bugs>
below.
=head2 [CVE-2020-10543] Buffer overflow caused by a crafted regular expression

=head1 Modules and Pragmata
A signed C<size_t> integer overflow in the storage space calculations for
nested regular expression quantifiers could cause a heap buffer overflow in
Perl's regular expression compiler that overwrites memory allocated after the
regular expression storage space with attacker supplied data.

=head2 Updated Modules and Pragmata
The target system needs a sufficient amount of memory to allocate partial
expansions of the nested quantifiers prior to the overflow occurring. This
requirement is unlikely to be met on 64-bit systems.

=over 4
Discovered by: ManhND of The Tarantula Team, VinCSS (a member of Vingroup).

=item *
=head2 [CVE-2020-10878] Integer overflow via malformed bytecode produced by a crafted regular expression

L<Compress::Raw::Bzip2> has been upgraded from version 2.084 to 2.089.
Integer overflows in the calculation of offsets between instructions for the
regular expression engine could cause corruption of the intermediate language
state of a compiled regular expression. An attacker could abuse this behaviour
to insert instructions into the compiled form of a Perl regular expression.

=item *
Discovered by: Hugo van der Sanden and Slaven Rezic.

L<Module::CoreList> has been upgraded from version 5.20191110 to 5.20200314.
=head2 [CVE-2020-12723] Buffer overflow caused by a crafted regular expression

=back
Recursive calls to C<S_study_chunk()> by Perl's regular expression compiler to
optimize the intermediate language representation of a regular expression could
cause corruption of the intermediate language state of a compiled regular
expression.

Discovered by: Sergey Aleynikov.

=head2 Additional Note

=head1 Documentation
An application written in Perl would only be vulnerable to any of the above
flaws if it evaluates regular expressions supplied by the attacker. Evaluating
regular expressions in this fashion is known to be dangerous since the regular
expression engine does not protect against denial of service attacks in this
usage scenario.

=head2 Changes to Existing Documentation
=head1 Incompatible Changes

We have attempted to update the documentation to reflect the changes
listed in this document. If you find any we have missed, send email
to L<https://github.com/Perl/perl5/issues>.
There are no changes intentionally incompatible with Perl 5.30.2. If any
exist, they are bugs, and we request that you submit a report. See
L</Reporting Bugs> below.

=head1 Configuration and Compilation
=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

GCC 10 is now supported by F<Configure>.
L<Module::CoreList> has been upgraded from version 5.20200314 to 5.20200601_30.

=back

Expand All @@ -57,73 +76,21 @@ GCC 10 is now supported by F<Configure>.
Tests were added and changed to reflect the other additions and changes in this
release.

=head1 Platform Support

=head2 Platform-Specific Notes

=over 4

=item Windows

The MYMALLOC (PERL_MALLOC) build on Windows has been fixed.

=back

=head1 Selected Bug Fixes

=over 4

=item *

printf() or sprintf() with the C<%n> format no longer cause a panic on
debugging builds, or report an incorrectly cached length value when producing
C<SVfUTF8> flagged strings.

[L<GH #17221|https://github.com/Perl/perl5/issues/17221>]

=item *

A memory leak in regular expression patterns has been fixed.

[L<GH #17218|https://github.com/Perl/perl5/issues/17218>]

=item *

A read beyond buffer in grok_infnan has been fixed.

[L<GH #17370|https://github.com/Perl/perl5/issues/17370>]

=item *

An assertion failure in the regular expression engine has been fixed.

[L<GH #17372|https://github.com/Perl/perl5/issues/17372>]

=item *

C<(?{...})> eval groups in regular expressions no longer unintentionally
trigger "EVAL without pos change exceeded limit in regex".

[L<GH #17490|https://github.com/Perl/perl5/issues/17490>]

=back

=head1 Acknowledgements

Perl 5.30.2 represents approximately 4 months of development since Perl 5.30.1
and contains approximately 2,100 lines of changes across 110 files from 15
Perl 5.30.3 represents approximately 3 months of development since Perl 5.30.2
and contains approximately 1,100 lines of changes across 42 files from 7
authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 920 lines of changes to 30 .pm, .t, .c and .h files.
approximately 350 lines of changes to 8 .pm, .t, .c and .h files.

Perl continues to flourish into its fourth decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
the improvements that became Perl 5.30.2:
the improvements that became Perl 5.30.3:

Chris 'BinGOs' Williams, Dan Book, David Mitchell, Hugo van der Sanden, Karen
Etheridge, Karl Williamson, Matthew Horsfall, Nicolas R., Petr Písař, Renee
Baecker, Sawyer X, Steve Hay, Tomasz Konojacki, Tony Cook, Yves Orton.
Chris 'BinGOs' Williams, Hugo van der Sanden, John Lightsey, Karl Williamson,
Nicolas R., Sawyer X, Steve Hay.

The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
Expand All @@ -140,21 +107,22 @@ the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs

If you find what you think is a bug, you might check the perl bug database at
L<https://rt.perl.org/>. There may also be information at
L<http://www.perl.org/>, the Perl Home Page.
L<https://github.com/Perl/perl5/issues>. There may also be information at
L<https://www.perl.org/>, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.

If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see L<perlsec/SECURITY
VULNERABILITY CONTACT INFORMATION> for details of how to report the issue.
inappropriate to send to a public issue tracker, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
report the issue.

=head1 Give Thanks

If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:

perlthanks

Expand Down
4 changes: 4 additions & 0 deletions pod/perlhist.pod
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,8 @@ the strings?).
Steve 5.30.1 2019-Nov-10
Steve 5.30.2-RC1 2020-Feb-29
Steve 5.30.2 2020-Mar-14
Steve 5.30.3-RC1 2020-May-18
Steve 5.30.3 2020-Jun-01

Sawyer X 5.31.0 2019-May-24 The 5.31 development track
Ether 5.31.1 2019-Jun-20
Expand All @@ -684,6 +686,8 @@ the strings?).
Nicolas R 5.31.7 2019-Dec-20
Matthew H 5.31.8 2020-Jan-20
Renee 5.31.9 2020-Feb-20
Sawyer X 5.31.10 2020-Mar-20
Sawyer X 5.31.11 2020-Apr-28

=head2 SELECTED RELEASE SIZES

Expand Down
5 changes: 4 additions & 1 deletion proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -5543,6 +5543,9 @@ PERL_CALLCONV SV * Perl_parse_uniprop_string(pTHX_ const char * const name, cons
STATIC void S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr);
#define PERL_ARGS_ASSERT_POPULATE_ANYOF_FROM_INVLIST \
assert(node); assert(invlist_ptr)
STATIC void S_rck_elide_nothing(pTHX_ regnode *node);
#define PERL_ARGS_ASSERT_RCK_ELIDE_NOTHING \
assert(node)
PERL_STATIC_NO_RET void S_re_croak2(pTHX_ bool utf8, const char* pat1, const char* pat2, ...)
__attribute__noreturn__;
#define PERL_ARGS_ASSERT_RE_CROAK2 \
Expand Down Expand Up @@ -5656,7 +5659,7 @@ PERL_STATIC_INLINE void S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, c
#define PERL_ARGS_ASSERT_SSC_UNION \
assert(ssc); assert(invlist)
#endif
STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth);
STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth, bool was_mutate_ok);
#define PERL_ARGS_ASSERT_STUDY_CHUNK \
assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last)
#endif
Expand Down
139 changes: 92 additions & 47 deletions regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ typedef struct scan_frame {
regnode *next_regnode; /* next node to process when last is reached */
U32 prev_recursed_depth;
I32 stopparen; /* what stopparen do we use */
bool in_gosub; /* this or an outer frame is for GOSUB */

struct scan_frame *this_prev_frame; /* this previous frame */
struct scan_frame *prev_frame; /* previous frame */
Expand Down Expand Up @@ -4450,6 +4451,44 @@ S_unwind_scan_frames(pTHX_ const void *p)
} while (f);
}

/* Follow the next-chain of the current node and optimize away
all the NOTHINGs from it.
*/
STATIC void
S_rck_elide_nothing(pTHX_ regnode *node)
{
dVAR;

PERL_ARGS_ASSERT_RCK_ELIDE_NOTHING;

if (OP(node) != CURLYX) {
const int max = (reg_off_by_arg[OP(node)]
? I32_MAX
/* I32 may be smaller than U16 on CRAYs! */
: (I32_MAX < U16_MAX ? I32_MAX : U16_MAX));
int off = (reg_off_by_arg[OP(node)] ? ARG(node) : NEXT_OFF(node));
int noff;
regnode *n = node;

/* Skip NOTHING and LONGJMP. */
while (
(n = regnext(n))
&& (
(PL_regkind[OP(n)] == NOTHING && (noff = NEXT_OFF(n)))
|| ((OP(n) == LONGJMP) && (noff = ARG(n)))
)
&& off + noff < max
) {
off += noff;
}
if (reg_off_by_arg[OP(node)])
ARG(node) = off;
else
NEXT_OFF(node) = off;
}
return;
}

/* the return from this sub is the minimum length that could possibly match */
STATIC SSize_t
S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
Expand All @@ -4459,7 +4498,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
I32 stopparen,
U32 recursed_depth,
regnode_ssc *and_withp,
U32 flags, U32 depth)
U32 flags, U32 depth, bool was_mutate_ok)
/* scanp: Start here (read-write). */
/* deltap: Write maxlen-minlen here. */
/* last: Stop before this one. */
Expand Down Expand Up @@ -4538,6 +4577,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
node length to get a real minimum (because
the folded version may be shorter) */
bool unfolded_multi_char = FALSE;
/* avoid mutating ops if we are anywhere within the recursed or
* enframed handling for a GOSUB: the outermost level will handle it.
*/
bool mutate_ok = was_mutate_ok && !(frame && frame->in_gosub);
/* Peephole optimizer: */
DEBUG_STUDYDATA("Peep", data, depth, is_inf);
DEBUG_PEEP("Peep", scan, depth, flags);
Expand All @@ -4548,30 +4591,13 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
* parsing code, as each (?:..) is handled by a different invocation of
* reg() -- Yves
*/
JOIN_EXACT(scan,&min_subtract, &unfolded_multi_char, 0);

/* Follow the next-chain of the current node and optimize
away all the NOTHINGs from it. */
if (OP(scan) != CURLYX) {
const int max = (reg_off_by_arg[OP(scan)]
? I32_MAX
/* I32 may be smaller than U16 on CRAYs! */
: (I32_MAX < U16_MAX ? I32_MAX : U16_MAX));
int off = (reg_off_by_arg[OP(scan)] ? ARG(scan) : NEXT_OFF(scan));
int noff;
regnode *n = scan;

/* Skip NOTHING and LONGJMP. */
while ((n = regnext(n))
&& ((PL_regkind[OP(n)] == NOTHING && (noff = NEXT_OFF(n)))
|| ((OP(n) == LONGJMP) && (noff = ARG(n))))
&& off + noff < max)
off += noff;
if (reg_off_by_arg[OP(scan)])
ARG(scan) = off;
else
NEXT_OFF(scan) = off;
}
if (mutate_ok)
JOIN_EXACT(scan,&min_subtract, &unfolded_multi_char, 0);

/* Follow the next-chain of the current node and optimize
away all the NOTHINGs from it.
*/
rck_elide_nothing(scan);

/* The principal pseudo-switch. Cannot be a switch, since we
look into several different things. */
Expand All @@ -4598,7 +4624,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
/* DEFINEP study_chunk() recursion */
(void)study_chunk(pRExC_state, &scan, &minlen,
&deltanext, next, &data_fake, stopparen,
recursed_depth, NULL, f, depth+1);
recursed_depth, NULL, f, depth+1, mutate_ok);

scan = next;
} else
Expand Down Expand Up @@ -4666,7 +4692,8 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
/* recurse study_chunk() for each BRANCH in an alternation */
minnext = study_chunk(pRExC_state, &scan, minlenp,
&deltanext, next, &data_fake, stopparen,
recursed_depth, NULL, f, depth+1);
recursed_depth, NULL, f, depth+1,
mutate_ok);

if (min1 > minnext)
min1 = minnext;
Expand Down Expand Up @@ -4733,9 +4760,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
}
}

if (PERL_ENABLE_TRIE_OPTIMISATION &&
OP( startbranch ) == BRANCH )
{
if (PERL_ENABLE_TRIE_OPTIMISATION
&& OP(startbranch) == BRANCH
&& mutate_ok
) {
/* demq.

Assuming this was/is a branch we are dealing with: 'scan'
Expand Down Expand Up @@ -5190,6 +5218,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
newframe->stopparen = stopparen;
newframe->prev_recursed_depth = recursed_depth;
newframe->this_prev_frame= frame;
newframe->in_gosub = (
(frame && frame->in_gosub) || OP(scan) == GOSUB
);

DEBUG_STUDYDATA("frame-new", data, depth, is_inf);
DEBUG_PEEP("fnew", scan, depth, flags);
Expand Down Expand Up @@ -5347,16 +5378,17 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,

/* This temporary node can now be turned into EXACTFU, and
* must, as regexec.c doesn't handle it */
if (OP(next) == EXACTFU_S_EDGE) {
if (OP(next) == EXACTFU_S_EDGE && mutate_ok) {
OP(next) = EXACTFU;
}

if ( STR_LEN(next) == 1
&& isALPHA_A(* STRING(next))
&& ( OP(next) == EXACTFAA
|| ( OP(next) == EXACTFU
&& ! HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(* STRING(next)))))
{
&& ! HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(* STRING(next))))
&& mutate_ok
) {
/* These differ in just one bit */
U8 mask = ~ ('A' ^ 'a');

Expand Down Expand Up @@ -5443,7 +5475,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
(mincount == 0
? (f & ~SCF_DO_SUBSTR)
: f)
,depth+1);
, depth+1, mutate_ok);

if (flags & SCF_DO_STCLASS)
data->start_class = oclass;
Expand Down Expand Up @@ -5489,6 +5521,12 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
RExC_precomp)));
}

if ( ( minnext > 0 && mincount >= SSize_t_MAX / minnext )
|| min >= SSize_t_MAX - minnext * mincount )
{
FAIL("Regexp out of space");
}

min += minnext * mincount;
is_inf_internal |= deltanext == SSize_t_MAX
|| (maxcount == REG_INFTY && minnext + deltanext > 0);
Expand All @@ -5503,7 +5541,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
if ( OP(oscan) == CURLYX && data
&& data->flags & SF_IN_PAR
&& !(data->flags & SF_HAS_EVAL)
&& !deltanext && minnext == 1 ) {
&& !deltanext && minnext == 1
&& mutate_ok
) {
/* Try to optimize to CURLYN. */
regnode *nxt = NEXTOPER(oscan) + EXTRA_STEP_2ARGS;
regnode * const nxt1 = nxt;
Expand Down Expand Up @@ -5553,10 +5593,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
&& !(data->flags & SF_HAS_EVAL)
&& !deltanext /* atom is fixed width */
&& minnext != 0 /* CURLYM can't handle zero width */

/* Nor characters whose fold at run-time may be
* multi-character */
&& ! (RExC_seen & REG_UNFOLDED_MULTI_SEEN)
&& mutate_ok
) {
/* XXXX How to optimize if data == 0? */
/* Optimize to a simpler form. */
Expand Down Expand Up @@ -5609,7 +5649,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
/* recurse study_chunk() on optimised CURLYX => CURLYM */
study_chunk(pRExC_state, &nxt1, minlenp, &deltanext, nxt,
NULL, stopparen, recursed_depth, NULL, 0,
depth+1);
depth+1, mutate_ok);
}
else
oscan->flags = 0;
Expand Down Expand Up @@ -5739,11 +5779,7 @@ Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n",
if (data && (fl & SF_HAS_EVAL))
data->flags |= SF_HAS_EVAL;
optimize_curly_tail:
if (OP(oscan) != CURLYX) {
while (PL_regkind[OP(next = regnext(oscan))] == NOTHING
&& NEXT_OFF(next))
NEXT_OFF(oscan) += NEXT_OFF(next);
}
rck_elide_nothing(oscan);
continue;

default:
Expand Down Expand Up @@ -6018,7 +6054,8 @@ Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n",
/* recurse study_chunk() for lookahead body */
minnext = study_chunk(pRExC_state, &nscan, minlenp, &deltanext,
last, &data_fake, stopparen,
recursed_depth, NULL, f, depth+1);
recursed_depth, NULL, f, depth+1,
mutate_ok);
if (scan->flags) {
if ( deltanext < 0
|| deltanext > (I32) U8_MAX
Expand Down Expand Up @@ -6123,7 +6160,7 @@ Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n",
*minnextp = study_chunk(pRExC_state, &nscan, minnextp,
&deltanext, last, &data_fake,
stopparen, recursed_depth, NULL,
f, depth+1);
f, depth+1, mutate_ok);
if (scan->flags) {
assert(0); /* This code has never been tested since this
is normally not compiled */
Expand Down Expand Up @@ -6291,7 +6328,8 @@ Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n",
/* optimise study_chunk() for TRIE */
minnext = study_chunk(pRExC_state, &scan, minlenp,
&deltanext, (regnode *)nextbranch, &data_fake,
stopparen, recursed_depth, NULL, f, depth+1);
stopparen, recursed_depth, NULL, f, depth+1,
mutate_ok);
}
if (nextbranch && PL_regkind[OP(nextbranch)]==BRANCH)
nextbranch= regnext((regnode*)nextbranch);
Expand Down Expand Up @@ -7740,6 +7778,13 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,

/* We have that number in RExC_npar */
RExC_total_parens = RExC_npar;

/* XXX For backporting, use long jumps if there is any possibility of
* overflow */
if (RExC_size > U16_MAX && ! RExC_use_BRANCHJ) {
RExC_use_BRANCHJ = TRUE;
flags |= RESTART_PARSE;
}
}
else if (! MUST_RESTART(flags)) {
ReREFCNT_dec(Rx);
Expand Down Expand Up @@ -8077,7 +8122,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
&data, -1, 0, NULL,
SCF_DO_SUBSTR | SCF_WHILEM_VISITED_POS | stclass_flag
| (restudied ? SCF_TRIE_DOING_RESTUDY : 0),
0);
0, TRUE);


CHECK_RESTUDY_GOTO_butfirst(LEAVE_with_name("study_chunk"));
Expand Down Expand Up @@ -8206,7 +8251,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
SCF_DO_STCLASS_AND|SCF_WHILEM_VISITED_POS|(restudied
? SCF_TRIE_DOING_RESTUDY
: 0),
0);
0, TRUE);

CHECK_RESTUDY_GOTO_butfirst(NOOP);

Expand Down
26 changes: 25 additions & 1 deletion t/re/pat.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BEGIN {
skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
skip_all_without_unicode_tables();

plan tests => 869; # Update this when adding/deleting tests.
plan tests => 873; # Update this when adding/deleting tests.

run_tests() unless caller;

Expand Down Expand Up @@ -2141,6 +2141,30 @@ SKIP:
ok($result, "regexp correctly matched");
}

# gh16947: test regexp corruption (GOSUB)
{
fresh_perl_is(q{
'xy' =~ /x(?0)|x(?|y|y)/ && print 'ok'
}, 'ok', {}, 'gh16947: test regexp corruption (GOSUB)');
}
# gh16947: test fix doesn't break SUSPEND
{
fresh_perl_is(q{ 'sx' =~ m{ss++}i; print 'ok' },
'ok', {}, "gh16947: test fix doesn't break SUSPEND");
}

# gh17743: more regexp corruption via GOSUB
{
fresh_perl_is(q{
"0" =~ /((0(?0)|000(?|0000|0000)(?0))|)/; print "ok"
}, 'ok', {}, 'gh17743: test regexp corruption (1)');

fresh_perl_is(q{
"000000000000" =~ /(0(())(0((?0)())|000(?|\x{ef}\x{bf}\x{bd}|\x{ef}\x{bf}\x{bd}))|)/;
print "ok"
}, 'ok', {}, 'gh17743: test regexp corruption (2)');
}

} # End of sub run_tests

1;
Expand Down
2 changes: 1 addition & 1 deletion vms/descrip_mms.template
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ utils : $(utils1) $(utils2) $(utils3) $(utils4) $(utils5)
extra.pods : miniperl
@ @extra_pods.com

PERLDELTA_CURRENT = [.pod]perl5302delta.pod
PERLDELTA_CURRENT = [.pod]perl5303delta.pod

$(PERLDELTA_CURRENT) : [.pod]perldelta.pod
Copy/NoConfirm/Log $(MMS$SOURCE) $(PERLDELTA_CURRENT)
Expand Down
6 changes: 3 additions & 3 deletions win32/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ INST_TOP := $(INST_DRV)\perl
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
#INST_VER := \5.30.2
#INST_VER := \5.30.3

#
# Comment this out if you DON'T want your perl installation to have
Expand Down Expand Up @@ -1762,7 +1762,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
copy ..\pod\perldelta.pod ..\pod\perl5302delta.pod
copy ..\pod\perldelta.pod ..\pod\perl5303delta.pod
$(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
$(MINIPERL) -I..\lib ..\autodoc.pl ..
$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
Expand Down Expand Up @@ -1860,7 +1860,7 @@ distclean: realclean
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat roffitall \
perl5302delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perl5303delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
Expand Down
6 changes: 3 additions & 3 deletions win32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ INST_TOP = $(INST_DRV)\perl
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
#INST_VER = \5.30.2
#INST_VER = \5.30.3

#
# Comment this out if you DON'T want your perl installation to have
Expand Down Expand Up @@ -1283,7 +1283,7 @@ utils: $(PERLEXE) ..\utils\Makefile
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
copy ..\pod\perldelta.pod ..\pod\perl5302delta.pod
copy ..\pod\perldelta.pod ..\pod\perl5303delta.pod
cd ..\win32
$(PERLEXE) $(PL2BAT) $(UTILS)
$(MINIPERL) -I..\lib ..\autodoc.pl ..
Expand Down Expand Up @@ -1382,7 +1382,7 @@ distclean: realclean
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat roffitall \
perl5302delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perl5303delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
Expand Down
6 changes: 3 additions & 3 deletions win32/makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ INST_TOP *= $(INST_DRV)\perl
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
#INST_VER *= \5.30.2
#INST_VER *= \5.30.3

#
# Comment this out if you DON'T want your perl installation to have
Expand Down Expand Up @@ -1679,7 +1679,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
copy ..\pod\perldelta.pod ..\pod\perl5302delta.pod
copy ..\pod\perldelta.pod ..\pod\perl5303delta.pod
$(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
$(MINIPERL) -I..\lib ..\autodoc.pl ..
$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
Expand Down Expand Up @@ -1777,7 +1777,7 @@ distclean: realclean
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat roffitall \
perl5302delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perl5303delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
Expand Down
4 changes: 4 additions & 0 deletions win32/pod.mak
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ POD = perl.pod \
perl5300delta.pod \
perl5301delta.pod \
perl5302delta.pod \
perl5303delta.pod \
perl561delta.pod \
perl56delta.pod \
perl581delta.pod \
Expand Down Expand Up @@ -215,6 +216,7 @@ MAN = perl.man \
perl5300delta.man \
perl5301delta.man \
perl5302delta.man \
perl5303delta.man \
perl561delta.man \
perl56delta.man \
perl581delta.man \
Expand Down Expand Up @@ -370,6 +372,7 @@ HTML = perl.html \
perl5300delta.html \
perl5301delta.html \
perl5302delta.html \
perl5303delta.html \
perl561delta.html \
perl56delta.html \
perl581delta.html \
Expand Down Expand Up @@ -525,6 +528,7 @@ TEX = perl.tex \
perl5300delta.tex \
perl5301delta.tex \
perl5302delta.tex \
perl5303delta.tex \
perl561delta.tex \
perl56delta.tex \
perl581delta.tex \
Expand Down