platform/upstream/perl.git
10 years ago[perl #121676] Fix memory leak in backticks and system
Steve Hay [Tue, 13 May 2014 11:53:10 +0000 (12:53 +0100)]
[perl #121676] Fix memory leak in backticks and system

Introduced by perl #113536. It doesn't actually leak on Windows XP due to
differences in the implementation of GetEnvironmentStringsW() compared to
later OSes, but the missing FreeEnvironmentStrings() was technically wrong
anyway, and does now bite. Thanks for Daniel Dragan for finding this.

10 years agouse skip_all; test.pl plan does not support skip_all
Gisle Aas [Wed, 14 May 2014 02:40:53 +0000 (22:40 -0400)]
use skip_all; test.pl plan does not support skip_all

10 years agoFix broken Makefile on Solaris 10.
Gisle Aas [Sun, 4 May 2014 22:09:23 +0000 (16:09 -0600)]
Fix broken Makefile on Solaris 10.

This uses sed to avoid the problem of the sh not being modern enough.

The commiter moved the sed so it appears in just one place.

10 years agoclarify SvPV documentation
David Golden [Tue, 13 May 2014 18:13:09 +0000 (14:13 -0400)]
clarify SvPV documentation

10 years agoperldelta: trim an absurd amount of trailing whitespace
Ricardo Signes [Tue, 13 May 2014 14:43:15 +0000 (10:43 -0400)]
perldelta: trim an absurd amount of trailing whitespace

10 years agoperldelta: add obituary entry for Diana Rosa
Ricardo Signes [Tue, 13 May 2014 14:29:11 +0000 (10:29 -0400)]
perldelta: add obituary entry for Diana Rosa

10 years ago[perl #121854] use re 'taint' regression
David Mitchell [Tue, 13 May 2014 13:18:06 +0000 (14:18 +0100)]
[perl #121854] use re 'taint' regression

Commit v5.19.8-533-g63baef5 changed the handling of locale-dependent
regexes so that the pattern was considered tainted at compile-time, rather
than determining it each time at run-time whenever it executed a
locale-dependent node. Unfortunately due to the conflating of two flags,
RXf_TAINTED and RXf_TAINTED_SEEN, it had the side effect of permanently
marking a pattern as tainted once it had had a single tainted result.

E.g.

    use re qw(taint);
    use Scalar::Util qw(tainted);
    for ($^X, "abc") {
        /(.*)/ or die;
        print "not " unless tainted("$1"); print "tainted\n";
    };

which from 5.19.9 onwards output:

    tainted
    tainted

but with this commit (and with 5.19.8 and earlier), it now outputs:

    tainted
    not tainted

The RXf_TAINTED flag indicates that the pattern itself is tainted, e.g.

    $r = qr/$tainted_value/

while the RXf_TAINTED_SEEN flag means that the results of the last match
are tainted, e.g.

    use re 'tainted';
    $tainted =~ /(.*)/;
    # $1 is tainted

Pre 63baef5, the code used to look like:

    at run-time:

        turn off RXf_TAINTED_SEEN;
        while (nodes to execute) {
            switch(node) {
            case
                BOUNDL: /* and other locale-specific ops */
                    turn on RXf_TAINTED_SEEN;
                    ...;
            }
        }
        if (tainted || RXf_TAINTED)
            turn on RXf_TAINTED_SEEN;

63baef5 changed it to:

    at compile-time:

        if (pattern has locale ops)
            turn on RXf_TAINTED_SEEN;

    at run-time:

        while (nodes to execute) {
            ...
        }
        if (tainted || RXf_TAINTED)
            turn on RXf_TAINTED_SEEN;

This commit changes it to:

    at compile-time;

        if (pattern has locale ops)
            turn on RXf_TAINTED;

    at run-time:

        turn off RXf_TAINTED_SEEN;
        while (nodes to execute) {
            ...
        }
        if (tainted || RXf_TAINTED)
            turn on RXf_TAINTED_SEEN;

10 years agoCorrect v5.19.12-isms in Module-CoreList
Chris 'BinGOs' Williams [Tue, 13 May 2014 09:35:01 +0000 (10:35 +0100)]
Correct v5.19.12-isms in Module-CoreList

10 years agobump the version to 5.20.0-RC0 to start on the road to release!
Ricardo Signes [Tue, 13 May 2014 02:08:53 +0000 (22:08 -0400)]
bump the version to 5.20.0-RC0 to start on the road to release!

10 years agopatchlevel: call it RC0 until RC1
Ricardo Signes [Tue, 13 May 2014 01:46:24 +0000 (21:46 -0400)]
patchlevel: call it RC0 until RC1

10 years agothere are no longer any problems in perldelta for now
Ricardo Signes [Tue, 13 May 2014 01:43:16 +0000 (21:43 -0400)]
there are no longer any problems in perldelta for now

10 years agoreplace 5.19.12 (never happening) with 5.20.0 in corelist
Ricardo Signes [Tue, 13 May 2014 01:19:32 +0000 (21:19 -0400)]
replace 5.19.12 (never happening) with 5.20.0 in corelist

10 years agoresort win32/pod.mak to please pod_rules.t
Ricardo Signes [Tue, 13 May 2014 01:13:01 +0000 (21:13 -0400)]
resort win32/pod.mak to please pod_rules.t

10 years agoadd known modules from perl520delta
Ricardo Signes [Tue, 13 May 2014 01:08:45 +0000 (21:08 -0400)]
add known modules from perl520delta

10 years agoregenerate META.json
Ricardo Signes [Tue, 13 May 2014 01:03:16 +0000 (21:03 -0400)]
regenerate META.json

10 years agoperldelta: correct busted perldiag links
Ricardo Signes [Tue, 13 May 2014 01:00:11 +0000 (21:00 -0400)]
perldelta: correct busted perldiag links

10 years agobump version to 5.20.0, install 5.20 perldelta
Ricardo Signes [Tue, 13 May 2014 00:42:06 +0000 (20:42 -0400)]
bump version to 5.20.0, install 5.20 perldelta

10 years agoperlsub: Fix too-long verbatim line length
Karl Williamson [Mon, 12 May 2014 19:03:05 +0000 (13:03 -0600)]
perlsub: Fix too-long verbatim line length

This was introduced by commit d3f8a934ef964c0f488e9c692275435d8ea2e291
which reverted earlier fixes, including this pod problem.

10 years agoperlapi: Give more accurate value for needed free space
Karl Williamson [Mon, 12 May 2014 18:42:33 +0000 (12:42 -0600)]
perlapi: Give more accurate value for needed free space

When converting to UTF-8, one usually doesn't need 14 bytes available
space, which is what previously was claimed  It acutally depends on the
value being converted.  This change gives the precise value.

10 years agoensure qw//, q'' and '' report line on a missing terminator
Tony Cook [Tue, 6 May 2014 23:33:03 +0000 (09:33 +1000)]
ensure qw//, q'' and '' report line on a missing terminator

scan_str() only sets PL_multi_end on success, but the qw, q amd '' cases
were calling the COPLINE_SET_FROM_MULTI_END; macro before reporting
failure, overwriting the line used for reporting errors.

For the simplest case, as in the ticket and the tests, PL_multi_end is
zero, so the error is reported without a line number.

10 years agoRevert "[perl #79908] Stop sub inlining from breaking closures"
Ævar Arnfjörð Bjarmason [Wed, 7 May 2014 12:09:40 +0000 (12:09 +0000)]
Revert "[perl #79908] Stop sub inlining from breaking closures"

This reverts commit 137da2b05b4b7628115049f343163bdaf2c30dbb. See the
"How about having a recommended way to add constant subs dynamically?"
thread on perl5-porters, specifically while it sucks that we have this
bug, it's been documented to work this way since 5.003 in "Constant
Functions" in perlsub:

    If the result after optimization and constant folding is either a
    constant or a lexically-scoped scalar which has no other references,
    then it will be used in place of function calls made without C<&>

    -- http://perldoc.perl.org/perlsub.html#Constant-Functions

Since we've had this documented bug for a long time we should introduce
this fix in a deprecation cycle rather than silently slowing down code
that assumes it's going to be optimized by constant folding.

I didn't revert the tests it t/op/sub.t, but turned them into TODO tests
instead.

Conflicts:
t/op/sub.t

10 years agoperlsub: Improve the "Constant Functions" documentation
Ævar Arnfjörð Bjarmason [Sat, 10 May 2014 09:26:14 +0000 (09:26 +0000)]
perlsub: Improve the "Constant Functions" documentation

Ever since perl-5.003_95-19-g5431012 which incorporated this patch:

      Title:  "Improve and update documentation of constant subs"
       From:  Tom Phoenix <rootbeer@teleport.com>
     Msg-ID:  <Pine.GSO.3.96.970331122546.14185C-100000@kelly.teleport.com>
       Date:  Mon, 31 Mar 1997 13:05:54 -0800 (PST)
      Files:  pod/perlsub.pod

We've documented that "BEGIN { my $x = 1; *X = sub () { $x } }" creates
an inlined subroutine, we just weren't doing so very explicitly. Patch
the documentation so that we now have explicit examples for the behavior
mentioned in the first paragraph of the section.

This also adds an explicit mention of the behavior reported as a bug in
[RT #79908], shows the user that you can just use B::Deparse rather than
relying on a warning to see the effects of inlining, and replaces a
contrived way to avoid inlining with just adding a "return".

While writing these docs I found a bug in the warning behavior mentioned
here, which I filed as [RT #121841]

10 years agoMerge branch 'perldelta' into blead
Ricardo Signes [Mon, 12 May 2014 14:56:58 +0000 (10:56 -0400)]
Merge branch 'perldelta' into blead

10 years agoperldelta: mention the possible doom of EBCDIC
Ricardo Signes [Sun, 11 May 2014 02:58:21 +0000 (22:58 -0400)]
perldelta: mention the possible doom of EBCDIC

10 years agoperldelta: standardize on Americanized spellings
Ricardo Signes [Sun, 11 May 2014 02:56:56 +0000 (22:56 -0400)]
perldelta: standardize on Americanized spellings

one document, one standard

10 years agoperldelta: crosslink to 5.18.0 delta for padrange
Ricardo Signes [Sun, 11 May 2014 02:55:49 +0000 (22:55 -0400)]
perldelta: crosslink to 5.18.0 delta for padrange

10 years agoperldelta: nitpicks
SHIRAKATA Kentaro [Wed, 7 May 2014 20:23:06 +0000 (05:23 +0900)]
perldelta: nitpicks

10 years agoList::Gather now has a patch upstream
Tony Cook [Thu, 8 May 2014 01:30:51 +0000 (11:30 +1000)]
List::Gather now has a patch upstream

10 years agoperl5200delta: Correct which gcc versions we add -fwrapv for
Dagfinn Ilmari Mannsåker [Wed, 7 May 2014 23:17:09 +0000 (19:17 -0400)]
perl5200delta: Correct which gcc versions we add -fwrapv for

10 years agoperldelta: Data::Clone 0.004 works correctly on blead
Tom Hukins [Wed, 7 May 2014 23:15:54 +0000 (19:15 -0400)]
perldelta: Data::Clone 0.004 works correctly on blead

10 years ago[perl #121771] this new diagnostic was removed in 2e6f7c2a54
Tony Cook [Wed, 7 May 2014 01:19:17 +0000 (11:19 +1000)]
[perl #121771] this new diagnostic was removed in 2e6f7c2a54

10 years agoperldelta for 9625867354
Tony Cook [Wed, 7 May 2014 00:44:21 +0000 (10:44 +1000)]
perldelta for 9625867354

10 years agoremove a duplicate paragraph
SHIRAKATA Kentaro [Tue, 6 May 2014 01:53:10 +0000 (21:53 -0400)]
remove a duplicate paragraph

10 years agomerge paragraphs about Intel C++ Compiler
SHIRAKATA Kentaro [Sat, 3 May 2014 20:27:56 +0000 (05:27 +0900)]
merge paragraphs about Intel C++ Compiler

10 years agonitpicks
SHIRAKATA Kentaro [Sun, 27 Apr 2014 20:10:09 +0000 (05:10 +0900)]
nitpicks

10 years agoperldelta: correct Configure args for COW
Ricardo Signes [Thu, 24 Apr 2014 01:53:23 +0000 (21:53 -0400)]
perldelta: correct Configure args for COW

10 years agoperldelta: remove text duplicated mere lines above
Arthur Axel 'fREW' Schmidt [Tue, 22 Apr 2014 22:43:17 +0000 (17:43 -0500)]
perldelta: remove text duplicated mere lines above

10 years agoperldelta: it will be perl520.dll, not perl519.dll
Arthur Axel 'fREW' Schmidt [Tue, 22 Apr 2014 22:42:51 +0000 (17:42 -0500)]
perldelta: it will be perl520.dll, not perl519.dll

10 years agoperldelta: better tense for mentioning an old version
Arthur Axel 'fREW' Schmidt [Tue, 22 Apr 2014 22:42:14 +0000 (17:42 -0500)]
perldelta: better tense for mentioning an old version

10 years agoperldelta: mark subroutine signatures as experimental
Arthur Axel 'fREW' Schmidt [Tue, 22 Apr 2014 22:41:55 +0000 (17:41 -0500)]
perldelta: mark subroutine signatures as experimental

10 years agokhw perl52000 changes
Karl Williamson [Wed, 23 Apr 2014 01:30:54 +0000 (19:30 -0600)]
khw perl52000 changes

10 years agoperldelta: remove some XXX todo text
Ricardo Signes [Tue, 22 Apr 2014 14:23:09 +0000 (10:23 -0400)]
perldelta: remove some XXX todo text

10 years agoperldelta: group regexp fixes
Ricardo Signes [Tue, 22 Apr 2014 14:20:59 +0000 (10:20 -0400)]
perldelta: group regexp fixes

10 years agoperldelta: group lexical subroutine fixes
Ricardo Signes [Tue, 22 Apr 2014 14:14:20 +0000 (10:14 -0400)]
perldelta: group lexical subroutine fixes

10 years agoperldelta: group debugger fixes
Ricardo Signes [Tue, 22 Apr 2014 14:12:56 +0000 (10:12 -0400)]
perldelta: group debugger fixes

10 years agoremove notice of changes entirely internal to 5.19.x
Ricardo Signes [Mon, 21 Apr 2014 23:12:50 +0000 (19:12 -0400)]
remove notice of changes entirely internal to 5.19.x

10 years agoincorporate perl51911delta into perl5200delta
Ricardo Signes [Mon, 21 Apr 2014 22:49:07 +0000 (18:49 -0400)]
incorporate perl51911delta into perl5200delta

10 years agoperldelta: edit up through but not including Selected Bug Fixes
Ricardo Signes [Tue, 15 Apr 2014 23:09:40 +0000 (19:09 -0400)]
perldelta: edit up through but not including Selected Bug Fixes

10 years agofirst pass editing up through "Configuration and Compilation"
Ricardo Signes [Fri, 11 Apr 2014 23:10:54 +0000 (19:10 -0400)]
first pass editing up through "Configuration and Compilation"

10 years agoreorder "incompatible changes" section
Ricardo Signes [Fri, 11 Apr 2014 22:40:00 +0000 (18:40 -0400)]
reorder "incompatible changes" section

10 years agoreorder "core enhancements" section
Ricardo Signes [Fri, 11 Apr 2014 22:36:11 +0000 (18:36 -0400)]
reorder "core enhancements" section

10 years agoincorporate perl51910delta into perl5200delta
Ricardo Signes [Fri, 11 Apr 2014 22:28:25 +0000 (18:28 -0400)]
incorporate perl51910delta into perl5200delta

10 years agoincorporate perl5199delta into perl5200delta
Ricardo Signes [Fri, 11 Apr 2014 22:20:31 +0000 (18:20 -0400)]
incorporate perl5199delta into perl5200delta

10 years agoincorporate perl5198delta into perl5200delta
Ricardo Signes [Fri, 11 Apr 2014 22:10:21 +0000 (18:10 -0400)]
incorporate perl5198delta into perl5200delta

10 years agoincorporate perl5197delta into perl5200delta
Ricardo Signes [Fri, 11 Apr 2014 22:03:42 +0000 (18:03 -0400)]
incorporate perl5197delta into perl5200delta

10 years agoincorporate perl5196delta into perl5200delta
Ricardo Signes [Fri, 11 Apr 2014 21:57:16 +0000 (17:57 -0400)]
incorporate perl5196delta into perl5200delta

10 years agoincorporate perl5195delta into perl5200delta
Ricardo Signes [Fri, 11 Apr 2014 21:49:57 +0000 (17:49 -0400)]
incorporate perl5195delta into perl5200delta

10 years agoincorporate perl5194delta into perl5200delta
Ricardo Signes [Fri, 11 Apr 2014 21:44:11 +0000 (17:44 -0400)]
incorporate perl5194delta into perl5200delta

10 years agoincorporate perl5193delta into perl5200delta
Ricardo Signes [Wed, 9 Apr 2014 22:48:59 +0000 (18:48 -0400)]
incorporate perl5193delta into perl5200delta

10 years agoincorporate perl5192delta into perl5200delta
Ricardo Signes [Wed, 9 Apr 2014 22:41:24 +0000 (18:41 -0400)]
incorporate perl5192delta into perl5200delta

10 years agoincorporate perl5191delta into perl5200delta
Ricardo Signes [Wed, 9 Apr 2014 22:28:08 +0000 (18:28 -0400)]
incorporate perl5191delta into perl5200delta

10 years agoincorporate perl5190delta into perl5200delta
Ricardo Signes [Wed, 9 Apr 2014 22:20:03 +0000 (18:20 -0400)]
incorporate perl5190delta into perl5200delta

10 years agosv.c: fix closing comment
David Mitchell [Mon, 12 May 2014 09:16:49 +0000 (10:16 +0100)]
sv.c: fix closing comment

replace /* with */

it didn't matter because it was immediately followed by another comment

10 years agodocument sv_gets() internals
Yves Orton [Sun, 11 May 2014 22:35:19 +0000 (00:35 +0200)]
document sv_gets() internals

sv_gets() contains some very dense code. while trying to rewrite I
learned a lot about it worked, and Nicholas asked me to update
the comments. So here they are. Hope this saves someone some heartache
trying to understand this code.

10 years agoImplement "max waste" thresholds to avoid problems with COW and deliberately overallo...
Yves Orton [Sun, 11 May 2014 10:37:33 +0000 (12:37 +0200)]
Implement "max waste" thresholds to avoid problems with COW and deliberately overallocated pvs

COW does not play nicely with "preallocate" algorithms.

More specifically code like sv_gets() wants to preallocate a large
buffer into $_ for performance reasons.

Prior to COW this was just fine. When someone assigned $_ to a
less volatile variable only the used portion of the buffer was copied,
and the extended buffer would be reused by sv_gets() and all was well.

With COW however this process is foiled. The preallocated buffer
get shared, and then when $_ is updated the buffer is dropped from $_,
leaving the other SV holding ownership of the overallocated buffer,
and causing sv_gets() to allocate a new buffer entirely. This process
would then repeat consuming time and lots of memory.

This patch introduces a "wastage" check to COW. When decided if we
should COW a string we look at the ratio and difference of SvCUR(sv)
and SvLEN(sv), which represent the "actual string length" and the
"allocated string length". When the difference exceeds a hard threshold,
or when the ration exceeds a designated factor then we do not COW.

This means that strings with large overallocations are not COWed.
Exactly how this works out in practice, where SvGROW() *always*
overallocates, is an open question.

See: https://rt.perl.org/Ticket/Display.html?id=121796

This patch also slightly tweaks SvGROW() not to do roundup on the first
allocation of the pv. Odds are good that the initial request realy does
want exactly what they expected. (SvGROW contrary to what the name
suggests is used for bother *extended* the size of a pv, and
initializing it the first time.)

10 years ago[perl #121505] include -fwrapv by default for GCC 4.3 and later
Tony Cook [Mon, 5 May 2014 00:22:25 +0000 (10:22 +1000)]
[perl #121505] include -fwrapv by default for GCC 4.3 and later

10 years agoperlre: Update obsolete example
Karl Williamson [Fri, 9 May 2014 00:18:42 +0000 (18:18 -0600)]
perlre: Update obsolete example

/foo{4,3}/ now emits a message, contrary to what the pod claims.  Use a
different example that doesn't emit a message

10 years agoRevert "Upgrade Devel::PPPort from 3.21 to 3.22"
Matthew Horsfall (alh) [Thu, 8 May 2014 12:49:36 +0000 (08:49 -0400)]
Revert "Upgrade Devel::PPPort from 3.21 to 3.22"

This reverts commit 8e5dcc37de4ab79d8ec6f30798947ae97355ff2a, since
the SvREFCNT_dec_NN is bad (leaks).

10 years agoFix Encode 2.60 with g++
David Mitchell [Thu, 8 May 2014 12:30:16 +0000 (13:30 +0100)]
Fix Encode 2.60 with g++

The recently added Encode 2.60 won't compile with g++, due to assigning
a const char * const pointer to a char* struct field.

The intent of the code itself is a bit unclear, but it appears to be
to set SvPVX as a read-only alias of a const string, using the SvLEN()=0
trick to avoid it being freed.

Fix the g++ builds by casting away the constness, and add some asserts and
comments to make it less unclear what's going on.

10 years agore-apply: Upgrade to Encode-2.60
Steve Hay [Tue, 6 May 2014 19:40:56 +0000 (20:40 +0100)]
re-apply: Upgrade to Encode-2.60

Commit dc396cc293 was reverted by 547245703 due to issues under g++.
This commit re-applies the original commit; the next commit will fix those
issues.

-----

This upgrade includes the blead customizations from 080a704606 and
9e9002efd1 (amongst other changes) so that Perl 5.20.0 can ship with an
official CPAN release of Encode.

10 years agoFix remaining too-long verbatim lines in perlxstut.pod
Karl Williamson [Wed, 7 May 2014 20:32:43 +0000 (14:32 -0600)]
Fix remaining too-long verbatim lines in perlxstut.pod

10 years agoBring a few lines in perlxstut.pod under 80 cols
kafka [Wed, 7 May 2014 13:38:34 +0000 (15:38 +0200)]
Bring a few lines in perlxstut.pod under 80 cols

10 years agoPATCH: [perl #121778]:BBC KAMIPO/autobox-String-Inflector
Karl Williamson [Fri, 2 May 2014 03:04:19 +0000 (21:04 -0600)]
PATCH: [perl #121778]:BBC KAMIPO/autobox-String-Inflector

When I wrote commit 645de4ceb9a7cbcff21ef7df3a5f5eb36259571e,
and its predecessor commit, I wrongly thought that this code used a
count of bytes rather than characters.  I no longer remember why.
My previous experience was that a lot of code in the regex system talked
about characters in the documentation, when in fact bytes were what was
really meant.  The comments had never been properly updated to account
for UTF-8

But this code in fact is supposed to use a character count, and this
commit changes it to do so.

10 years agoRevert "Upgrade to Encode-2.60"
Karl Williamson [Wed, 7 May 2014 17:48:04 +0000 (11:48 -0600)]
Revert "Upgrade to Encode-2.60"

This reverts commit dc396cc29397b262d3cc1473ade4229c84e82ca3.

10 years ago[perl #121771] Revert the new warning for ++ on non- /\A[a-zA-Z]+[0-9]*\z/
Tony Cook [Mon, 5 May 2014 01:58:56 +0000 (11:58 +1000)]
[perl #121771] Revert the new warning for ++ on non- /\A[a-zA-Z]+[0-9]*\z/

This failed as in it was producing:

  Argument "123abc" treated as 0 in increment (++) at -e line 1.

when the user incremented that value (which is a lie).

This reverts commits 8140a7a801e37d147db0e5a8d89551d9d77666e0 and
2cd5095e471e1d84dc9e0b79900ebfd66aabc909.

I expect to revert this commit, and add fixes, after 5.20 is released.

Conflicts:
pod/perldiag.pod

10 years agoUpgrade to Encode-2.60
Steve Hay [Tue, 6 May 2014 19:40:56 +0000 (20:40 +0100)]
Upgrade to Encode-2.60

This upgrade includes the blead customizations from 080a704606 and
9e9002efd1 (amongst other changes) so that Perl 5.20.0 can ship with an
official CPAN release of Encode.

10 years agoFix op/taint.t failure on Windows with 64-bit gcc-4.8.0 from MinGW-w64
Steve Hay [Tue, 6 May 2014 19:16:05 +0000 (20:16 +0100)]
Fix op/taint.t failure on Windows with 64-bit gcc-4.8.0 from MinGW-w64

MinGW-w64's 64-bit gcc now uses the SEH C++ exception model rather than
SJLJ or Dwarf2 (see http://mingw-w64.sourceforge.net/download.php).  For
such gccs, op/taint.t will need libgcc_s_seh-1.dll rather than
libgcc_s_sjlj-1.dll or libgcc_s_dw2-1.dll.  Fixes perl #121699.

Likewise, libwinpthread-1.dll is necessary if gcc was compiled with POSIX
threading and linked with the libwinpthread library, which is the case for
the gcc-4.8.2 toolchain that is likely to be used with the Strawberry Perl
5.20.x series.  Thanks to kmx for this.

10 years agoRemoved two other ghost modules from Module::CoreList
Chris 'BinGOs' Williams [Sun, 4 May 2014 18:39:32 +0000 (19:39 +0100)]
Removed two other ghost modules from Module::CoreList

'XSLoader::XSLoader' and 'Pod::Functions::Functions'

10 years agoArchaeology completed for OS2::* modules
Chris 'BinGOs' Williams [Sun, 4 May 2014 18:26:25 +0000 (19:26 +0100)]
Archaeology completed for OS2::* modules

10 years agoperlpolicy: We generally deprecate for 2 major releases
Karl Williamson [Mon, 21 Apr 2014 16:21:31 +0000 (10:21 -0600)]
perlpolicy: We generally deprecate for 2 major releases

Update perlpolicy to reflect the current policy,

10 years agoReinstate OS2::* modules to Module::CoreList
Chris 'BinGOs' Williams [Sat, 3 May 2014 21:28:00 +0000 (22:28 +0100)]
Reinstate OS2::* modules to Module::CoreList

There is yet some archaeology to be done to find with which
releases the individual module versions increased.

10 years agoMake corelist.pl find OS2 modules as well
Chris 'BinGOs' Williams [Sat, 3 May 2014 18:09:24 +0000 (19:09 +0100)]
Make corelist.pl find OS2 modules as well

10 years agoFix Windows build with MinGW-w64's gcc-4.8.0
Steve Hay [Fri, 2 May 2014 16:34:40 +0000 (17:34 +0100)]
Fix Windows build with MinGW-w64's gcc-4.8.0

The use of #defines like this:

#define ERROR_IPSEC_IKE_PROCESS_ERR_ID __MSABI_LONG(13834)
#define __MSABI_LONG(x)  x ## l

in new MinGW-w64 header files trips up Errno_pm.PL, causing hundreds of
warnings like this:

Bareword found where operator expected at (eval 22) line 1, near "13834l"
        (Missing operator before l?)

and hundreds of error values to go missing from Errno.pm.

This patch, from perl #121773, fixes that.

10 years agoSpecial case PathTools in corelist.pl too
Chris 'BinGOs' Williams [Sat, 3 May 2014 11:27:16 +0000 (12:27 +0100)]
Special case PathTools in corelist.pl too

10 years agoRemove PathTools::Cwd entries from Module::CoreList
Chris 'BinGOs' Williams [Sat, 3 May 2014 11:18:23 +0000 (12:18 +0100)]
Remove PathTools::Cwd entries from Module::CoreList

10 years agovec(): downgrade before accessing string buffer
David Mitchell [Fri, 2 May 2014 12:51:00 +0000 (13:51 +0100)]
vec(): downgrade before accessing string buffer

This code:

  #!perl -l
  $x = substr "\x{100}\xff\xfe", 1;
  print vec($x, 0, 8);
  print vec($x, 0, 8);

In 5.18 and earlier prints

  255
  255

With blead it prints:

  195
  255

This is due to the fact that it does SvPV() first to get the string buffer,
then calls sv_utf8_downgrade(). With COW, the PVX of the SV may no longer
equal the value earlier returned by SvPV(), but vec() continues to use the
old pointer. This bug has always been present, but COW made it more
noticeable.

The fix is to just redo the SvPV() after a downgrade.

10 years agoResolve [perl #121770] Win32 did indeed ship with v5.8.3
Chris 'BinGOs' Williams [Wed, 30 Apr 2014 19:23:04 +0000 (20:23 +0100)]
Resolve [perl #121770] Win32 did indeed ship with v5.8.3

10 years agoResolve [perl #121769] with regards consistency of trailing zeroes.
Chris 'BinGOs' Williams [Wed, 30 Apr 2014 18:53:30 +0000 (19:53 +0100)]
Resolve [perl #121769] with regards consistency of trailing zeroes.

Aliases were only being generated for perls >= 5.010, changed this
to >= 5.006

Found another place in corelist that required fixing for the doubling
problem.

10 years agoFix for Coverity perl5 CID 29034: Out-of-bounds read (OVERRUN) overrun-local: Overrun...
Jarkko Hietaniemi [Tue, 22 Apr 2014 01:43:12 +0000 (21:43 -0400)]
Fix for Coverity perl5 CID 29034: Out-of-bounds read (OVERRUN) overrun-local: Overrunning array PL_reg_intflags name of 14 8-byte elements at element index 31 (byte offset 248) using index bit (which evaluates to 31).

Needed compile-time limits for the PL_reg_intflags_name so that the
bit loop doesn't waltz off past the array.  Could not use C_ARRAY_LENGTH
because the size of name array is not visible during compile time
(only const char*[] is), so modified regcomp.pl to generate the size,
made it visible only under DEBUGGING.  Did extflags analogously
even though its size currently exactly 32 already.  The sizeof(flags)*8
is extra paranoia for ILP64.

10 years agoFix for Coverity perl5 CID 29060: Pointer to local outside scope (RETURN_LOCAL) use_i...
Jarkko Hietaniemi [Mon, 21 Apr 2014 22:54:54 +0000 (18:54 -0400)]
Fix for Coverity perl5 CID 29060: Pointer to local outside scope (RETURN_LOCAL) use_invalid: Using mode, which points to an out-of-scope variable tmode.

Duplicate the PerlIOBase_pushed call so that the tmode is in scope.

10 years agoFix for Coverity perl5 CID 29032: Out-of-bounds read (OVERRUN) overrun-local: Overrun...
Jarkko Hietaniemi [Mon, 21 Apr 2014 22:15:58 +0000 (18:15 -0400)]
Fix for Coverity perl5 CID 29032: Out-of-bounds read (OVERRUN) overrun-local: Overrunning array anyofs of 34 8-byte elements at element index 34 (byte offset 272) using index index (which evaluates to 34).

Off-by-one error: because the test "index > number of elements"
should have used ">=", the anyofs[] could have been accessed one
past the end.  Use the C_ARRAY_LENGTH since we have it.
I think regprop is only used by -Mre=debug.

10 years agoUpdate ExtUtils-MakeMaker to CPAN version 6.98
Chris 'BinGOs' Williams [Tue, 29 Apr 2014 23:26:44 +0000 (00:26 +0100)]
Update ExtUtils-MakeMaker to CPAN version 6.98

  [DELTA]

6.98 Tue Apr 29 21:27:59 BST 2014

    No changes from 6.97_02

6.97_02 Mon Apr 28 11:44:56 BST 2014
    Dist fixes:
    * Removed redundant File::Spec check from Makefile.PL

6.97_01 Thu Apr 24 14:23:02 BST 2014
    Bug fixes:
    * Resolve another regression related to not recursing into distdirs

6.96 Fri Apr 11 21:54:25 BST 2014

    No changes from 6.95_02

6.95_02 Mon Apr  7 15:26:20 BST 2014
    Bug fixes:
    * Work-around v5.10.1 for the MIN_PERL_VERSION v-string handling

6.95_01 Wed Apr  2 21:49:22 BST 2014
    Bug fixes:
    * Make MIN_PERL_VERSION handle v-strings properly

10 years agomore Fix Windows build (of Encode) with VC++ 6.0
David Mitchell [Tue, 29 Apr 2014 11:53:37 +0000 (12:53 +0100)]
more Fix Windows build (of Encode) with VC++ 6.0

The previous commit (080a7046069084) broke g++ builds.
This commit, based on a suggestion by Jan, changes the test of whether
we're "in perl" from being the def'ness of U8 to being the def'ness of
H_Perl; and removes all the '#define U8 U8's that were formerly used to
signal this state.

10 years agoFix for Coverity perl5 CID 45366: Use after free (USE_AFTER_FREE) pass_freed_arg...
Jarkko Hietaniemi [Fri, 25 Apr 2014 00:33:16 +0000 (20:33 -0400)]
Fix for Coverity perl5 CID 45366: Use after free (USE_AFTER_FREE) pass_freed_arg: Passing freed pointer save_input_locale as an argument to PerlIO_printf.

Printfing save-pvs after freeing them.

10 years agoFix Windows build (of Encode) with VC++ 6.0
Steve Hay [Mon, 28 Apr 2014 17:16:26 +0000 (18:16 +0100)]
Fix Windows build (of Encode) with VC++ 6.0

Patch originally created by Daniel Dragan on perl #121554, and modified by
Dan Kogai to save introducing a warning on redefinition.

Sent upstream as cpan #95130.

10 years agoPseudo-fork dups arg array on argless calls
David Mitchell [Mon, 28 Apr 2014 10:50:20 +0000 (11:50 +0100)]
Pseudo-fork dups arg array on argless calls

RT #121721.

A subroutine call like &foo; pushes a SUB context with the savearray field
unassigned, and with CxHASARGS() false. Most of the core knows not to use
this field without CxHASARGS() being true: except for Perl_cx_dup(),
which was still trying to dup it. This could lead to SEGVs on a fresh CX
stack, or possibly duping some other sub's @_ on a reused stack entry.

The fix is simple; don't dup this field unless CxHASARGS() is set.
Note that a similar test is already in place for the argarray field.

10 years agoFixed regressions in corelist with display of 0 ending perls
Chris 'BinGOs' Williams [Sun, 27 Apr 2014 11:15:30 +0000 (12:15 +0100)]
Fixed regressions in corelist with display of 0 ending perls

v5.x.10 perls were displaying twice in -a output

Both v5.x.0 and v5.x.10 perls were displaying twice in -v output

10 years agomy_plvarsp nulling and PERL_GLOBAL_STRUCT_PRIVATE
David Mitchell [Wed, 23 Apr 2014 15:48:15 +0000 (16:48 +0100)]
my_plvarsp nulling and PERL_GLOBAL_STRUCT_PRIVATE

With PERL_GLOBAL_STRUCT_PRIVATE, all "global" vars are in a malloc()d
structure pointed to by the static var my_plvarsp. At exit, this struct is
freed and my_plvarsp is set to NULL.

My previous commit c1181d2b skipped the free if PL_veto_cleanup is set
(as it would be if other threads are still running for example), but
still left my_plvarsp getting set to NULL. Thus other threads could still
deref a null pointer if they accessed a "global" var just as the main
thread was exiting.

This commit makes the veto skip the NULLing in addition to the freeing.

This commit is quite late into the code freeze, but it's a follow-up to the
earlier attempt to get smokes not to fail, and all the affected code is
within #ifdef PERL_GLOBAL_STRUCT_PRIVATE, so it shouldn't affect
mainstream builds at all. (Famous last words.)

10 years agoperlapi: Clarify NUL handling for 2 fcns; nits
Karl Williamson [Wed, 23 Apr 2014 19:51:48 +0000 (13:51 -0600)]
perlapi: Clarify NUL handling for 2 fcns; nits

The string input to these two functions must be NUL terminated when the
length parameter is 0.

10 years agoRMG - Note that the release announcement's web link will be in the email headers
Steve Hay [Wed, 23 Apr 2014 19:10:43 +0000 (20:10 +0100)]
RMG - Note that the release announcement's web link will be in the email headers

Thanks to Smylers <Smylers@stripey.com> for this revelation!
http://nntp.perl.org/group/perl.perl5.porters/214662