This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years agoTick off the 5.21.10 release
Steve Hay [Fri, 20 Mar 2015 19:14:28 +0000 (19:14 +0000)]
Tick off the 5.21.10 release

9 years agoAdd 5.21.10 epigraph
Steve Hay [Fri, 20 Mar 2015 19:14:11 +0000 (19:14 +0000)]
Add 5.21.10 epigraph

9 years agoAdd 5.21.10 to perlhist v5.21.10
Steve Hay [Fri, 20 Mar 2015 16:16:07 +0000 (16:16 +0000)]
Add 5.21.10 to perlhist

9 years agoFinalize perldelta
Steve Hay [Fri, 20 Mar 2015 16:15:55 +0000 (16:15 +0000)]
Finalize perldelta

9 years agoUpdate Module-CoreList for 5.21.10
Steve Hay [Fri, 20 Mar 2015 16:04:39 +0000 (16:04 +0000)]
Update Module-CoreList for 5.21.10

9 years agoDevel::PPPort has been upgraded from version 3.28 to 3.31
Steve Hay [Fri, 20 Mar 2015 15:33:53 +0000 (15:33 +0000)]
Devel::PPPort has been upgraded from version 3.28 to 3.31

9 years agoperldelta - Copy-editing, and wrap lines to 79 columns
Steve Hay [Fri, 20 Mar 2015 15:26:56 +0000 (15:26 +0000)]
perldelta - Copy-editing, and wrap lines to 79 columns

9 years agoperldelta - Remove boilerplate sections
Steve Hay [Fri, 20 Mar 2015 15:13:01 +0000 (15:13 +0000)]
perldelta - Remove boilerplate sections

9 years agoperldelta: Fix typo
Karl Williamson [Fri, 20 Mar 2015 15:00:55 +0000 (09:00 -0600)]
perldelta: Fix typo

9 years agoperldelta - Document remaining changes/module upgrades and fill in RT links
Steve Hay [Fri, 20 Mar 2015 14:23:20 +0000 (14:23 +0000)]
perldelta - Document remaining changes/module upgrades and fill in RT links

9 years agoUnicode::Collate has been upgraded from version 1.11 to 1.12
Steve Hay [Fri, 20 Mar 2015 13:16:26 +0000 (13:16 +0000)]
Unicode::Collate has been upgraded from version 1.11 to 1.12

