5 days agoMake core use rstack; copy stack for xsubs sprout/rstack
Father Chrysostomos [Tue, 26 Jul 2016 06:24:49 +0000]
Make core use rstack; copy stack for xsubs

UNFINISHED!!!

The G_STACK flag will need to be documented in a subsequent commit.

5 days agoActually create the new rmarkstack
Father Chrysostomos [Sun, 4 Sep 2016 21:40:54 +0000]
Actually create the new rmarkstack

5 days agoav.c:av_store: Handle rstack
Father Chrysostomos [Tue, 30 Aug 2016 05:14:00 +0000]
av.c:av_store: Handle rstack

I do believe this code is unreachable and paranoid, but call
me paranoid.

5 days agoav.c:av_extend: Handle rstack
Father Chrysostomos [Mon, 29 Aug 2016 06:56:17 +0000]
av.c:av_extend: Handle rstack

5 days agocop.h: Add G_RSTACK flag
Father Chrysostomos [Fri, 26 Aug 2016 05:15:34 +0000]
cop.h: Add G_RSTACK flag

This will be implicitly passed to call_sv and call_whatever based on
the value of the PERL_STACK_LOCALLY_REFCOUNTED #define.

5 days agoAdjust mark macros to handle both stacks
Father Chrysostomos [Tue, 9 Aug 2016 05:18:44 +0000]
Adjust mark macros to handle both stacks

Leave the refcounted-stack code disarmed for now, to keep things
compilable.

5 days agoperl.c: Inline CALL_LIST_BODY
Father Chrysostomos [Thu, 11 Aug 2016 06:03:43 +0000]
perl.c: Inline CALL_LIST_BODY

into the only spot that calls it.  This just makes the code at that
point clearer and easier to edit.

5 days agosv.c: Clone new refcounted stacks
Father Chrysostomos [Tue, 9 Aug 2016 05:31:46 +0000]
sv.c: Clone new refcounted stacks

5 days agoNew rmarkstack_grow func for rc stack
Father Chrysostomos [Mon, 1 Aug 2016 01:31:32 +0000]
New rmarkstack_grow func for rc stack

You can’t read the new body of the function without seeing stars.

5 days agoAdd rstack_grow function to grow refcounted stack
Father Chrysostomos [Wed, 27 Jul 2016 05:32:45 +0000]
Add rstack_grow function to grow refcounted stack

5 days agoperl.h: defines for refcounted stack
Father Chrysostomos [Tue, 19 Jul 2016 01:08:28 +0000]
perl.h: defines for refcounted stack

5 days agoAdd XSUB flag for refcounted stack
Father Chrysostomos [Sun, 17 Jul 2016 06:08:15 +0000]
Add XSUB flag for refcounted stack

Subs with this flag will use perl’s default refcounted stack.  Other
subs will get the stack copied to the old non-refcounted stack when
they are called.

5 days agoAdd intrp vars for a refcounted stack
Father Chrysostomos [Sat, 16 Jul 2016 07:52:17 +0000]
Add intrp vars for a refcounted stack

6 days agoFix checks for tainted dir in $ENV{PATH}
Father Chrysostomos [Sat, 3 Sep 2016 20:30:22 +0000]
Fix checks for tainted dir in $ENV{PATH}

$ cat > foo
#!/usr/bin/perl
print "What?!\n"
^D
$ chmod +x foo
$ ./perl -Ilib -Te '$ENV{PATH}="."; exec "foo"'
Insecure directory in $ENV{PATH} while running with -T switch at -e line 1.

That is what I expect to see.  But:

$ ./perl -Ilib -Te '$ENV{PATH}="/\\:."; exec "foo"'
What?!

Perl is allowing the \ to escape the :, but the \ is not treated as an
escape by the system, allowing a relative path in PATH to be consid-
ered safe.

6 days agotaint.t: Set up @INC before using it
Father Chrysostomos [Sat, 3 Sep 2016 17:15:22 +0000]
taint.t: Set up @INC before using it

The ‘chdir t’ line is useless if we require ./loc_tools.pl before
setting up @INC properly, as loc_tools.pl uses warnings.pm.

7 days agoTry harder to clean up %ENV in 140_proxy.t.
Craig A. Berry [Sat, 3 Sep 2016 15:59:55 +0000]
Try harder to clean up %ENV in 140_proxy.t.

While the localization earlier in the test *should* leave the
relevent %ENV entries in a good state for the final test, for
some reason this is not happening on VMS.  It may have something
to do with the fact that %ENV has all upper case keys but the
test has previously localized both upper and lower case versions.

