This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Fri, 4 Mar 2016 17:12:43 +0000 (10:12 -0700)]
locale.c: Avoid a leak
This reorders things to allow a free to be done. The cause was spotted
by Tony Cook.
Karl Williamson [Fri, 4 Mar 2016 16:34:40 +0000 (09:34 -0700)]
POSIX.xs: Avoid a leak in setlocale()
Tony Cook suggested this fix.
Karl Williamson [Mon, 22 Feb 2016 18:27:50 +0000 (11:27 -0700)]
TODO or skip certain failing locale tests on cygwin
This is a known problem which cygwin has fixed in 2.5
Tony Cook tested this and found and fixed several bugs in it before this
final version was made.
Karl Williamson [Thu, 3 Mar 2016 21:21:05 +0000 (14:21 -0700)]
regcomp.c: Revise, add comments, white-space changes
Karl Williamson [Thu, 3 Mar 2016 16:56:41 +0000 (09:56 -0700)]
regcomp.c: Avoid a memory leak
The croak is using heap storage for an argument. Making that
SAVEFREEPV() will make sure it gets freed.
Karl Williamson [Thu, 3 Mar 2016 16:40:55 +0000 (09:40 -0700)]
regcomp.c: White-space only
Outdent and reflow comments because the previous commit removed a
surrounding block.
Karl Williamson [Thu, 3 Mar 2016 05:10:58 +0000 (22:10 -0700)]
Reinstate "PATCH: {perl #127582] Over eager warning for /[.foo.]/""
This reverts commit
ab9a4aa72166b26d6c3556107c19ba08ee956a88 which
itself reverted commit
a9149dfda17b511d34bb2af869948b677be52fbc, thus
reinstating the original. But this new commit also adds a check to
avoid going off the end of a buffer, the absence of which was the cause
for the failure of the original commit with address sanitizer.
Karl Williamson [Thu, 3 Mar 2016 16:14:13 +0000 (09:14 -0700)]
locale.c: Silence HP-UX compiler warning
Cast this flag value to a bool, which is what we want anyway here.
Jarkko Hietaniemi [Thu, 3 Mar 2016 14:01:05 +0000 (09:01 -0500)]
Warn of the "else syndrome".
Not that anyone ever reads perlport.
Jarkko Hietaniemi [Thu, 3 Mar 2016 13:57:32 +0000 (08:57 -0500)]
Clarify what AmigaOS version was broken by 5.8.0
Jarkko Hietaniemi [Thu, 3 Mar 2016 01:11:23 +0000 (20:11 -0500)]
perl5db.pl version bump
Jarkko Hietaniemi [Wed, 2 Mar 2016 23:49:18 +0000 (18:49 -0500)]
Defaulting to VMS is probably not right.
Andy Broad [Wed, 2 Mar 2016 23:45:52 +0000 (18:45 -0500)]
amigaos4: use CONSOLE:, not VMS sys$command
Andy Broad [Wed, 2 Mar 2016 23:43:44 +0000 (18:43 -0500)]
amigaos4: clean up older style / deprecated AmigaOS calls
Tony Cook [Wed, 2 Mar 2016 05:19:43 +0000 (16:19 +1100)]
reduce number of calls to add_cp_to_invlist()
Both S_get_ANYOF_cp_list_for_ssc() and S_put_charclass_bitmap_innards()
have tight loops that iterate over a bitmap and calls add_cp_to_invlist()
for each bit set.
add_cp_to_invlist() is a fairly wrapper around _add_range_to_invlist()
which create a new invlist to hold the range and then calls
_invlist_union() to perform the add. This is moderately expensive.
Instead of indirectly calling _add_range_to_invlist(), where it's
simple to do so, instead look for ranges of bits set in the bitmaps
and call _add_range_to_invlist() directly.
This changed the cachegrind output from running:
./perl -e 'qr/_?[\W_]/;'
from:
==23406== I refs: 1,752,149
==23406== I1 misses: 5,405
==23406== LLi misses: 3,588
==23406== I1 miss rate: 0.30%
==23406== LLi miss rate: 0.20%
==23406==
==23406== D refs: 683,242 (414,061 rd + 269,181 wr)
==23406== D1 misses: 13,370 ( 7,646 rd + 5,724 wr)
==23406== LLd misses: 7,025 ( 3,417 rd + 3,608 wr)
==23406== D1 miss rate: 1.9% ( 1.8% + 2.1% )
==23406== LLd miss rate: 1.0% ( 0.8% + 1.3% )
==23406==
==23406== LL refs: 18,775 ( 13,051 rd + 5,724 wr)
==23406== LL misses: 10,613 ( 7,005 rd + 3,608 wr)
==23406== LL miss rate: 0.4% ( 0.3% + 1.3% )
to:
==25041== I refs: 1,189,412
==25041== I1 misses: 5,218
==25041== LLi misses: 3,598
==25041== I1 miss rate: 0.43%
==25041== LLi miss rate: 0.30%
==25041==
==25041== D refs: 440,339 (283,047 rd + 157,292 wr)
==25041== D1 misses: 11,872 ( 7,257 rd + 4,615 wr)
==25041== LLd misses: 7,024 ( 3,417 rd + 3,607 wr)
==25041== D1 miss rate: 2.6% ( 2.5% + 2.9% )
==25041== LLd miss rate: 1.5% ( 1.2% + 2.2% )
==25041==
==25041== LL refs: 17,090 ( 12,475 rd + 4,615 wr)
==25041== LL misses: 10,622 ( 7,015 rd + 3,607 wr)
==25041== LL miss rate: 0.6% ( 0.4% + 2.2% )
ie. from 1.75 million instructions to 1.19 million instructions.
Karl Williamson [Wed, 2 Mar 2016 17:50:01 +0000 (10:50 -0700)]
PATCH: [perl #127599] Fix regcomp.c assertion
I added this assertion in
cfbef7dc3. It asserts that we have more to
parse. The code in this function is quite complicated, and assumes in a
number of places that there is more to parse. When we don't have more
to parse, 900 lines later, it throws an error. It may be that you can't
get to the places where it assumes there is more to parse if this
assertion is false (I don't remember now from my tedious audit of this
code), but even if so, it is fragile to assume so, given the large
distance to where the error is thrown. So throw the error right away
and avoid any existing or future breakage.
David Mitchell [Wed, 2 Mar 2016 17:29:31 +0000 (17:29 +0000)]
document args of Perl_do_sv_dump()
Jarkko Hietaniemi [Wed, 2 Mar 2016 00:56:04 +0000 (19:56 -0500)]
amigaos4: no sigaction, no si fields
David Mitchell [Wed, 2 Mar 2016 11:23:54 +0000 (11:23 +0000)]
pp_subst(): rename local var
make it clear that is_cow represents the original COW state (which may not
be the current state when checked later), by renaming it to was_cow.
David Mitchell [Wed, 2 Mar 2016 10:25:32 +0000 (10:25 +0000)]
pp_subst: fix typo
David Mitchell [Wed, 2 Mar 2016 10:23:43 +0000 (10:23 +0000)]
use cBOOL() in pp_subst()
Now that we have that macro, use it.
David Mitchell [Wed, 2 Mar 2016 09:16:34 +0000 (09:16 +0000)]
S_regmatch(): remove dead code
The 'sayNO'; follows a croak, so can never be reached.
David Mitchell [Wed, 2 Mar 2016 09:08:48 +0000 (09:08 +0000)]
remove some duplicate /* NOTREACHED */
In regexec.c there were several occurrences of
/* NOTREACHED */
NOT_REACHED; /* NOTREACHED */
where the first line isn't needed.
Karl Williamson [Wed, 2 Mar 2016 05:42:46 +0000 (22:42 -0700)]
Revert "PATCH: {perl #127582] Over eager warning for /[.foo.]/"
This reverts commit
a9149dfda17b511d34bb2af869948b677be52fbc.
This is causing failures in blead under clang, so I'm reverting it until
I can work out why.
Karl Williamson [Wed, 2 Mar 2016 05:41:59 +0000 (22:41 -0700)]
Revert "regcomp.c: White-space only"
This reverts commit
7511771ceb229ce97939f643c6de73c6b1a371be, so that
the next commit can be cleanly reverted
Tony Cook [Wed, 2 Mar 2016 04:52:06 +0000 (15:52 +1100)]
bump $strict::VERSION and $warnings::VERSION
Aristotle Pagaltzis [Wed, 2 Mar 2016 02:30:30 +0000 (03:30 +0100)]
narrow the filename check in strict.pm/warnings.pm
• The code previously assumed that any filename basename besides
`strict.pm` meant that the user mistyped `use strict` (e.g. as
`use Strict`). But that could just mean the file was not loaded
from the filesystem, e.g. due to naïve fatpacking.
This is fixed by adding a guard to check that an unexpected value
really is a mis-capitalised variant of `strict.pm`.
• The code previously insisted on either slash or backslash as the
directory separator, which is not strictly portable (though nobody
noticed in years; apparently nobody has tried to run a recent-ish
on a MacOS Classic or RiscOS system).
This is fixed by switching to \b as a best effort, to avoid going
down the rabbit hole of platform-specific separators.
• The code previously used an `unless` statement, declared lexical
variables inside its block, and used ${\EXPR} to interpolate the
__PACKAGE__ constant into the regexp. Each of these increases the
size of the optree, which is only ever executed once, then sticks
around wasting some hundred(s) bytes in almost every single Perl
program in the world.
This is fixed for warnings.pm by rewriting the code with no use of
any temporary variables and single-quoted strings instead of regexp
literals. In strict.pm, we can do even better by moving the code to
the BEGIN block, since BEGIN CVs are freed after running. (We do not
add one to warnings.pm since BEGIN blocks have a creation cost.)
Karl Williamson [Tue, 1 Mar 2016 22:19:49 +0000 (15:19 -0700)]
regcomp.c: Avoid an empty [] in -Dr output
Karl Williamson [Tue, 1 Mar 2016 18:26:49 +0000 (11:26 -0700)]
regcomp.c: White-space only
Outdent and reflow comments because the previous commit removed a
surrounding block.
Karl Williamson [Tue, 1 Mar 2016 18:03:04 +0000 (11:03 -0700)]
PATCH: {perl #127582] Over eager warning for /[.foo.]/
This fixes the issue by severely restricting what we recognize as the
interior of the [. .] and [= =] constructs, as suggested by Tony Cook.
I find the POSIX documentation very unclear, but it appears to me that
just about anything can be in the interior, and that is how I originally
wrote the code, and which led to this bug. But weird interiors would
only arise with really weird locales and only when the pattern is being
compiled under locale qr//l rules. A portable pattern would use the
restricted interior characters that this commit adopts.
Karl Williamson [Tue, 1 Mar 2016 20:07:45 +0000 (13:07 -0700)]
regexec.c: Fix failure to match problem
This bug has shown up only under EBCDIC so far, but could affect other
code.
Commit
dcf88e3433dcd5bc25811f9769e82d04c61a1d5a fixed a bug in which a
macro parameter needed to be dereferenced. Until then, the failure to
dereference meant some code that turned out to be faulty, was
effectively always skipped. So that commit, while correct in and of
itself, exposed a pre-existing bug.
It was hard for me to believe at first that a change of simply adding a
missing '*' could have broken things this way. But the clue was that
the only characters that were affected were the set of C1 controls, and
only when the target matched string was in UTF-8, and only on EBCDIC
systems. The difference between EBCDIC and ASCII platforms in this
regard is that the C1 controls under UTF-8 are represented by a single
byte on EBCDIC systems, and two bytes on ASCII. The test that adding
the dereference to is looking for characters that are single bytes under
both UTF-8 and not, and hence would give different results on EBCDIC and
ASCII platforms for exactly the set of C1 controls.
The code in question looks up an input code point to see if it is
matched by an ANYOF node, the kind generated for bracketed character
classes. The first N code points are stored in a bit vector. (N is
generally 256, but perl can be compiled to make that larger.) If there
are no complications, the answer can be found directly by just looking
up the code point in the vector. But if there are complications, a
function is called to sort them all out. The macro looks for
complications, and calls the function if needed, but does the lookup
directly if not. One of those complications is that the input needs to
be decoded to its actual code point value if the target is UTF-8 and the
code point isn't a single byte then. After the dereference fix, the
caller of the macro knew correctly that this was a single byte, and so
was calling the macro, But it turns out that the macro, as commented,
was expecting to be called only if the target was not-UTF-8, and so
unconditionally said to the function that it wasn't UTF-8, and so the
function didn't work properly.
The solution is to simply call the function in the macros with the
correct value of whether the target string is UTF-8 or not.
Karl Williamson [Tue, 1 Mar 2016 01:57:18 +0000 (18:57 -0700)]
embed.fnc: Fcn should have been within an #ifdef
Karl Williamson [Tue, 1 Mar 2016 01:39:20 +0000 (18:39 -0700)]
PATCH: [perl #127581] Spurious warning about posix class
Karl Williamson [Sun, 28 Feb 2016 16:53:09 +0000 (09:53 -0700)]
regcomp.c: revise comments, white-space
David Mitchell [Tue, 1 Mar 2016 16:04:36 +0000 (16:04 +0000)]
installman: don't warn about missing pod
Currently it spits out about 80 lines like the following to stderr:
no documentation in lib/Archive/Tar/Constant.pm
no documentation in lib/CPAN/Author.pm
no documentation in lib/CPAN/Bundle.pm
Since this is not actually an error condition, spit to stdout instead,
and only under --verbose.
See http://nntp.perl.org/group/perl.perl5.porters/234436.
Craig A. Berry [Sat, 13 Feb 2016 14:12:01 +0000 (09:12 -0500)]
VMS patch for duplicate env entries
Tony Cook [Wed, 27 Jan 2016 00:52:15 +0000 (11:52 +1100)]
remove duplicate environment variables from environ
If we see duplicate environment variables while iterating over
environ[]:
a) make sure we use the same value in %ENV that getenv() returns.
Previously on a duplicate, %ENV would have the last entry for the name
from environ[], but a typical getenv() would return the first entry.
Rather than assuming all getenv() implementations return the first entry
explicitly call getenv() to ensure they agree.
b) remove duplicate entries from environ
Previously if there was a duplicate definition for a name in environ[]
setting that name in %ENV could result in an unsafe value being passed
to a child process, so ensure environ[] has no duplicates.
CVE-2016-2381
Karl Williamson [Tue, 1 Mar 2016 04:12:59 +0000 (21:12 -0700)]
perldelta: Fix typo
Spotted by Andrew Rodland
Karl Williamson [Tue, 1 Mar 2016 04:12:59 +0000 (21:12 -0700)]
re/regexp_unicode_prop.t: Fix loop statement
This was doing an extra shift, which doesn't matter currently because
there's only one element in the array, but could cause future problems.
Karl Williamson [Tue, 1 Mar 2016 04:12:12 +0000 (21:12 -0700)]
regexp_unicode_prop.t: Clarify comment
Karl Williamson [Mon, 15 Feb 2016 18:25:35 +0000 (11:25 -0700)]
Fix /\p{pkg::User-defined}/i
Prior to this commit, the parsing code got confused if a user-defined
property whose definition was not known at pattern compilation time, was
specified with an explicit package name, under /i.
Tony Cook [Mon, 29 Feb 2016 23:41:46 +0000 (10:41 +1100)]
[perl #127635] s///r with -DPERL_NO_COW attempts to modify source SV
based on work done by bulk88, per his notes below:
I found pp_subst with a -DPERL_NO_COW build on an experimental perl branch
would die in ../dist/SelfLoader/t/03taint.t in this line
"my $file = __FILE__ =~ s/[\w.]+\z/01SelfLoader.t/r;" with a attempt to
modify since sv_force_normal_flags checks for readonlyness. The
-DPERL_NO_COW exclusive logic seems faulty, since the COW branch right
above stores the cow status and doesn't call sv_force_normal_flags until
it actually wants to modify the source SV, and pp_subst wont modify the
source SV if PMf_NONDESTRUCT is on.
So fix the die by only de-COWing if !PMf_NONDESTRUCT. Do not deCOW the
source SV if PMf_NONDESTRUCT. The
"my $file = __FILE__ =~ s/[\w.]+\z/01SelfLoader.t/r;" fatal die can not be
reproduced in blead perl with -DPERL_NO_COW, only in my experimental branch
so I rewrote the test to use a const sub that is folded to a
HEK COW RO SV * instead of the __FILE__ token which is not a HEK COW on
blead perl. The subst.t test only fails if perl is compiled with
-DPERL_NO_COW. To avoid an extra !(rpm->op_pmflags & PMf_NONDESTRUCT) check
on a NO_COW build, restructure the logic so
!(rpm->op_pmflags & PMf_NONDESTRUCT) is tested only once. Filed as
[perl #127635].
Jarkko Hietaniemi [Mon, 29 Feb 2016 13:47:54 +0000 (08:47 -0500)]
Scalar-List-Utils customization bump
Jarkko Hietaniemi [Mon, 29 Feb 2016 13:43:51 +0000 (08:43 -0500)]
Scalar-List-Utils version bump
Jarkko Hietaniemi [Mon, 29 Feb 2016 13:39:02 +0000 (08:39 -0500)]
product() with zero IV crash/hang
CID 104785: Division or modulo by zero (DIVIDE_BY_ZERO)
238. divide_by_zero: In expression 9223372036854775807L / retiv, division by expression retiv which may be zero has undefined behavior.
215 if(!SvNOK(sv) && SvIOK(sv) && (SvIV(sv) < IV_MAX / retiv)) {
Cherry-pick of the changes in
https://rt.cpan.org/Public/Bug/Display.html?id=105415
Jarkko Hietaniemi [Mon, 29 Feb 2016 12:16:59 +0000 (07:16 -0500)]
Socket customization bump
Jarkko Hietaniemi [Mon, 29 Feb 2016 12:15:08 +0000 (07:15 -0500)]
Socket version bump
Jarkko Hietaniemi [Mon, 29 Feb 2016 11:50:58 +0000 (06:50 -0500)]
Check for max length before derefing by length.
Coverity CID 135025 (#1 of 1): Out-of-bounds read (OVERRUN)
29. overrun-local: Overrunning array addr.sun_path of 108 bytes at byte offset 108 using index addr_len (which evaluates to 108).
864 for (addr_len = 0; addr.sun_path[addr_len]
28. incr: Incrementing addr_len. The value of addr_len may now be up to 108.
865 && addr_len < maxlen; addr_len++);
Reported upstream as
https://rt.cpan.org/Ticket/Display.html?id=111707
Daniel Dragan [Mon, 29 Feb 2016 03:44:18 +0000 (22:44 -0500)]
teach makedef.pl an alternate macro for PERL_COPY_ON_WRITE
otherwise a -DPERL_NO_COW perl win32 build fails during linking perl523.dll
with missing Perl_sv_setsv_cow
Lukas Mai [Sun, 28 Feb 2016 22:10:50 +0000 (23:10 +0100)]
perlport: use italics instead of colon in "don't":s (RT #127627)
Dagfinn Ilmari Mannsåker [Mon, 29 Feb 2016 13:55:41 +0000 (13:55 +0000)]
Improve wording of perldelta entry for
ae146f5496e
Alex Vandiver [Mon, 23 Mar 2015 03:44:11 +0000 (23:44 -0400)]
Adjust callsites that use UTF8SKIP without checking UTF
Assuming UTF-8 semantics and advancing character-by-character when 'use
utf8' is not enabled is not as problematic as the inverse. However,
properly UTF8SKIP should only be used when UTF8 semantics are explicitly
asked for.
Change the three occurrences of UTF8SKIP that are not protected by UTF
checks.
Tony Cook [Sun, 28 Feb 2016 22:59:16 +0000 (09:59 +1100)]
perldelta for
ae146f5496e
Daniel Dragan [Sun, 28 Feb 2016 22:52:56 +0000 (09:52 +1100)]
[perl #127584] using Win32 32b gmake with 64b gcc caused wrong archname
Using a 32 bit Win32 gmake, with a GCC that produces 64 bit binaries, made
a perl with PTRSIZE 64 bits, and 64 bit machine code, but archname IDed
that build as "x86" not "x64", which is very wrong. Perl's
win32/GNUMakefile autodetects the bitness of the GCC and sets things up
accordingly. Fixes [perl #127584]. This bug might be a regression
introduced in commit
745dedb9b5 or the GNUMakefile parallel build branch.
Jarkko Hietaniemi [Sun, 28 Feb 2016 22:35:33 +0000 (17:35 -0500)]
Upgrade to IPC-SysV 2.06.
Fixing an oopsie of yours truly from 2.05.
Daniel Dragan [Fri, 26 Feb 2016 20:35:28 +0000 (15:35 -0500)]
static funcs in HiRes.xs
Less indirection on ELF.
Chris 'BinGOs' Williams [Sun, 28 Feb 2016 15:53:56 +0000 (15:53 +0000)]
[perl #127624] corelist: wrong Digest::SHA version in 5.18.4
A bit of sleuthing showed that it was actually version bumped for
the v5.18.3 release.
Also noticed that Config hadn't been updated as well, sorted that
out too.
Karl Williamson [Sat, 27 Feb 2016 22:07:09 +0000 (15:07 -0700)]
regcomp.c: Use less peak memory
This continues the process started in
accb4364d92e26c20e6a538fc04d1af52a8b94e2 of lowering memory use by not
creating unnecessary mortal SVs.
This changes the inversion union and intersection functions to avoid
entirely the creation of new mortals.
Karl Williamson [Sat, 27 Feb 2016 22:05:09 +0000 (15:05 -0700)]
regcomp.c: Modify an assert
This newly-added assert could fail, but hasn't so far. Fix it.
Karl Williamson [Sat, 27 Feb 2016 22:01:43 +0000 (15:01 -0700)]
regcomp.c: Avoid an unnecessary mortal SV
In some paths, an SV was created mortal, and immediately thrown away.
Karl Williamson [Sat, 27 Feb 2016 21:59:47 +0000 (14:59 -0700)]
regcomp.c: Improve free-ing up unused inversion list space
The invlist_trim() function wasn't freeing up space if the new space
needed was small. This now frees up all but the required minimum.
Karl Williamson [Sat, 27 Feb 2016 20:54:51 +0000 (13:54 -0700)]
regcomp.c: Add new static inline convenience function
Karl Williamson [Wed, 24 Feb 2016 17:06:34 +0000 (10:06 -0700)]
regcomp.c: Change variable names, white-space
A future commit will make more sense if these names are changed. This
reindents some code so that it doesn't overflow 79 columns
Karl Williamson [Sat, 27 Feb 2016 19:36:37 +0000 (12:36 -0700)]
regcomp.c: Change name of static function
I found myself using this function, forgetting that it zapped one of the
parameters, so change the name so that can't be forgotten.
Lukas Mai [Sat, 27 Feb 2016 04:17:57 +0000 (05:17 +0100)]
perlfunc overhaul
- remove trailing whitespace
- consistently refer to builtins as C<foo>, not foo() or C<foo()>
- hyperlink each C<foo> builtin to its section in perlfunc
- replace some occurrences of -w with a reference to the warnings pragma
- refer to listy comma as "list concatenation" because that's what it
does
- consistently hyperlink references to external programs (L<touch(1)>),
system calls (L<fork(2)>), and library functions (L<fdopen(3)>)
- hyperlink variables to their section in perlvar
- hyperlink the names of modules/pragmas
- hyperlink names of functions provided by modules (where possible)
- consistently use "pragmas", not "pragmata" (there were only two of
those)
- use the same wording for all conditional builtins / features
- -T and -B are file tests, not switches
- remove "see L</open>" (regarding the ':encoding' layer) from
description of binmode because I don't see why it was there
- refer to variables as C<$foo>, not $foo
- hyperlink some error messages to perldiag
- remove & from subroutine calls
- grammar: write "if X, Y" with a comma and "Y if X" without
- use 'my' in examples when introducing new variables
- 'while (', not 'while('
- don't capitalize the next word after a semicolon
- consistently start error messages (die/warn) with "Can't" (not
"can't", "Cannot", or "cannot")
- replace bareword filehandles by normal variables in examples
- add missing ')'
- fix module names: IPC::SysV::Msg -> IPC::Msg, IPC::SysV::Semaphore ->
IPC::Semaphore
- 'open': replace note about binmode with equivalent paragraph from
'binmode' (the one in 'open' claimed unix systems don't need binmode,
which is not true with encodings)
- 'open': delete overly clever example of generating filehandle names in
a recursive function (this is a non-issue with lexical filehandles)
- 'open': instead of running 'perl -V' and looking for the useperlio
line, you can just run 'perl -V:useperlio'
- 'open': mention shell feature of 'yourscript.pl <( other command )',
which makes the only remaining use of 2-arg open redundant
- 'open': sysopen uses different modes than open; they're not "subtly
different" and there's no "may" about it
- 'open': use $fh->autoflush(1) instead of select/$| dance (especially
since the example already loads IO::Handle for no reason)
- 'printf': remove garbled text ("Look for this throught pod")
- change "use locale 'not_characters'" to the correct "use locale
':not_characters'"
- (hopefully) fix inconsistent use of "real filehandle"; use "bareword
filehandle" instead to distinguish from scalar variables / globrefs
- ":encoding" is a layer, not a pragma
- 'readline': actually use readline in examples
- ?...? is no longer valid; use m?...? instead
- 'sort': whether the algorithm is stable has no effect on runtime
complexity, so "That algorithm was not stable, so I<could> go
quadratic" is nonsense
- 'sort': declaring $a/$b as lexicals is an error regardless of strict
- 'sysopen': as far as I can tell the note about depending on fdopen()
is only true for non-PerlIO builds
- 'use': add an example of what 'use Module VERSION' expands to
- add 'select FILEHANDLE' to filehandle related functions
Also touch ext/Pod-Functions/Functions_pm.PL to make it parse
L<C<foo>|...> in the overview paragraphs.
And teach t/porting/podcheck.t about a ton of man pages and some
external modules.
Karl Williamson [Fri, 26 Feb 2016 23:41:11 +0000 (16:41 -0700)]
regcomp.c: Add missing 'STATIC'
Karl Williamson [Fri, 26 Feb 2016 20:57:10 +0000 (13:57 -0700)]
Fix regex failures on big-endian systems
Commit
accb4364d92e26c20e6a538fc04d1af52a8b94e2 caused regexes to fail
on big-endian systems. It was because I used SvCUR where I should have
been using SvLEN, and was overwriting the final byte of real data with
0, which didn't matter as long as that byte was 0, which in our smokes
on litlle-endian systems, it was.
Further clarification is that inversion lists are stored as UV*, whereas
the scalar handling code is expecting char*. By casting, it all works
out, except that the final byte is kept as a single char NUL. I was
trying to write that final byte as a byte, but by using SvCUR, I was
getting a byte in one of the UVs. With small numbers on a little-endian
system, that byte will be 0 anyway, but not on a big-endian one.
Lukas Mai [Wed, 24 Feb 2016 23:59:41 +0000 (00:59 +0100)]
perlvar: hyperlink from $^D to perlrun/-D
Lukas Mai [Thu, 25 Feb 2016 02:48:48 +0000 (03:48 +0100)]
podcheck.t: expand POD sequences in L</...> section names
Matthew Horsfall [Wed, 24 Feb 2016 20:06:38 +0000 (15:06 -0500)]
Fix perldoc -f sleep to use $SIG{ALRM} instead of $SIG{ALARM}.
Karl Williamson [Tue, 23 Feb 2016 21:04:19 +0000 (14:04 -0700)]
Use less memory in compiling regexes
This is at least a partial patch for [perl #127392], cutting the maximum
memory used on my box from around 8600kB to 7800kB. For [perl #127568],
which has been merged into #127392, the savings are even larger, about
37%
Previously a large number of large mortal SVs could be created while
compiling a single regex pattern, and their accumulated memory quickly
added up. This changes things to not use so many mortals.
Karl Williamson [Tue, 23 Feb 2016 21:00:23 +0000 (14:00 -0700)]
regcomp.c: Guard against corrupting inversion list SV
I don't know of any cases where this happens, but in working on the next
commit I triggered a problem with shrinking an inversion list so much
that the required 0 UV at the beginning was freed.
Daniel Dragan [Sun, 21 Feb 2016 17:28:14 +0000 (12:28 -0500)]
silence warning in Win32CORE
Win32CORE.c: In function ‘boot_Win32CORE’:
../../XSUB.h:127:43: warning: unused parameter ‘cv’ [-Wunused-parameter]
Tony Cook [Tue, 23 Feb 2016 04:09:39 +0000 (15:09 +1100)]
[perl #127386] clarify that exit in the die pseudo-code is perl's exit
Chris 'BinGOs' Williams [Tue, 23 Feb 2016 00:44:08 +0000 (00:44 +0000)]
M-CL sync with what tis is on CPAN
Ricardo Signes [Sun, 21 Feb 2016 21:59:17 +0000 (08:59 +1100)]
release schedule: Sawyer to release October 2016
Sawyer X [Sun, 21 Feb 2016 16:51:25 +0000 (17:51 +0100)]
Merge branch 'blead' of ssh://perl5.git.perl.org/perl into blead
Sawyer X [Sun, 21 Feb 2016 13:02:27 +0000 (14:02 +0100)]
More updates to Module::CoreList:
I hope I got this right (I probably didn't though). The release
version was
20160121, not
20160220 or
20160221, so I'm not really
sure what's going on. Of course, with Module::CoreList I'm rarely
sure.
Still all tests pass and the world hasn't exploded yet, as far
as I know.
If you find a problem with this, I would appreciate a fix, but
also to ping me and tell me what I did wrong. I promise to update
the release checklist with it.
Thanks!
Sawyer X [Sun, 21 Feb 2016 12:36:10 +0000 (13:36 +0100)]
update Module::CoreList and bump version
Karl Williamson [Sun, 21 Feb 2016 01:29:25 +0000 (18:29 -0700)]
t/re/pat_advanced.t: Test for [#perl 126886]
This was fixed by
cfbef7dc3bfb89e4ed2c00ea9c9e3bcfd0b170fd
Sawyer X [Sat, 20 Feb 2016 22:51:37 +0000 (23:51 +0100)]
bump version to 5.23.9
Sawyer X [Sat, 20 Feb 2016 22:39:02 +0000 (23:39 +0100)]
new perldelta for 5.23.9
Sawyer X [Sat, 20 Feb 2016 22:21:58 +0000 (23:21 +0100)]
update 5.23.8 as done on release schedule
Sawyer X [Sat, 20 Feb 2016 22:21:11 +0000 (23:21 +0100)]
add 5.23.8 epigraph
Sawyer X [Sat, 20 Feb 2016 22:17:07 +0000 (23:17 +0100)]
Merge branch 'release-5.23.8' into blead
Sawyer X [Sat, 20 Feb 2016 20:09:58 +0000 (21:09 +0100)]
add new release to perlhist
Sawyer X [Sat, 20 Feb 2016 19:46:45 +0000 (20:46 +0100)]
Typos, POD errors, etc.
Sawyer X [Sat, 20 Feb 2016 19:22:02 +0000 (20:22 +0100)]
Update perldelta module versions (Porting/corelist-perldelta.pl)
Sawyer X [Sat, 20 Feb 2016 18:52:03 +0000 (19:52 +0100)]
update Module::CoreList (Porting/corelist.pl)
Sawyer X [Sat, 20 Feb 2016 17:22:33 +0000 (18:22 +0100)]
cleanup perldelta
Sawyer X [Sat, 20 Feb 2016 14:31:02 +0000 (15:31 +0100)]
Document 38e3b24
Sawyer X [Fri, 19 Feb 2016 23:20:38 +0000 (00:20 +0100)]
Document
e57270be442bfaa9dc23eebd67485e5a806b44e3:
I wasn't sure where or how much of it to document, but it seems
like it's important, and this relating to permissions not being
removed, I consider it security-related. This is similiar to what
the original Debian ticket that relates to it mentioned.
I've cut Niko's text a bit shorter, taken from the commit message
itself.
Sawyer X [Thu, 18 Feb 2016 16:30:07 +0000 (17:30 +0100)]
Sawyer X [Wed, 17 Feb 2016 18:15:58 +0000 (19:15 +0100)]
Update perldelta.pod:
This includes most changes I've noticed. I ran through all
commits since the last commit Stevan did. There are some commits
there which I haven't reflect and not sure whether they were,
but I will take that up with their respected authors.
Jarkko Hietaniemi [Sat, 20 Feb 2016 13:49:04 +0000 (08:49 -0500)]
Add assert(matches_string).
Coverity CID #135728: Explicit null dereferenced (FORWARD_NULL)
Coverity sees an execution path that leaves matches_string NULL.
Jarkko Hietaniemi [Thu, 18 Feb 2016 02:04:18 +0000 (21:04 -0500)]
Upgrade to IPC-SysV 2.05.
Craig A. Berry [Fri, 19 Feb 2016 21:33:10 +0000 (15:33 -0600)]
Cast PL_dump_re_max_len to avoid type mismatch warning.
Specifically this one on VMS:
|| ! grok_atoUV(dump_len_string, &PL_dump_re_max_len, NULL))
.....................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the
pointer value "&(my_perl->Idump_re_max_len)" is "unsigned int",
which is not compatible with "unsigned long".
This was new code in
2bfbbbaf9ef1783ba.
Karl Williamson [Fri, 19 Feb 2016 18:16:06 +0000 (11:16 -0700)]
regcomp.c: White-space only
Re-indent and reflow to fit in 80 cols after previous commit
Karl Williamson [Fri, 19 Feb 2016 18:11:40 +0000 (11:11 -0700)]
regcomp.c: Can't do optimization if inverting
Something like /[^\W_0-9]/ was getting optimized into something it
shouldn't have been. Although, the way the execution code is
structured, I couldn't find a case where it actually made a difference.
So skip the optimization if inverting.
Karl Williamson [Thu, 18 Feb 2016 21:51:01 +0000 (14:51 -0700)]
regcomp.c: Use colors for -Dr metanotation
Use a different color for the metanotation than the code points being
output under Debugcolor. The default is to have stand out mode for the
code points, and not for the meta.