9 years ago Update Unicode-Collate to CPAN version 1.12
Jarkko Hietaniemi [Fri, 20 Mar 2015 11:07:21 +0000 (07:07 -0400)]
Update Unicode-Collate to CPAN version 1.12

      [DELTA]

    1.12  Mon Mar 16 20:21:15 2015
        - XS: [rt.cpan.org #102663] IRIX 6.5 failures with Unicode::Collate
          (porting: avoid non-zero values in the initializer of an array)

9 years agoperldelta for EBCDIC now working
Karl Williamson [Fri, 20 Mar 2015 04:49:21 +0000 (22:49 -0600)]
perldelta for EBCDIC now working

9 years agounicore/README.perl:perl with older Unicode versions
Karl Williamson [Fri, 20 Mar 2015 04:16:15 +0000 (22:16 -0600)]
unicore/README.perl:perl with older Unicode versions

I tried to make the necessary changes for Perl v5.22 to work with old
Unicode versions, but ran out of time before the code freeze, with 5.1
being the earliest version.  The sticking point there is that the
Capital Sharp S, U+1E9E, was defined in that release.  Because of its
anomalous behavior with the infamous lower case sharp s, U+00DF, there
is a bunch of hard-coded references to it in the C code which need to be
adjusted to handle it's absence.

9 years agoUpdate information about using older Unicode
Karl Williamson [Fri, 20 Mar 2015 04:10:36 +0000 (22:10 -0600)]
Update information about using older Unicode

9 years agoregcomp.c: Fix so works on Unicode 5.2
Karl Williamson [Fri, 20 Mar 2015 03:49:30 +0000 (21:49 -0600)]
regcomp.c: Fix so works on Unicode 5.2

Unicode 5.2 had an anomalous situation, fixed in the next release, which
runs afoul of an assert() in regcomp.c.  This just modifies the assert
for it to not fail for this situation.

9 years agoregen/mk_invlists.pl: Handle earlier Unicode versions
Karl Williamson [Fri, 20 Mar 2015 03:35:11 +0000 (21:35 -0600)]
regen/mk_invlists.pl: Handle earlier Unicode versions

There are now hard-coded references in regexec.c to enum values for
\b{}.  Perl is supposed to work when compiled with earlier Unicode
releases, but these had fewer of these enum values.  This commit causes
mk_invlists.pl to make sure any missing ones are defined.  This means we
don't have to #ifdef the code.  An earlier release without an enum value
obviously won't have any code points that map to that value.

9 years agomktables: Better work with earlier Unicodes
Karl Williamson [Fri, 20 Mar 2015 03:00:15 +0000 (21:00 -0600)]
mktables: Better work with earlier Unicodes

Unicode adds new files to its character database from time to time in
new versions of the Standard.  mktables is supposed to be able to handle
this when it knows about a file, but it is compiling a version of the
Standard that predates that file's existence.  It was not dealing
properly with this situation.

9 years agoChange /(?[...]) to have normal operator precedence
Karl Williamson [Thu, 26 Feb 2015 06:19:39 +0000 (23:19 -0700)]
Change /(?[...]) to have normal operator precedence

This experimental feature now has the intersection operator ("&") higher
precedence than the other binary operators.

9 years agoperldelta for #123995 / b24768f02
Father Chrysostomos [Fri, 20 Mar 2015 02:58:09 +0000 (19:58 -0700)]
perldelta for #123995 / b24768f02

9 years agoperldelta for #124004 / c5f78d08da
Father Chrysostomos [Fri, 20 Mar 2015 02:57:29 +0000 (19:57 -0700)]
perldelta for #124004 / c5f78d08da

9 years agoperldelta for #123847 / 3d50185de
Father Chrysostomos [Fri, 20 Mar 2015 02:55:26 +0000 (19:55 -0700)]
perldelta for #123847 / 3d50185de

9 years agoperldelta for #123963 / 9d58dbc453
Father Chrysostomos [Fri, 20 Mar 2015 02:54:22 +0000 (19:54 -0700)]
perldelta for #123963 / 9d58dbc453

9 years agoperldelta for #123955 / ce7c414ee7
Father Chrysostomos [Fri, 20 Mar 2015 02:52:34 +0000 (19:52 -0700)]
perldelta for #123955 / ce7c414ee7

9 years agoperldelta for #123817 / 6b2b48acae
Father Chrysostomos [Fri, 20 Mar 2015 02:51:29 +0000 (19:51 -0700)]
perldelta for #123817 / 6b2b48acae

9 years agoperldelta for #123763 / 26f4cc19a
Father Chrysostomos [Fri, 20 Mar 2015 02:47:24 +0000 (19:47 -0700)]
perldelta for #123763 / 26f4cc19a

and 55b398034, too.

9 years agoperldelta for #123802 / 479ae48e22f11
Father Chrysostomos [Fri, 20 Mar 2015 02:46:27 +0000 (19:46 -0700)]
perldelta for #123802 / 479ae48e22f11

and 66edcf79f

9 years agoperldelta for #123801 / f4460c6f7a0
Father Chrysostomos [Fri, 20 Mar 2015 02:45:49 +0000 (19:45 -0700)]
perldelta for #123801 / f4460c6f7a0

9 years agoperldelta module updates
Steve Hay [Fri, 20 Mar 2015 00:49:12 +0000 (00:49 +0000)]
perldelta module updates

9 years agoCarp::Heavy is no longer customized
Steve Hay [Fri, 20 Mar 2015 00:44:19 +0000 (00:44 +0000)]
Carp::Heavy is no longer customized

9 years agoCarp::Heavy is no longer customized
Ricardo Signes [Thu, 19 Mar 2015 23:26:53 +0000 (19:26 -0400)]
Carp::Heavy is no longer customized

9 years agoCarp: remove unneeded VERSION eval, bump version
Ricardo Signes [Thu, 19 Mar 2015 22:59:54 +0000 (18:59 -0400)]
Carp: remove unneeded VERSION eval, bump version

9 years agoCarp: avoid hardcoded lines and filenames in test
Ricardo Signes [Thu, 19 Mar 2015 22:59:39 +0000 (18:59 -0400)]
Carp: avoid hardcoded lines and filenames in test

9 years agoBump Devel::PPPort version to 3.31
Matthew Horsfall (alh) [Tue, 17 Mar 2015 13:10:43 +0000 (09:10 -0400)]
Bump Devel::PPPort version to 3.31

9 years agoperl.h: Fix nit in comment
Karl Williamson [Thu, 19 Mar 2015 20:41:14 +0000 (14:41 -0600)]
perl.h: Fix nit in comment

9 years agoDocument API for XS LC_NUMERIC locale manipulation
Karl Williamson [Thu, 19 Mar 2015 20:39:06 +0000 (14:39 -0600)]
Document API for XS LC_NUMERIC locale manipulation

XS writers may need to manipulate the LC_NUMERIC locale.  Some macros
are available to do this.  This documents them and the issues.

9 years agoperllocale: Correctly document behavior
Karl Williamson [Thu, 19 Mar 2015 03:58:24 +0000 (21:58 -0600)]
perllocale: Correctly document behavior

9 years agoperl.h: White-space only
Karl Williamson [Thu, 19 Mar 2015 19:28:30 +0000 (13:28 -0600)]
perl.h: White-space only

Remove some empty /**/ and align line continuation backslashes onto tab
boundaries

9 years agoChange some locale manipulation macros in prep for API
Karl Williamson [Thu, 19 Mar 2015 19:06:27 +0000 (13:06 -0600)]
Change some locale manipulation macros in prep for API

This changes the way some of the current internal-only macros are named
and used in order to simplify things and minimize what gets exposed as
part of the API.

Although these have not been listed as publicly available, it costs
essentially nothing to keep the old names around in case someone was
illegally using them.

9 years agoregen/regcharclass.pl: Need to rebuild when source files change
Karl Williamson [Thu, 19 Mar 2015 17:23:58 +0000 (11:23 -0600)]
regen/regcharclass.pl: Need to rebuild when source files change

Like regen/mk_invlists.pl, if any of various Unicode-related files
change, we can't rely on the generated file remaining unchanged.

9 years agoregen/mk_invlists.pl depends on mktables
Karl Williamson [Thu, 19 Mar 2015 17:05:50 +0000 (11:05 -0600)]
regen/mk_invlists.pl depends on mktables

If mktables changes, the input data for this may also change.

9 years agoregen/mk_invlists.pl: Don't quit so easily
Karl Williamson [Fri, 13 Mar 2015 18:20:18 +0000 (12:20 -0600)]
regen/mk_invlists.pl: Don't quit so easily

Like the previous commit, this script may be called before mktables.lst
exists, and we can't generate mktables.lst without this script
executing to completion.  The missing file is only used to determine if
something has changed that we would need to recompile for so this script
can run faster next time it is called.

9 years agoregen/regen_lib.pl: Don't die on missing digest
Karl Williamson [Fri, 13 Mar 2015 18:06:40 +0000 (12:06 -0600)]
regen/regen_lib.pl: Don't die on missing digest

regen_lib now has the capability of calculating a digest for various
files passed to it, and saving those values in the generated output
file.  The passed in files are supposed to be the sources of the
generated file, so that on future regen runs, if no digest value has
changed, there should be no need to actually do the (potentially slow)
regen.

When bootstrapping up a perl, not everything may have been built before
a regen is attempted.  This was dieing under those conditions,
preventing the build from happening.  Thus we come to a dead-end.

This commit causes a random digest to be generated for a source file
that doesn't (yet) exist, instead of dieing.  That means that the build
can continue, and the source should be generated at some point in
it.  The random digest is not going to match the real one, so the next
time the regen happens, it will signal that things need to be rebuilt,
and then the actual digest of the source will be calculated and
stored.

Having the fake digest be a random number makes sure that, should the
missing file remain missing, that the regen will continue to rebuild
things each time.  So, if someone carelessly commits the result without
realizing there is an empty source, the Porting tests will fail, drawing
attention to the problem.

9 years agoUpgrade parent from version 0.228 to 0.232
Steve Hay [Thu, 19 Mar 2015 21:09:42 +0000 (21:09 +0000)]
Upgrade parent from version 0.228 to 0.232

9 years agolib/perl5db.pl: Fix pod typo
Karl Williamson [Thu, 19 Mar 2015 16:07:38 +0000 (10:07 -0600)]
lib/perl5db.pl: Fix pod typo

9 years agolib/perl5db.pl: Generalize for EBCDIC
Karl Williamson [Sun, 15 Mar 2015 03:50:49 +0000 (21:50 -0600)]
lib/perl5db.pl: Generalize for EBCDIC

9 years agoCreate single fcn for dup'd /lib code
Karl Williamson [Sun, 15 Mar 2015 03:50:27 +0000 (21:50 -0600)]
Create single fcn for dup'd /lib code

Several /lib .pm's have the same code which is complicated enough to
warrant being placed in a shared function.  This commit creates a .pm
to be used by these .pm's.

This implements the perhaps archaic 'Meta' notation wherein characters
above 0x7f are displayed as M- plus the ASCII-range character derived by
looking at only the lower 7 bits of the upper range one.  There are
problems with this, in that a literal control character can be in the
string, whereas it is trying to get rid of control characters.  But I
left it to work as-is, just centralizing the code.

On EBCDIC platforms this notation makes no sense because the bit
patterns are all mixed up about having the upper bit set.  So this
commit fixes things on these platforms, so these are changed to
\x{...}.  No literal control characters are emitted.

Another potential problem is that characters above 0xFF are passed
through, unchanged.  But again, I let the existing behavior stand.

9 years agoChange name of mro.c
Karl Williamson [Mon, 16 Mar 2015 17:14:12 +0000 (11:14 -0600)]
Change name of mro.c

This is to prevent a conflict showing up on z/OS (os390) because this
file's name is the same as one in /ext, and there are functions
cross-referenced between them, and the loader on that platform
can't deal with this.

See http://nntp.perl.org/group/perl.perl5.porters/226612

9 years agodbmopen() with a third argument of undef can create files on disk.
Nicholas Clark [Tue, 17 Mar 2015 14:25:02 +0000 (15:25 +0100)]
dbmopen() with a third argument of undef can create files on disk.

Hence we need to ensure that they are cleaned up.

9 years agoFix rendering of this code snippet in 'perldoc -f chomp'
Karen Etheridge [Thu, 19 Mar 2015 02:13:56 +0000 (19:13 -0700)]
Fix rendering of this code snippet in 'perldoc -f chomp'

In text, formerly rendered as:  ("$/ = """)
Now rendered as: ("$/ = ''") which is a tad less confusing

9 years agot/re/pat_re_eval.t: Skip encoding tests on EBCDIC
Karl Williamson [Wed, 18 Mar 2015 21:56:48 +0000 (15:56 -0600)]
t/re/pat_re_eval.t: Skip encoding tests on EBCDIC

These require changes to Encode which are not planned
to be put in v5.22

9 years agot/op/pack.t: Generalize for EBCDIC
Karl Williamson [Thu, 4 Apr 2013 03:56:02 +0000 (21:56 -0600)]
t/op/pack.t: Generalize for EBCDIC

There are still a few failures that are skipped and should be looked at
in v5.23.

9 years agosmartmatch: handle stack realloc
David Mitchell [Wed, 18 Mar 2015 17:06:49 +0000 (17:06 +0000)]
smartmatch: handle stack realloc

When smartmatch is matching a pattern against something, it was
failing to do appropriate PUTBACK and SPAGAIN's  before calling
matcher_matches_sv() (which pushes an arg an calls pp_match()).
If the stack was almost full, the extra push in matcher_matches_sv()
could cause a stack realloc, which would then be ignored when
pp_smartmatch() returned, setting PL_stack_sp to point to the old (freed)
stack.

Adding SPAGAIN ensures that PL_stack_sp points to the new stack, while
PUTBACK causes PL_stack_sp to no longer see the two args to pp_smartmatch,
so the PUSH in matcher_matches_sv() pushes the SV us9ng ones of two two
reclaimed slots, so the stack won't re-alloc anyway.

Thus by doing the "right thing" with both PUTBACK and SPAGAIN, we
doubly ensure that PL_stack_sp will always be right.

9 years agoupdate PL_stack_sp when we exit matcher_matches_sv()
Tony Cook [Thu, 19 Feb 2015 04:03:58 +0000 (15:03 +1100)]
update PL_stack_sp when we exit matcher_matches_sv()

9 years agoTODO test for smartmatch stack issue
Tony Cook [Thu, 19 Feb 2015 04:02:49 +0000 (15:02 +1100)]
TODO test for smartmatch stack issue

9 years agorepeat op: avoid integer overflows
David Mitchell [Wed, 11 Mar 2015 12:25:58 +0000 (12:25 +0000)]
repeat op: avoid integer overflows

For the list variant of the x operator, the overflow detection code
doesn't always work, resulting in the stack not being extended enough.

There are two places where an overflow could occur: calculating how
many stack items to extend by (items * count), and passing to repeatcpy()
how many bytes to copy 'items' SV pointers (items * sizeof(const SV *)).

The overflow detection was generally a mess; checking for overflow
using a value (max) that may have already overflown; checking whether
'max' had overflown incorrectly, and not checking (items * sizeof(const SV
*) at all (perhaps hoping that the other checks would be a superset of
this).

Also, some of the vars were still I32s; promote to 64-bit capable types.

Finally, the signature of Perl_repeatcpy() still has an I32 len;
that really should be changed to IV at some point; but for now I've just
ensured that the callers (list 'x' and scalar 'x') don't wrap.
I haven't put in a check for the only other core caller of repeatcpy(),
S_study_chunk(), since that would only become an issue compiling a pattern
with a fixed or floating substr within it of length > 2**31.

9 years agoop.c: rename CHANGE_TYPE() to OpTYPE_set()
David Mitchell [Thu, 19 Mar 2015 11:04:01 +0000 (11:04 +0000)]
op.c: rename CHANGE_TYPE() to OpTYPE_set()

This macro is private to op.c, and has an overly generic name.

9 years agouniversal.c: remove all trace of op_sibling
David Mitchell [Thu, 19 Mar 2015 10:02:00 +0000 (10:02 +0000)]
universal.c: remove all trace of op_sibling

The OpSIBLING() macro and op_sibling_splice() are a higher-level
way of manipulating optrees that ensure portability in the face of
PERL_OP_PARENT etc.

This commit also helps with the lofty goal of nothing outside of op.c
directly accessing the op_sibling field.

This is a follow-on/improvement to bac7a184cda7b.

9 years agoperlguts: clarify op_sibling usage
David Mitchell [Thu, 19 Mar 2015 09:49:14 +0000 (09:49 +0000)]
perlguts: clarify op_sibling usage

9 years agouniversal.c: PERL_OP_PARENT support
Father Chrysostomos [Thu, 19 Mar 2015 04:56:46 +0000 (21:56 -0700)]
universal.c: PERL_OP_PARENT support

9 years ago[perl #123995] Assert fail with s;@{<<;
Father Chrysostomos [Wed, 18 Mar 2015 09:35:50 +0000 (02:35 -0700)]
[perl #123995] Assert fail with s;@{<<;

If s;; gobbles up the implicit semicolon that is tacked on to the end
of the file, it can confuse the here-doc parser into thinking it is
inside a string eval, because there is no file handle.  We need to
check for that possibility where the assertion was failing.

9 years agoregcomp.c: White-space only
Karl Williamson [Tue, 17 Mar 2015 23:28:24 +0000 (17:28 -0600)]
regcomp.c: White-space only

Outdent code that the previous commit removed the surrounding block from

9 years agoFix qr'\N{U+41}' on EBCDIC platforms
Karl Williamson [Tue, 17 Mar 2015 04:38:20 +0000 (22:38 -0600)]
Fix qr'\N{U+41}' on EBCDIC platforms

Prior to this commit, the regex compiler was relying on the lexer to do
the translation from Unicode to native for \N{...} constructs, where it
was simpler to do.  However, when the pattern is a single-quoted string,
it is passed unchanged to the regex compiler, and did not work.  Fixing
it required some refactoring, though it led to a clean API in a static
function.

This was spotted by Father Chrysostomos.

9 years agodoc typo
Hugo van der Sanden [Wed, 18 Mar 2015 21:58:43 +0000 (21:58 +0000)]
doc typo

9 years agoperlrebackslash: Clarify that \b{} rules are volatile
Karl Williamson [Wed, 18 Mar 2015 19:25:54 +0000 (13:25 -0600)]
perlrebackslash: Clarify that \b{} rules are volatile

9 years agodist/Data-Dumper/t/dumper.t: White space only
Karl Williamson [Wed, 18 Mar 2015 17:27:34 +0000 (11:27 -0600)]
dist/Data-Dumper/t/dumper.t: White space only

The previous commit removed a surrounding block.  outdent
correspondingly

9 years agodist/Data-Dumper/t/dumper.t: Simplify EBCDIC
Karl Williamson [Fri, 13 Mar 2015 05:03:17 +0000 (23:03 -0600)]
dist/Data-Dumper/t/dumper.t: Simplify EBCDIC

This collapses two pieces of code into one.  It isn't necessary to have
an ASCII version vs an EBCDIC version.

9 years agoTerm::Complete: Generalize for EBCDIC
Karl Williamson [Fri, 27 Jun 2014 22:31:41 +0000 (16:31 -0600)]
Term::Complete: Generalize for EBCDIC

By this simple change, we can avoid printing all controls except \c?.
On ASCII platforms the remaining control is DEL, which is handled above.
On EBCDIC platforms, \c? remains a problem.

But it isn't clear what to do about this anyway, as the module
interprets ^D, ^H, ^U specially as if they were typed from the keyboard,
and expects the keyboard to transmit them in a particular way, which may
not be valid for EBCDIC.  No tests fail, so fixing this will have to
wait for tuits or field complaints.

9 years agolib/open.t: TODO an EBCDIC test until Encode fixed
Karl Williamson [Mon, 2 Mar 2015 23:06:47 +0000 (16:06 -0700)]
lib/open.t: TODO an EBCDIC test until Encode fixed

9 years agoDBM_Filter/t/encode.t: temporarily skip until Encode fixed
Karl Williamson [Tue, 3 Mar 2015 05:07:45 +0000 (22:07 -0700)]
DBM_Filter/t/encode.t: temporarily skip until Encode fixed

9 years agoporting/readme.t: TODO failing EBCDIC test
Karl Williamson [Tue, 3 Mar 2015 04:31:07 +0000 (21:31 -0700)]
porting/readme.t: TODO failing EBCDIC test

This depends on Unicode::Collate, which is not yet working properly in
EBCDIC

9 years agoext/SDBM_File/sdbm/dbu.c Generalize for EBCDIC platforms
Karl Williamson [Sun, 7 Dec 2014 06:08:38 +0000 (23:08 -0700)]
ext/SDBM_File/sdbm/dbu.c Generalize for EBCDIC platforms

This also fixed a bug which hasn't shown up in the tests, in that it
uses 'char' where it should be 'U8'.

9 years agoregexec.c: Fix improper warning.
Karl Williamson [Wed, 18 Mar 2015 04:03:16 +0000 (22:03 -0600)]
regexec.c: Fix improper warning.

\b{} and \B{} are valid in UTF-8 locales, as all the Unicode rules
apply.  Prior to this patch a warning was raised under some
circumstances.  The warning text was generalized to handle both \b and
\B cases.  The original text was only just added, in 5.21.9.

9 years agore/pat_advanced.t: Tighten test
Karl Williamson [Mon, 16 Mar 2015 21:52:18 +0000 (15:52 -0600)]
re/pat_advanced.t: Tighten test

This adds anchors to a pattern.  I discovered while changing things that
it still passed when broken

9 years agoregcomp.sym: Update \b descriptions
Karl Williamson [Tue, 17 Mar 2015 22:56:34 +0000 (16:56 -0600)]
regcomp.sym: Update \b descriptions

9 years agoPATCH: [perl #124091] PP Data::Dumper fails on \n isolate
Karl Williamson [Tue, 17 Mar 2015 21:44:03 +0000 (15:44 -0600)]
PATCH: [perl #124091] PP Data::Dumper fails on \n isolate

Commit 31ac59b61698e704b64192de74793793f4b5b0c0 inadvertently changed
the behavior of the pure perl version of Data::Dumper.  If a newline is
the sole character in something being dumped with useqq, it no longer
got translated into a \n sequence and was output raw.  This was due to
the regex matching of \n at beginning and ends of strings.

9 years agot/op/dump.t: silence 'Aborted' messages on stderr
David Mitchell [Wed, 18 Mar 2015 14:10:33 +0000 (14:10 +0000)]
t/op/dump.t: silence 'Aborted' messages on stderr

On some platforms, t/op/dump.t produces extraneous (and scary)

    sh: line 1: 17605 Aborted (core dumped)

style messages on stderr.

Do a fork in each test to avoid this.

9 years agoCwd.xs: silence recent compiler warning
David Mitchell [Wed, 18 Mar 2015 12:08:07 +0000 (12:08 +0000)]
Cwd.xs: silence recent compiler warning

A recent commit added a label, plus a "goto that label" only in the EBCDIC
case. On "normal" builds, the compiler complained about an unused label.

Also, indent the recent '#ifdef EBCDIC' correctly.

9 years agoS_grok_bslash_[ox]: assert char fits
David Mitchell [Wed, 18 Mar 2015 11:53:23 +0000 (11:53 +0000)]
S_grok_bslash_[ox]: assert char fits

S_grok_bslash_o() and S_grok_bslash_x() scan \o{...} and \x{...} in a
string, and return a UV codepoint. Some callers assume that if that
codepoint is converted into a series of utf8 bytes and re-inserted into
the string, that it will tale up less space than the original "\x{...}"
sequence. Add asserts that this is indeed so.

9 years agoloopctl.c: Correct bug num
Father Chrysostomos [Wed, 18 Mar 2015 06:17:48 +0000 (23:17 -0700)]
loopctl.c: Correct bug num

9 years ago[perl #124004] Fix stack bug with foreach(@empty)
Father Chrysostomos [Wed, 18 Mar 2015 05:40:25 +0000 (22:40 -0700)]
[perl #124004] Fix stack bug with foreach(@empty)

The context gets recorded on the context stack when a loop is entered.
That context is then used at loop exit when handling the stack.

In the case of foreach, the context applied to the stack was taken
from the enteriter op.  But the enteriter op was always getting list
context applied.  That meant that foreach(@empty_array){} in scalar
context would push nothing on to the stack, causing a subsequent stack
read to look one item too far to the left, either reading the wrong
thing, or causing a stack underflow (even a crash).  The clearest bug
resulting from it:

$ ./miniperl -le 'push @_, 1, 2, 3, scalar do { for(@x){} } + 1, 4, 5, 6; print "@_"'
1 2 4 4 5 6

instead of 1 2 3 1 4 5 6.

We do need to apply list context to make sure the items iterated over
are evaluated in list context.  But we need to apply it *only* to
those (expr in newFOROP), not the the outer enteriter op.  That op’s
context should be left unset here, so that the calling context will be
applied to it.

This bug goes back at least to perl 5.000.

9 years agoRemove PL_ prefix for recently added non-globals
Karl Williamson [Fri, 13 Mar 2015 17:54:46 +0000 (11:54 -0600)]
Remove PL_ prefix for recently added non-globals

PL is reserved for global variables.  These are enums and static
variable names introduced for handling /\b{...}/

See <20150311150610.GN28599@iabyn.com> and follow up.

9 years agoPreserve OPTIMIZE in hints
Vincent Pit [Tue, 17 Mar 2015 17:06:16 +0000 (14:06 -0300)]
Preserve OPTIMIZE in hints

Some extensions hints files (B, Digest-MD5, PerlIO-via) forcefully
overwrite OPTIMIZE in order to work around compiler mishaps with high level
optimizations. However, this loses whatever extra flags are listed in
OPTIMIZE, such as compiler warnings flags or PERL_POISON, and makes them
difficult to run under a debugger since a minimal level of optimization
(usually -O1) is always enforced. This has became visible recently with
new XS handshake facility.

Instead, we chose to just follow Storable's strategy of lowering the
optimization level with a substitution, while keeping all the other flags
untouched. If other compiler flags are deemed problematic (such as
-mcpu/-march on gcc), they ought to be addressed separately.

Only B and PerlIO-via hints files are fixed by this change. The case of
Digest-MD5 will be addressed on the CPAN.

This fixes [RT #124038].

9 years agoperldelta for previous commit
Steve Hay [Tue, 17 Mar 2015 22:36:33 +0000 (22:36 +0000)]
perldelta for previous commit

9 years agoUpgrade to threads 2.01
Jerry D. Hedden [Sun, 8 Mar 2015 02:33:02 +0000 (21:33 -0500)]
Upgrade to threads 2.01

9 years agoUpgrade CPAN::Meta from version 2.143240 to 2.150001
Steve Hay [Tue, 17 Mar 2015 22:10:34 +0000 (22:10 +0000)]
Upgrade CPAN::Meta from version 2.143240 to 2.150001

9 years agoBlead is (almost!) using Carp-1.35
Steve Hay [Tue, 17 Mar 2015 21:47:16 +0000 (21:47 +0000)]
Blead is (almost!) using Carp-1.35

9 years agoPorting/core-cpan-diff: Don't ignore EOLs or whitespace
Steve Hay [Tue, 17 Mar 2015 18:07:40 +0000 (18:07 +0000)]
Porting/core-cpan-diff: Don't ignore EOLs or whitespace

Turning off -b (ignore whitespace) revealed a whitespace difference lurking
in blead's copy of a NEXT test file, which there is no need for.
Turning on --binary revealed EOL differences in numerous Win32API-File
files. Hopefully a future CPAN release will fix those since the files in
its GitHub repo match blead as far as EOLs go already.

9 years agoRevert discouragement of fatal warnings
Ricardo Signes [Tue, 17 Mar 2015 17:28:31 +0000 (13:28 -0400)]
Revert discouragement of fatal warnings

...at least for now.

This reverts commits 0d314ba30623b19c36dfc97ac4b6ecb94cb406f4
and ce3778a3796be3e4604ed9b3671ea624c5affe0b.

9 years agoPL_custom_op{s,_names,_descs} should be set to NULL in perl_destruct().
Nicholas Clark [Tue, 17 Mar 2015 16:19:23 +0000 (17:19 +0100)]
PL_custom_op{s,_names,_descs} should be set to NULL in perl_destruct().

Otherwise SEGVs and other jollity can happen if the interpreter is created a
second (or subsequent) time, and modules attempt to register custom OPs
(using either the old or new approaches).

These appear to have been bugs since the relevant code was introduced
(new approach in v5.14.0, old approach in v5.8.0)

This probably only affects mod_perl built against a perl without ithreads,
which makes it unlikely that many folks hit it with OS distributions.

You'd need to (at least) be building your own perl, using mod_perl, and
using a module that uses custom OPs.

9 years agoavoid infinite loop in re_intuit_start()
David Mitchell [Tue, 17 Mar 2015 15:43:10 +0000 (15:43 +0000)]
avoid infinite loop in re_intuit_start()

On STCLASS failure, sometimes we go back and retry an anchored search
if it's still within the range of the previously successful floating
search. The 'in range' criterion is formally that

    rx_origin + float_offset_min chars < previous float match position

i.e. when we match the float string, the start of the rx must be somewhere
within float_offset_max..float_offset_min chars before that. If we
haven't yet reached rx_origin+float_offset_min, then there are still
some candidate starting positions for the rx that don't violate the
float constraint.

However, we do the above calculation in bytes rather than chars for
efficiency (if float_offset_min is large, we could otherwise end up doing
O^2 scans of the string). This is conservative and harmless because at
worst we end up doing an unnecessary (but safe) fixed string scan.

However, it turns out that the 'other' code block that calls fbm_instr()
didn't check for the start of scn range being greater than the end;
in this case, for '$' type matches, it would still match. So skip calling
fbm_instr() if start > end.

9 years agore_intuit_start(): improve debugging output
David Mitchell [Tue, 17 Mar 2015 13:00:29 +0000 (13:00 +0000)]
re_intuit_start(): improve debugging output

1) make string offsets be consistently counted from strbeg, rather than
   a mixture of that and strpos;
2) make it clearer when rx_origin has been updated, since that value
   is the raison d'etre of intuit();
3) always show the input and output offsets when calling fbm_intr() from
   intuit().

9 years agodist/ExtUtils-CBuilder/t/04-base.t: os390 fix
Karl Williamson [Wed, 4 Feb 2015 20:22:25 +0000 (13:22 -0700)]
dist/ExtUtils-CBuilder/t/04-base.t: os390 fix

9 years agoUpgrade Text::ParseWords from version 3.29 to 3.30
Steve Hay [Tue, 17 Mar 2015 15:05:37 +0000 (15:05 +0000)]
Upgrade Text::ParseWords from version 3.29 to 3.30

This incorporates blead's code differences, but one "customization" remains
because of EOL issues, which I've sent a pull request upstream to fix.

The latest release also moves the .pm file into the usual place, so the MAP
is no longer required.

There are no code changes here, so no code freeze violation.

9 years agoExtend Cwd to work on z/OS sysplexed systems
Karl Williamson [Tue, 3 Feb 2015 05:32:26 +0000 (22:32 -0700)]
Extend Cwd to work on z/OS sysplexed systems

On sysplexed os390 systems, the literal string "$SYSNAME" in a directory
path appears to the code to be a symbolic link to itself.  If one wants
to walk $SYSNAME/tmp, for example, one keeps recursing, adding $SYSNAMEs
on to the front of the path until our fail-safe limit is reached.  This
would like something like

$SYSNAME/$SYSNAME/.../$SYSNAME /tmp

never reaching the tmp.

What this commit does is to replace all instances of $SYSNAME/foo simply
by /foo, for all foo when $SYSNAME is a symbolic link.  Then the above
would resolve simply to /tmp.

There appears to not be a problem with the pure perl version

9 years agodist/PathTools/Cwd.xs: rename variable
Karl Williamson [Sun, 1 Feb 2015 05:13:19 +0000 (22:13 -0700)]
dist/PathTools/Cwd.xs: rename variable

'left' implies to me a direction, especially in this context where we
are parsing a path from left to right; instead it here means
'remaining', which I've renamed it to.

9 years agodist/PathTools/Cwd.xs: White-space/comment only
Karl Williamson [Thu, 29 Jan 2015 17:00:40 +0000 (10:00 -0700)]
dist/PathTools/Cwd.xs: White-space/comment only

Bring indentation style of bsd_realpath() into line with the rest of
Perl

9 years agoBump version of dist/PathTools to 3.55
Karl Williamson [Fri, 13 Mar 2015 03:05:46 +0000 (21:05 -0600)]
Bump version of dist/PathTools to 3.55

9 years agoperldelta entry for ce3778a3796be3e4604ed9b3671ea624c5affe0b.
James E Keenan [Tue, 17 Mar 2015 01:11:52 +0000 (21:11 -0400)]
perldelta entry for ce3778a3796be3e4604ed9b3671ea624c5affe0b.

Slight grammatical touch-up to cautions against FATAL warnings.

9 years agoDocument FATAL warnings as discouraged.
David Golden [Mon, 16 Mar 2015 18:55:46 +0000 (14:55 -0400)]
Document FATAL warnings as discouraged.

Discussions on p5p have reached reasonable consensus that fatal warnings are
a misfeature.

This commit marks fatal warning as "discouraged" and moves up the
related cautionary documentation to highlight the risks of using them.

For details on the many historical and current issues with fatal warning, see
http://www.nntp.perl.org/group/perl.perl5.porters/2015/01/msg225235.html