In any case, even though it isn't this test's fault, the easiest
and safest way to get it passing is to just do another clean-up.

Awaiting upstream application at:

https://github.com/chansen/p5-http-tiny/pull/95

7 days agoDon't pollute $ENV{LC_ALL} in pod/perlmodlib.PL.
Craig A. Berry [Fri, 2 Sep 2016 20:43:52 +0000]
Don't pollute $ENV{LC_ALL} in pod/perlmodlib.PL.

Because on VMS, DYNAMIC_ENV_FETCH makes environment settings
persist after program exit, and running a program (e.g. Perl)
does not normally start a separate process.  This was confusing
the inadequate attempt in t/run/locale.t to clear the locale-related
environment variables.

7 days agoDelete localized %ENV entries in t/run/locale.t.
Craig A. Berry [Fri, 2 Sep 2016 19:59:25 +0000]
Delete localized %ENV entries in t/run/locale.t.

Localizing %ENV entries actually instantiates them with an undef
value, which, at least on VMS, gets propagated to the various
runperl subprocesses where it can trigger locale warnings at start-up
time.  Deleting the localized entries, though, actually removes
them from the localized %ENV:

$ perl -E '{ local $ENV{FOO}; say exists $ENV{FOO} ? 'Y' : 'N'; }'
Y
$ perl -E '{ delete local $ENV{FOO}; say exists $ENV{FOO} ? 'Y' : 'N'; }'
N

but any pre-existing values in outer scope are safely restored when
the local scope exits.

This gets this test passing on VMS again for the first time in a
very long time.  It turns out pod/perlmodlib.PL has been polluting
LC_ALL and this test has not been adequately defending itself.

7 days agoMore stderr suppression in t/run/locale.t.
Craig A. Berry [Fri, 2 Sep 2016 19:17:45 +0000]
More stderr suppression in t/run/locale.t.

Closing stderr in the parent process doesn't have any effect on
Perl in the subprocess on VMS, so use the facility in the test
infrastructure to suppress stderr there as well.

8 days agoRemove obsolete Test prereq from PathTools
Dagfinn Ilmari Mannsåker [Fri, 2 Sep 2016 15:47:45 +0000]
Remove obsolete Test prereq from PathTools

It was ported to Test::More in cba09117 in 2011, but the upstream
Makefile.PL that was added in 8e6d3e2b in 2013 took the Makefile.PL from
the last CPAN release which was from 2008.

8 days agoMake PERLLIB_SEP dynamic on VMS.
Craig A. Berry [Thu, 1 Sep 2016 18:30:28 +0000]
Make PERLLIB_SEP dynamic on VMS.

Because if we're running under a Unix shell, the path separator is
likely to meet the expectations of Unix shell scripts better if it's
the Unix ':' rather than the VMS '|'.  There is no change when
running under DCL.

8 days agoCorrect 'map' documentation to reflect operation on a list.
Dave Cross [Thu, 1 Sep 2016 22:29:58 +0000]
Correct 'map' documentation to reflect operation on a list.

Rather than on an array.

For: RT #126169.

Dave Cross is now a Perl Author.

8 days agoProvide missing link for one instance of 'eval'.
James E Keenan [Thu, 1 Sep 2016 18:39:16 +0000]
Provide missing link for one instance of 'eval'.

As originally reported by KES.  See RT #129168.

8 days agoFix is_utf8_valid_partial_char()
Karl Williamson [Thu, 1 Sep 2016 18:07:33 +0000]
Fix is_utf8_valid_partial_char()

This should have been part of 4dab108fb5e7e21a547733bb00ddb5d8bffd936d,
but when I was rebasing, these changes got moved to an unrelated commit
that hasn't been pushed yet, and I didn't notice immediately.  I will
add som API tests for this in the next few days.

9 days agoAdd C macros for UTF-8 for BOM and REPLACEMENT CHARACTER
Karl Williamson [Sun, 28 Aug 2016 03:17:49 +0000]
Add C macros for UTF-8 for BOM and REPLACEMENT CHARACTER

This makes it easy for module authors to write XS code that can use
these characters, and be automatically portable to EBCDIC systems.

9 days agoMerge branch for improving API UTF-8 handling into blead
Karl Williamson [Thu, 1 Sep 2016 02:33:21 +0000]
Merge branch for improving API UTF-8 handling into blead

This set of commits came about to allow XS code to more easily and
quickly check for valid UTF-8 without rolling their own, which could be
lacking in security considerations.

Most of the small UTF-8 handling functions have now been inlined, and
the validity-only checking function has been rewritten to never need to
actually calculate the code point the UTF-8 represents.

The original impetus for this was because of changes in Encode that made
it vulnerable to malformed UTF-8.  These changes were to speed up its
UTF-8 processing.  By changing Encode to use this new stuff, it is
sped up on valid input by over a factor of 5 from the original
implementation, at the expense of slowing down entirely invalid input by
a factor of 4.  Since we are expecting mostly valid input, this is an
overall big win.  The original handrolled Encode changes sped up valid
input handling by about 1.5, without slowing handling of invalid down
appreciably.

9 days agoUse new is_utf8_valid_partial_char()
Karl Williamson [Mon, 29 Aug 2016 04:04:16 +0000]
Use new is_utf8_valid_partial_char()

This new function can be used in the implementation of the file test
operators, -B and -T, to see if the whole fixed length buffer is valid
UTF-8.  Previously if all bytes were UTF-8 except the bytes at the end
that could have been a partial character, it assumed the whole thing was
UTF-8.  This improves the prediction slightly

9 days agoAdd is_utf8_valid_partial_char()
Karl Williamson [Sun, 28 Aug 2016 16:54:13 +0000]
Add is_utf8_valid_partial_char()

This new function can test some purported UTF-8 to see if it is
well-formed as far as it goes.  That is there aren't enough bytes for
the character they start, but what is there is legal so far.  This can
be useful in a fixed width buffer, where the final character is split in
the middle, and we want to test without waiting for the next read that
the entire buffer is valid.

9 days agoMake 3 UTF-8 macros API
Karl Williamson [Sun, 28 Aug 2016 02:08:52 +0000]
Make 3 UTF-8 macros API

These may be useful to various module writers.  They certainly are
useful for Encode.  This makes public API macros to determine if the
input UTF-8 represents (one macro for each category)
    a) a surrogate code point
    b) a non-character code point
    c) a code point that is above Unicode's legal maximum.

The macros are machine generated.  In making them public, I am now using
the string end location parameter to guard against running off the end
of the input.  Previously this parameter was ignored, as their use in
the core could be tightly controlled so that we already knew that the
string was long enough when calling these macros.  But this can't be
guaranteed in the public API.  An optimizing compiler should be able to
remove redundant length checks.

9 days agoutf8.c: Add comments
Karl Williamson [Fri, 26 Aug 2016 22:47:32 +0000]
utf8.c: Add comments

9 days agois_utf8_string() is now a pure function
Karl Williamson [Fri, 26 Aug 2016 22:53:00 +0000]
is_utf8_string() is now a pure function

as of the previous commit

9 days agoMove isUTF8_CHAR helper function, and reimplement it
Karl Williamson [Fri, 26 Aug 2016 22:29:54 +0000]
Move isUTF8_CHAR helper function, and reimplement it

The macro isUTF8_CHAR calls a helper function for code points higher
than it can handle.  That function had been an inlined wrapper around
utf8n_to_uvchr().

The function has been rewritten to not call utf8n_to_uvchr(), so it is
now too big to be effectively inlined.  Instead, it implements a faster
method of checking the validity of the UTF-8 without having to decode
it.  It just checks for valid syntax and now knows where the
few discontinuities are in UTF-8 where overlongs can occur, and uses a
string compare to verify that overflow won't occur.

As a result this is now a pure function.

This also causes a previously generated deprecation warning to not be,
because in printing UTF-8, no longer does it have to be converted to
internal form.  I could add a check for that, but I think it's best not
to.  If you manipulated what is getting printed in any way, the
deprecation message will already have been raised.

This commit also fleshes out the documentation of isUTF8_CHAR.

9 days agoAdd #defines for UTF-8 of highest representable code point
Karl Williamson [Fri, 26 Aug 2016 22:23:24 +0000]
Add #defines for UTF-8 of highest representable code point

This will allow the next commit to not have to actually try to decode
the UTF-8 string in order to see if it overflows the platform.

9 days agoutf8.h: Add some LIKELY() to help branch prediction
Karl Williamson [Fri, 26 Aug 2016 22:21:25 +0000]
utf8.h: Add some LIKELY() to help branch prediction

This macro gives the legal UTF-8 byte sequences.  Almost always, the
input will be legal, so help compiler branch prediction for that.

9 days agoutf8.h, utfebcdic.h: Add comments, align white space
Karl Williamson [Fri, 26 Aug 2016 22:07:22 +0000]
utf8.h, utfebcdic.h: Add comments, align white space

9 days agoInline is_utf8_string() and is_utf8_stringloclen()
Karl Williamson [Fri, 26 Aug 2016 21:53:36 +0000]
Inline is_utf8_string() and is_utf8_stringloclen()

9 days agoInline utf8_distance(), utf8_hop()
Karl Williamson [Fri, 26 Aug 2016 21:03:52 +0000]
Inline utf8_distance(), utf8_hop()

9 days agoSlightly simplify utf8_to_uvuni_buf()
Karl Williamson [Fri, 26 Aug 2016 20:47:17 +0000]
Slightly simplify utf8_to_uvuni_buf()

Use a function that does the same thing.  This also clarifies a related
comment

9 days agoInline is_utf8_invariant_string()
Karl Williamson [Fri, 26 Aug 2016 20:07:50 +0000]
Inline is_utf8_invariant_string()

9 days agois_utf8_invariant_string is pure
Karl Williamson [Fri, 26 Aug 2016 19:54:51 +0000]
is_utf8_invariant_string is pure

As are its synonyms.  This also declares the formal parameters 'const'

9 days agoSimplify slightly is_utf8_invariant_string
Karl Williamson [Fri, 26 Aug 2016 19:52:52 +0000]
Simplify slightly is_utf8_invariant_string

This eliminates an unnecessary branch test in unoptimized code.

9 days agoUse new name 'is_utf8_invariant_string' in core
Karl Williamson [Fri, 26 Aug 2016 19:42:53 +0000]
Use new name 'is_utf8_invariant_string' in core

This changes the places in the core to use the clearer synonym added by
the previous commit.  It also changes one place that hand-rolled its own
code to use this function instead.

9 days agoAdd new synonym 'is_utf8_invariant_string'
Karl Williamson [Fri, 26 Aug 2016 19:35:28 +0000]
Add new synonym 'is_utf8_invariant_string'

This is clearer as to its meaning than the existing 'is_ascii_string'
and 'is_invariant_string', which are retained for back compat.  The
thread context variable is removed as it is not used.

9 days agoembed.fnc: Replace blanks by tabs
Karl Williamson [Tue, 23 Aug 2016 19:37:10 +0000]
embed.fnc: Replace blanks by tabs

In this file, tabs are the more accepted field delimiter, and having
them makes it easier to search for particular patterns in it.

9 days agoutf8.c: Use 'break' instead of 'goto'
Karl Williamson [Mon, 22 Aug 2016 18:28:21 +0000]
utf8.c: Use 'break' instead of 'goto'

The goto is a relic of a previous implementation; 'break' is preferred
if there isn't a reason to use goto.

9 days agois_utf8_string_loc() param should not be NULL
Karl Williamson [Mon, 22 Aug 2016 18:25:00 +0000]
is_utf8_string_loc() param should not be NULL

It makes no sense to call this function with a NULL parameter, as the
whole point of using this function is to set what that param points to.
If you don't want this, you should be using the similar function that
doesn't have this parameter.

9 days agoDocument valid_utf8_to_uvchr() and inline it
Karl Williamson [Mon, 22 Aug 2016 18:21:06 +0000]
Document valid_utf8_to_uvchr() and inline it

This function has been in several releases without problem, and is short
enough that some compilers can inline it.  This commit also notes that
the result should not be ignored, and removes the unused pTHX.  The
function has explicitly been marked as being changeable, and has not
been part of the API until now.

9 days agoutf8.c: Clarify comments for valid_utf8_to_uvchr()
Karl Williamson [Mon, 22 Aug 2016 16:48:55 +0000]
utf8.c: Clarify comments for valid_utf8_to_uvchr()

9 days agoutf8.c: Join EBCDIC/non-EBCDIC code
Karl Williamson [Mon, 22 Aug 2016 16:59:48 +0000]
utf8.c: Join EBCDIC/non-EBCDIC code

This was missed in 534752c1d25d7c52c702337927c37e40c4df103d

9 days agoregen/embed.pl: Allow inline funcs to be named Perl_foo
Karl Williamson [Fri, 26 Aug 2016 21:25:20 +0000]
regen/embed.pl: Allow inline funcs to be named Perl_foo

When inlining an existing public function whose name begins with Perl_,
it's best to keep that name, in case someone is calling it that way.
Prior to this commit, the name had to be changed to S_foo.

9 days agoUpdate outdated man links for strlcpy and strlcat.
Theo Buehler [Sat, 27 Aug 2016 01:36:28 +0000]
Update outdated man links for strlcpy and strlcat.

9 days agoAdd Theo Buehler to AUTHORS
Karl Williamson [Thu, 1 Sep 2016 00:07:55 +0000]
Add Theo Buehler to AUTHORS

9 days agoPATCH: [perl #129122] regex sets syntax error
Karl Williamson [Wed, 31 Aug 2016 23:05:45 +0000]
PATCH: [perl #129122] regex sets syntax error

This was caused by two statements being in the wrong order.  One should
save something on the stack before changing it, not after.

However fixing this led to the discovery of another bug in which an
error case was failed to be detected.

9 days agoregcomp.c: Typo, spacing in comment
Karl Williamson [Wed, 31 Aug 2016 22:57:20 +0000]
regcomp.c: Typo, spacing in comment

11 days agoPorting/bisect.pl: /usr/sbin/sysctl exists
Karl Williamson [Sun, 24 Jul 2016 00:28:52 +0000]
Porting/bisect.pl: /usr/sbin/sysctl exists

11 days agoRevert "perlinterp: Use 'e.g' not 'i.e.' for 'for example'"
Karl Williamson [Mon, 29 Aug 2016 23:06:50 +0000]
Revert "perlinterp: Use 'e.g' not 'i.e.' for 'for example'"

This reverts commit ce66b506fa280c2ede0b0d4a3e81b53d0e31cb48.

I misread the text.  This is an exhaustive list, so "i.e." is proper.

11 days agoPATCH: [perl #129038] Crash with s///l
Karl Williamson [Sun, 28 Aug 2016 01:16:17 +0000]
PATCH: [perl #129038] Crash with s///l

The cause of this was bad logic.  It thought it was dealing with UTF-8
when it wasn't.

11 days agoperlinterp: Use 'e.g' not 'i.e.' for 'for example'
Karl Williamson [Sun, 28 Aug 2016 15:39:38 +0000]
perlinterp: Use 'e.g' not 'i.e.' for 'for example'

12 days ago[RT #129069] Perl_yylex: Fix two use-after-free bugs
Dan Collins [Wed, 24 Aug 2016 18:19:09 +0000]
[RT #129069] Perl_yylex: Fix two use-after-free bugs

Perl_yylex maintains up to two pointers, `s` and `d`, into the parser
buffer at PL_bufptr. It can call skipspace(), which can potentially
grow (and realloc) its argument. This can leave the second pointer
pointing at the old buffer. Under most cases it isn't visible, because
the old buffer isn't reused or zeroed. However, under Valgrind or
libdislocator, this memory management error becomes visible.

This patch saves the location of the second pointer in two locations,
and restores it after the call to skipspace.

13 days ago[perl #125679] Don’t make lvref ops on error
Father Chrysostomos [Sun, 28 Aug 2016 14:21:19 +0000]
[perl #125679] Don’t make lvref ops on error

When converting an op into an lvref op (the rv2av in \(@_)=... gets
converted while the refgen gets nulled), if we reject the op as a
valid one for refaliasing we should not go ahead and convert it.  It
we do convert it (as we were doing), then we may convert an op that
uses op_targ for auxiliary information into one that uses it as a pad
offset.  When freeing the op, we will then be reading a ‘random’ off-
set in the pad and trying to free the SV.  That pad entry may not even
be within the pad.

In the specific case of entereval, op_targ holds the hints, and the
larger the value of $^H, the more likely it is to crash.  So
BEGIN{$^H=-1}\eval=... will crash.

2 weeks agoUpgrade to Thread::Semaphore 2.13
jdhedden [Sat, 27 Aug 2016 13:01:40 +0000]
Upgrade to Thread::Semaphore 2.13

2 weeks agoIncrease $Filter::Simple::VERSION to 0.93
Father Chrysostomos [Fri, 26 Aug 2016 13:37:05 +0000]
Increase $Filter::Simple::VERSION to 0.93

2 weeks ago[perl #107726] Filter::Simple: ‘use’ and then ‘no’
Ricardo SIGNES [Fri, 26 Aug 2016 13:36:09 +0000]
[perl #107726] Filter::Simple: ‘use’ and then ‘no’

Filter::Simple was erroneously signalling eof if it encountered a
‘no MyFilter’ right after ‘use’:

use MyFilter;
no MyFilter;

In this case it should simply not filter anything.

The reason for the bug was that the ‘while ($status = filter_read())’
loop in Filter::Simple::gen_filter_import was not incrementing $count
(a variable used basically as a boolean to remember whether we are
still getting input from the file) when finding the terminator (no
MyFilter).  So it would conclude after the loop that the file had come
to an end and simply return 0.

[Commit message written by the committer.]

2 weeks ago[perl #107726] Test for Filter::Simple and ‘no’
Father Chrysostomos [Fri, 26 Aug 2016 13:20:05 +0000]
[perl #107726] Test for Filter::Simple and ‘no’

use MyFilter;
no MyFilter;

does not work.  A fix is forthcoming.

2 weeks agoperlinterp.pod: Expand the op tree section
Father Chrysostomos [Thu, 11 Aug 2016 06:43:34 +0000]
perlinterp.pod: Expand the op tree section

based on things that came up in the thread starting at
<20160808225325.79944d95@shy.leonerd.org.uk>.

2 weeks agoRemove VMS-specific hacks from showlex.t.
Craig A. Berry [Fri, 26 Aug 2016 02:09:01 +0000]
Remove VMS-specific hacks from showlex.t.

I added this 15 years ago in d0c1fe9a9931bc27, but it isn't
necessary for any VMS version now supported and it has recently
caused the test to start failing under the test suite but not
when run individually.  So just get rid of it.

2 weeks agolocale.c: Use my_strlcat()
Karl Williamson [Tue, 23 Aug 2016 19:32:05 +0000]
locale.c: Use my_strlcat()

strcat() is safe in this context, but some compilers were optimizing
this to strcpy() causing a porting test to fail that looks for unsafe
code.  Rather than fighting this, just use my_strlcat().  The code is
rarely executed.  But at the same time, I used the return value of that
function to know where to start the next cat in the next loop iteration
without having to have the cat code search for the trailing NUL.

2 weeks agoperlapi: Document returns from my_strlcat, my_strlcpy
Karl Williamson [Tue, 23 Aug 2016 19:30:45 +0000]
perlapi: Document returns from my_strlcat, my_strlcpy

2 weeks agoPATCH: [perl #129072]: podspec typo
Karl Williamson [Thu, 25 Aug 2016 16:23:21 +0000]
PATCH: [perl #129072]: podspec typo

2 weeks agoPerl_deb_stack_all() - handle CXt_SUBST better
David Mitchell [Wed, 24 Aug 2016 15:28:00 +0000]
Perl_deb_stack_all() - handle CXt_SUBST better

RT #129029

There's a loop which skips CXt_SUBST context entries - but it
wasn't checking that the *current* cx is that type, but instead
was always checking the base cx and was effectively a noop

Also fixup a few code comments in that function.

2 weeks agorestore Internals::hv_clear_placeholders for now
Yves Orton [Thu, 25 Aug 2016 10:03:42 +0000]
restore Internals::hv_clear_placeholders for now

2 weeks agotmp fix for Bleadperl breaks Variable-Magic
David Mitchell [Wed, 24 Aug 2016 12:57:56 +0000]
tmp fix for Bleadperl breaks Variable-Magic

RT #128989

Prior to my commit v5.25.3-266-g1d7e644, in the absence of the SVs_RMG
flag, av_fetch() used AvFILL() for -ve keys and AvFILLp() for positive
keys. That commit changed it so they both use AvFILLp. This has broken
Variable::Magic 0.59.

As an interim measure, restore the old behaviour.

2 weeks agoconcise.t: work with PERL_UNICODE=""
David Mitchell [Wed, 24 Aug 2016 12:41:00 +0000]
concise.t: work with PERL_UNICODE=""

Fixup some tests I added recently so that they pass with PERL_UNICODE=""
- which causes extra hints bits to be set in nextstate ops.

2 weeks agore_untuit_start() avoid overshoot with utf8
David Mitchell [Wed, 24 Aug 2016 12:21:04 +0000]
re_untuit_start() avoid overshoot with utf8

RT #129012

re_untuit_start() is run before doing a "proper" regex match, to either
quickly reject a match or to find the earliest position in a string where
the match could occur. Part of its action is to search within the string
for a known substring which forms a part of the pattern.

If that substring is utf8, with multiple bytes per character, then
the calculation of the highest point in the string where its worth
searching for the substring, could overshoot the end of the string.

It's a (mostly) harmless issue, since apart from the issue of reading a
few bytes beyond the end of a string (which might cause a problem if the
string is memory mapped for example), the only concern is that in theory
(although extremely unlikely) a spurious match for a substring could be
found partly beyond the end of the string, resulting in the full RE engine
being called to (correctly) do the match, when otherwise the match could
have been more quickly rejected.

2 weeks agotweaks for Win32 VC vs GCC detection makefile code
Daniel Dragan [Mon, 15 Aug 2016 21:00:18 +0000]
tweaks for Win32 VC vs GCC detection makefile code

-fix issue that CCHOME depends on CCTYPE, which in auto detect mode is
 set after CCHOME so CCHOME uses uninit CCTYPE var
-also fix else vs .ELSE in makefile.mk

2 weeks agopodcheck.t: Show file name in stderr output
Father Chrysostomos [Tue, 23 Aug 2016 13:27:27 +0000]
podcheck.t: Show file name in stderr output

So that one does not have to re-run it by hand to find out which
file failed.

2 weeks agoUpdate that Module-CoreList in Maintainers.pl
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 21:41:55 +0000]
Update that Module-CoreList in Maintainers.pl

2 weeks agoPrepare Module-CoreList for v5.25.5
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 21:18:35 +0000]
Prepare Module-CoreList for v5.25.5

2 weeks agoBump the perl version in various places for v5.25.5
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 21:07:30 +0000]
Bump the perl version in various places for v5.25.5

2 weeks agoNew perldelta
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 21:00:26 +0000]
New perldelta

2 weeks agoUpdate epigraphs for v5.25.4
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 20:52:01 +0000]
Update epigraphs for v5.25.4

2 weeks agoUpdate perlhist v5.25.4
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 18:40:51 +0000]
Update perlhist

2 weeks agoFinalise perldelta
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 18:30:25 +0000]
Finalise perldelta

2 weeks agoUpdate Module::CoreList
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 17:43:02 +0000]
Update Module::CoreList

2 weeks agoUpdate release date in Module::CoreList
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 17:35:26 +0000]
Update release date in Module::CoreList

3 weeks agoperldelta documentation section
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 15:58:31 +0000]
perldelta documentation section

3 weeks agoperldelta updates
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 15:52:44 +0000]
perldelta updates

3 weeks agoUpdate ExtUtils-MakeMaker to CPAN version 7.24
Chris 'BinGOs' Williams [Sat, 20 Aug 2016 12:39:12 +0000]
Update ExtUtils-MakeMaker to CPAN version 7.24

  [DELTA]

7.24  Sat Aug 20 13:22:28 BST 2016

    No changes since 7.23_01

7.23_01 Fri Aug 19 10:02:30 BST 2016

    Test fixes:
    - always use the core serializers when testing in core

3 weeks agopodcheck.t: Send helpful error output to stderr
Father Chrysostomos [Sat, 20 Aug 2016 05:22:21 +0000]
podcheck.t: Send helpful error output to stderr

While we do try to keep stderr clean for tests, that is for *passing*
tests.  If the diagnostic output goes to stdout instead, then nobody
gets to see it for ‘make test’, which means that the script has to
be re-run by itself just to find out what failed.  Since this is a
long-running test, that is quite inconvenient.

Also mention which .t the output is coming from.

3 weeks agoperldelta for #128951 / bf8a9a15
Father Chrysostomos [Sat, 20 Aug 2016 05:10:57 +0000]
perldelta for #128951 / bf8a9a15

3 weeks agoCorrect a perldelta entry
Father Chrysostomos [Sat, 20 Aug 2016 05:08:14 +0000]
Correct a perldelta entry

The termcode variable in scan_const, which was an I32 and susceptible
to truncation, is not used to find the closing delimiter, but only to
check for special uses of delimiters such as in qr'...' and m?...? and
‘<’ which is used internally as the ‘closing delimiter’ for here-docs,
it being one that can never occur for other pyoq operators.

Hence, such strings already worked before, but now they work consis-
tently; \x{100000027} no longer suppresses regexep interpolation,
for instance.

3 weeks agoalways use the core serializers in EUMM for core tests
Karen Etheridge [Thu, 18 Aug 2016 19:47:41 +0000]
always use the core serializers in EUMM for core tests

3 weeks agoregenerate META.* using new CPAN::Meta, and always use the core serializers
Karen Etheridge [Thu, 18 Aug 2016 18:35:11 +0000]
regenerate META.* using new CPAN::Meta, and always use the core serializers

3 weeks agoChanges manually performed for one file.
Karen Etheridge [Fri, 19 Aug 2016 23:24:49 +0000]
Changes manually performed for one file.

cpan/CPAN-Meta/Lib/CPAN/Meta.pm was being very naughty when it came to being
the target of 'git am'.  As committer, I extracted the diff for that file from
the patch supplied by the author and attempted to apply it via 'git apply'.
Still no luck.  Hence, I manually edited the source file.

For: RT #128987

3 weeks agoManually remove file recalcitrant to 'git am'.
James E Keenan [Fri, 19 Aug 2016 23:45:33 +0000]
Manually remove file recalcitrant to 'git am'.

3 weeks agoUpgrade CPAN-Meta from 2.150005 -> 2.150010 (Parse-CPAN-Meta now combined into this...
Karen Etheridge [Thu, 18 Aug 2016 17:14:00 +0000]
Upgrade CPAN-Meta from 2.150005 -> 2.150010 (Parse-CPAN-Meta now combined into this distribution)

    2.150010  2016-08-18 12:10:08-04:00 America/New_York

      [FIXED]

      - the YAML and JSON backend variables are ignored when building/testing the
        perl core itself, where non-core backends are not yet installed.

      [CHANGED]

      - Added "use warnings" to Parse::CPAN::Meta

    2.150009  2016-07-02 21:07:49-04:00 America/New_York (TRIAL RELEASE)

      [FIXED]

      - Fixed used of Encode in Parse::CPAN::Meta::load_json_string
        (Cherry picked from Parse::CPAN::Meta 1.4422)

    2.150008  2016-06-28 17:01:03-04:00 America/New_York (TRIAL RELEASE)

      [ADDED]

      - Merged Parse::CPAN::Meta 1.4420 into this distribution

    2.150007  2016-06-28 03:48:16-04:00 America/New_York (TRIAL RELEASE)

      [FIXED]

      - The cloning routine would raise an error on expected types when it
        previously would stringify.  The old behavior is restored.

    2.150006  2016-06-23 20:05:46-04:00 America/New_York (TRIAL RELEASE)

      [FIXED]

      - CPAN::Meta::Prereqs now fully accepts phases and types starting with 'x_'.
        New 'phases' and 'types_in' interfaces have been added.

      - No longer relies on JSON backend for data structure cloning. This is
        much faster than using JSON::PP.

      [TESTS]

      - The 'extra_mappings' feature for meta merging is now tested and
        documented.

      - During tests, delete new environment variables added by
        Parse::CPAN::Meta 1.4418

      [SPEC]

      - Clarifies acceptable values for booleans

      - Cleaned up text and links of historical specs.

3 weeks agoperldelta: Updates for 5.24
Karl Williamson [Fri, 19 Aug 2016 20:17:42 +0000]
perldelta: Updates for 5.24

This constitutes the changes that khw made that he thinks warrant
mention in perldelta.

3 weeks agoEncode: revert commit that introduces security holes
Karl Williamson [Fri, 19 Aug 2016 20:07:53 +0000]
Encode: revert commit that introduces security holes

This reverts a portion of commit
0f33e03c7e91f63bcd07b5ddfc00101715fa1fc0 which introduces some security
holes in checking for UTF-8 malformations.  In particular, it allows
overflow in non-strict mode, and overlongs in either mode.

See discussion at https://github.com/dankogai/p5-encode/issues/64

This reversion is to make sure that we don't release even a development
version with known security holes.  A final disposition is still to be
determined

3 weeks agoDo not show error message if errno = 0 for flush fail on STDOUT
H.Merijn Brand [Fri, 19 Aug 2016 18:44:14 +0000]
Do not show error message if errno = 0 for flush fail on STDOUT

Somehow (on HP-UX Itanium) the flush fails, but errno is still 0
The lib/warnings.t test then shows

EXPECTED:
Filehandle STDOUT opened only for output at - line 3.
GOT:
Filehandle STDOUT opened only for output at - line 3.
Unable to flush stdout: Error 0

This change suppresses that last line if errno is (still) 0

3 weeks agoav_fetch(): remove check for freed SV
David Mitchell [Fri, 19 Aug 2016 10:39:20 +0000]
av_fetch(): remove check for freed SV

Currently av_fetch() has this extra test:

    if (AvREIFY(av) && SvIS_FREED(AvARRAY(av)[key])) {
        /* eg. @_ could have freed elts */
        AvARRAY(av)[key] = NULL;        /* 1/2 reify */

which basically says that if the array has the reify flag set (typically
only @_ has this) and if the element being retrieved in it has been freed,
then replace it with an undef value instead.

This can be triggered with code like:

    sub f {
        $r = 0;
        my $var = $_[0];
    }

    $r = do { my $x; \$x };
    f($$r);

which leaves $var as undef rather than causing a "panic: attempt to copy
freed scalar".

However, code like

    my ($var) = @_;

*won't* get handled specially, and will still trigger the panic.

It was added in 1996 as a result of this thread:

    From: Andreas Koenig <[email protected]>
    Subject: SEGV with $_[0] and circular references
    Message-Id: <199608131528[email protected]>

That was in the context of getting a SEGV - whereas now we get the
"panic: attempt to copy freed scalar" instead.

It was agreed in this thread that it could be removed:

    http://nntp.perl.org/group/perl.perl5.porters/239082