This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
5 years agoreg_mesg.t: Move some tests to proper places
Karl Williamson [Tue, 19 Dec 2017 18:43:46 +0000 (11:43 -0700)]
reg_mesg.t: Move some tests to proper places

 This was detected in [perl #131522].  Some tests were in the death
 section, but don't die.  The next commit will add tests that actually
 work to detect death.

5 years ago[MERGE] s/// return value fixups
David Mitchell [Tue, 19 Dec 2017 15:40:41 +0000 (15:40 +0000)]
[MERGE] s/// return value fixups

5 years agos/// in boolean context: simplify return value
David Mitchell [Tue, 19 Dec 2017 15:28:06 +0000 (15:28 +0000)]
s/// in boolean context: simplify return value

Normally s/// returns a count of the number of iterations, but
as an optimisation, in boolean context it returns PL_sv_yes/PL_sv_zero
instead. But in the places where it decides which immortal var to return,
the number of iterations is always > 0, so PL_sv_zero never gets returned.
So skip testing whether iters > 0 and always just return PL_sv_yes.

(In non-boolean scalar context, it still returns the iteration count as
before.)

5 years agoavoid tainting boolean return value of s///
David Mitchell [Tue, 19 Dec 2017 14:52:49 +0000 (14:52 +0000)]
avoid tainting boolean return value of s///

RT #132385

s/// normally returns an integer count, but sometimes for efficiency it
will return a boolean instead (PL_sv_yes/PL_sv_zero).

In these cases, don't try to taint the return value, since it will die
with 'Modification of a read-only value'.

5 years agos///: return boolean in not-in-place branch
David Mitchell [Tue, 19 Dec 2017 12:09:15 +0000 (12:09 +0000)]
s///: return boolean in not-in-place branch

A while back, s/// (and other ops) were optimised to return
PL_sv_yes/PL_sv_zero rather than an iteration count in boolean context.

This optimisation was missed in one place in pp_subst(): the 'can modify
in place' branch was done, but the other branch was missed.

This commit fixes that.

5 years agominor punctuation improvement
Karen Etheridge [Tue, 19 Dec 2017 03:01:26 +0000 (19:01 -0800)]
minor punctuation improvement

5 years agoForbid literal \v in /[]/ under re strict, except under /x
Karl Williamson [Tue, 19 Dec 2017 02:04:56 +0000 (19:04 -0700)]
Forbid literal \v in /[]/ under re strict, except under /x

Vertical space in a bracketed character class is likely to be an error;
either a typo or omission of /x.  It will match literally, but be
displayed like /x is in effect.

For now, just add this check to re 'strict', which is experimental,
designed to catch things the current regex parser doesn't.

5 years agoperldiag: Fix obsolete text
Karl Williamson [Tue, 19 Dec 2017 02:03:26 +0000 (19:03 -0700)]
perldiag: Fix obsolete text

Since 5.26.0, code points must fit in a signed integer, not unsigned.

This commit should be considered for backporting to a future 5.26.x
release

5 years agoreg_mesg.t: Fix comment
Karl Williamson [Tue, 19 Dec 2017 02:02:37 +0000 (19:02 -0700)]
reg_mesg.t: Fix comment

5 years agoreg_mesg.t: Fix typo
Karl Williamson [Tue, 19 Dec 2017 02:01:37 +0000 (19:01 -0700)]
reg_mesg.t: Fix typo

5 years agoDemonstrate how File::Spec->catfile('.', @other_args) works.
James E Keenan [Mon, 18 Dec 2017 22:02:55 +0000 (17:02 -0500)]
Demonstrate how File::Spec->catfile('.', @other_args) works.

For:  RT # 131296

5 years agoEmulate C99 int_fast8_t, etc typedefs
Karl Williamson [Fri, 8 Dec 2017 05:10:52 +0000 (22:10 -0700)]
Emulate C99 int_fast8_t, etc typedefs

These are useful if you know you have a variable with a restricted range,
and so could fit in a byte or 16 bits, but speed is more important.
These C99 typedefs allows you to specify the minimal size you need, and
allows the compiler to substitute a wider type if it is faster.

This commit adds typedefs spelled the same as the C99 ones, but upper
cased.  On non-C99 compilers, it just uses 'int' behind the scenes,
which should be safe.

These are currently restricted to core to be sure these aren't a bad
idea before they are made public.

5 years agomktables: Use already set variable
Karl Williamson [Mon, 18 Dec 2017 19:49:55 +0000 (12:49 -0700)]
mktables: Use already set variable

The value for this variable is already known; use that instead of
rederiving it.

5 years agoChange number to mnemonic
Karl Williamson [Sat, 16 Dec 2017 06:41:51 +0000 (23:41 -0700)]
Change number to mnemonic

This is in preparation for future commits that will use it in multiple
places

5 years agoperlxs: Document bitwise calling conventions
Father Chrysostomos [Mon, 18 Dec 2017 17:37:08 +0000 (09:37 -0800)]
perlxs: Document bitwise calling conventions

5 years agoCustomisations for Digest-SHA tests
Chris 'BinGOs' Williams [Mon, 18 Dec 2017 13:31:43 +0000 (13:31 +0000)]
Customisations for Digest-SHA tests

5 years agoUpdate Digest-SHA to CPAN version 6.00
Chris 'BinGOs' Williams [Mon, 18 Dec 2017 13:15:34 +0000 (13:15 +0000)]
Update Digest-SHA to CPAN version 6.00

  [DELTA]

6.00  Fri Dec  8 22:44:44 MST 2017
  - added "tag" option (BSD-style checksums) to shasum
    -- consistent with GNU sha1sum, sha224sum, etc.
    -- thanks to Christopher Tubbs for suggestion
  - modified SHA.pm to use XSLoader
    -- falls back to DynaLoader if necessary
  - decoupled Digest::SHA and Digest::SHA::PurePerl
    -- scripts/tests in each module now fully independent
    -- Digest::SHA::PurePerl to be phased out eventually
      -- past versions will remain available

5 years agoenable PERL_OP_PARENT always
David Mitchell [Mon, 18 Dec 2017 11:50:03 +0000 (11:50 +0000)]
enable PERL_OP_PARENT always

Remove support for PERL_NO_OP_PARENT, which was a way of turning off the
(on by default) PERL_OP_PARENT define.

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

5 years agoalign version numbers in the PathTools distro
Zefram [Mon, 18 Dec 2017 03:21:05 +0000 (03:21 +0000)]
align version numbers in the PathTools distro

5 years agoremove support for running PathTools on MacOS
Zefram [Mon, 18 Dec 2017 03:18:39 +0000 (03:18 +0000)]
remove support for running PathTools on MacOS

MacOS Classic hasn't been a supported platform since 5.14.  Note that
the code for processing MacOS-style paths remains, and can be run on
supported platforms.  [perl #130818]

5 years agofix pod markup in warnings.pm
Zefram [Mon, 18 Dec 2017 03:12:04 +0000 (03:12 +0000)]
fix pod markup in warnings.pm

Commit c4583f59133164b3f392c31e9b9573276ec17e74 introduced a pod error.

5 years agoremove support for running PathTools on EPOC
Zefram [Mon, 18 Dec 2017 03:08:31 +0000 (03:08 +0000)]
remove support for running PathTools on EPOC

EPOC hasn't been a supported platform since 5.18.  Note that the code
for processing EPOC-style paths remains, and can be run on supported
platforms.  [perl #130818]

5 years agoperldelta: Avoid ‘deprecated’ for non-deprecated module
Father Chrysostomos [Mon, 18 Dec 2017 02:43:55 +0000 (18:43 -0800)]
perldelta: Avoid ‘deprecated’ for non-deprecated module

Saying the module is deprecated (in core) can easily be misunder-
stood.  The module itself is certainly not deprecated.

5 years agoperldelta for #132468 warnings functions
Father Chrysostomos [Mon, 18 Dec 2017 02:00:33 +0000 (18:00 -0800)]
perldelta for #132468 warnings functions

5 years agoperldelta: Alphabetise modules
Father Chrysostomos [Mon, 18 Dec 2017 01:59:33 +0000 (17:59 -0800)]
perldelta: Alphabetise modules

5 years ago[perl #132468] At _at_level warnings functions
Father Chrysostomos [Mon, 18 Dec 2017 01:56:52 +0000 (17:56 -0800)]
[perl #132468] At _at_level warnings functions

5 years agopp_ctl.c: Add -D output for inward goto
Father Chrysostomos [Mon, 11 Dec 2017 21:38:24 +0000 (13:38 -0800)]
pp_ctl.c: Add -D output for inward goto

5 years agomerge branch zefram/dumb_match
Zefram [Sun, 17 Dec 2017 11:02:23 +0000 (11:02 +0000)]
merge branch zefram/dumb_match

5 years agoUnicode::UCD: max code point is now IV_MAX
Karl Williamson [Fri, 10 Nov 2017 01:31:15 +0000 (18:31 -0700)]
Unicode::UCD: max code point is now IV_MAX

Return the correct value when asked.

5 years agoregcomp.sym: Clarify regnode comment
Karl Williamson [Sat, 16 Dec 2017 19:13:01 +0000 (12:13 -0700)]
regcomp.sym: Clarify regnode comment

5 years agoregen/mk_invlists.pl: reformulate a branch and outdent
Karl Williamson [Sat, 16 Dec 2017 18:53:15 +0000 (11:53 -0700)]
regen/mk_invlists.pl: reformulate a branch and outdent

This turns a test whose one branch dies into a postfix type, which means
there is no need for an else, and that code can be outdented.

5 years agoregen/mk_invlists.pl: Outdent code
Karl Williamson [Sat, 16 Dec 2017 18:48:12 +0000 (11:48 -0700)]
regen/mk_invlists.pl: Outdent code

This was unnecessarily indented.  This commit also removes an
unnecessary {...} block, and outdents the interior as well.
No other changes are made

5 years agoregen/mk_invlists.pl: Fix typo
Karl Williamson [Sat, 16 Dec 2017 18:37:21 +0000 (11:37 -0700)]
regen/mk_invlists.pl: Fix typo

5 years agoperlre: '#' is a metacharacter under /x
Karl Williamson [Sun, 17 Dec 2017 00:05:50 +0000 (17:05 -0700)]
perlre: '#' is a metacharacter under /x

5 years agomake dNOOP usable outside function in C++
Zefram [Sat, 16 Dec 2017 22:46:33 +0000 (22:46 +0000)]
make dNOOP usable outside function in C++

Commit 7db66e12883f0832ca80164b723768b848187bda changed dNOOP in C++ from
an external function declaration (which was running into inconsistent
linkage) to a no-op statement.  The no-op statement is only valid where
statements are valid, i.e., inside a function, so this doesn't actually
work everywhere that a declaration is expected.

Switch dNOOP to be an incomplete struct declaration, regardless of
language.  This can certainly be used both inside and outside functions,
is valid to repeat, and does not have the linkage problem of a function
declaration.  It should also be as unlikely to attract an "unused"
warning as an external function declaration.

5 years agotypo fix in doc
Zefram [Sat, 16 Dec 2017 09:30:16 +0000 (09:30 +0000)]
typo fix in doc

5 years agoshow modern usage for {XS,Dyna}Loader
Zefram [Sat, 16 Dec 2017 08:34:25 +0000 (08:34 +0000)]
show modern usage for {XS,Dyna}Loader

Fixes [perl #132247].

5 years agosemicolon-friendly diagnostic control
Zefram [Sat, 16 Dec 2017 07:12:48 +0000 (07:12 +0000)]
semicolon-friendly diagnostic control

New macros {GCC,CLANG}_DIAG_{IGNORE,RESTORE}_{DECL,STMT}, which take a
following semicolon.  It is necessary to use the _DECL or _STMT version
as appropriate to the context.  Fixes [perl #130726].

5 years agoperform system() arg processing before fork
Zefram [Sat, 16 Dec 2017 05:33:20 +0000 (05:33 +0000)]
perform system() arg processing before fork

A lot of things can happen when stringifying an argument list: side
effects, warnings, exceptions.  In the case of system(), these effects
should happen in the context of the parent process.  The stringification
can also depend on which process it happens in, as in the case of
$$, and in that case it should also happen in the parent process.
Therefore reduce the argument scalars to strings first thing in pp_system.
Fixes [perl #121105].

5 years agoupdate and clarify "die" and "warn" doc
Zefram [Sat, 16 Dec 2017 04:47:08 +0000 (04:47 +0000)]
update and clarify "die" and "warn" doc

They didn't fully describe the handling of reference operands, and
there were other errors in their description of the treatment of the
operand list.  Fixes [perl #121372].

5 years agoretry gdbm_open() upon block size error
Zefram [Sat, 16 Dec 2017 02:17:08 +0000 (02:17 +0000)]
retry gdbm_open() upon block size error

It is reported that gdbm_open() with default block size can fail on
filesystems with a non-power-of-two block size.  In that event, retry
opening, forcing a power-of-two block size.  Fixes [perl #119623].

5 years agoadd ticket number to perldelta entry
Zefram [Sat, 16 Dec 2017 01:48:22 +0000 (01:48 +0000)]
add ticket number to perldelta entry

5 years agowiden size-type variables in pack/unpack
Zefram [Sat, 16 Dec 2017 01:44:32 +0000 (01:44 +0000)]
widen size-type variables in pack/unpack

Most size-type variables in pp_pack.c were of type I32, with a
smattering of other types.  Use SSize_t in place of I32, and generally
use size_t-width variables as appropriate.  Fixes [perl #119367].

5 years agoperlfunc: remove stray plus from start of line
Marco Fontani [Fri, 15 Dec 2017 17:16:31 +0000 (10:16 -0700)]
perlfunc: remove stray plus from start of line

 Looks to be an artifact of applying my original patch, which was
 amended as part of e135ff695231a81e2a70a739e8d813525432fd4d, whereby
 the text was slightly amended.

5 years agodocument GDBM_File's delete vs each conflict
Zefram [Fri, 15 Dec 2017 09:51:33 +0000 (09:51 +0000)]
document GDBM_File's delete vs each conflict

Fixes [perl #117449].

5 years agorewrite "ref" documentation for clarity
Zefram [Fri, 15 Dec 2017 07:00:11 +0000 (07:00 +0000)]
rewrite "ref" documentation for clarity

5 years agoclean up directories of split pod files
Zefram [Fri, 15 Dec 2017 05:12:32 +0000 (05:12 +0000)]
clean up directories of split pod files

Fixes [perl #114316].

5 years agoperldelta 282fc0b3cc2439f69587d980b62bef7f5d5bdfef
Zefram [Fri, 15 Dec 2017 02:14:25 +0000 (02:14 +0000)]
perldelta 282fc0b3cc2439f69587d980b62bef7f5d5bdfef

5 years agoperldelta e135ff695231a81e2a70a739e8d813525432fd4d
Zefram [Fri, 15 Dec 2017 02:12:42 +0000 (02:12 +0000)]
perldelta e135ff695231a81e2a70a739e8d813525432fd4d

5 years agoperldelta 47836a13cc4c999c9b3589c6797d6769b52c37fd
Zefram [Fri, 15 Dec 2017 02:11:13 +0000 (02:11 +0000)]
perldelta 47836a13cc4c999c9b3589c6797d6769b52c37fd

5 years agoperldelta 3d033384b2016a58c3eed89524dc658660c759ce
Zefram [Fri, 15 Dec 2017 02:09:15 +0000 (02:09 +0000)]
perldelta 3d033384b2016a58c3eed89524dc658660c759ce

5 years agoperldelta 0bd1c35ee47dab181543ba366fe021122c591f65
Zefram [Fri, 15 Dec 2017 02:06:54 +0000 (02:06 +0000)]
perldelta 0bd1c35ee47dab181543ba366fe021122c591f65

5 years agoperldelta 38e30ca7507a601c2d84596bc51d88c0f3c516b4
Zefram [Fri, 15 Dec 2017 02:03:33 +0000 (02:03 +0000)]
perldelta 38e30ca7507a601c2d84596bc51d88c0f3c516b4

5 years agoperldelta addf67e13a08f45d3bb4c245c821b1ef2767c5a5
Zefram [Fri, 15 Dec 2017 02:00:05 +0000 (02:00 +0000)]
perldelta addf67e13a08f45d3bb4c245c821b1ef2767c5a5

5 years agoperldelta 27d3197f2b90b3534ea74a96fc7e37200baeb9b7
Zefram [Fri, 15 Dec 2017 01:58:26 +0000 (01:58 +0000)]
perldelta 27d3197f2b90b3534ea74a96fc7e37200baeb9b7

5 years agoperldelta d5407247046f2f01c1492998b32b3b148445febe
Zefram [Fri, 15 Dec 2017 01:55:17 +0000 (01:55 +0000)]
perldelta d5407247046f2f01c1492998b32b3b148445febe

5 years agoperldelta 16ada235c332e017667585e1a5a00ce43a31c529
Zefram [Fri, 15 Dec 2017 01:53:56 +0000 (01:53 +0000)]
perldelta 16ada235c332e017667585e1a5a00ce43a31c529

5 years agoperldelta 397baf232086e0a9ad6f881a9614d3dbaea853fc
Zefram [Fri, 15 Dec 2017 01:50:55 +0000 (01:50 +0000)]
perldelta 397baf232086e0a9ad6f881a9614d3dbaea853fc

5 years agoperldelta 0165f7b01e9c43629d0c6f4b5eb2e672abeda51a
Zefram [Fri, 15 Dec 2017 01:48:41 +0000 (01:48 +0000)]
perldelta 0165f7b01e9c43629d0c6f4b5eb2e672abeda51a

5 years agoperldelta dd9e86b4501b7c8aeba1f5ebda9f8907747c443f
Zefram [Fri, 15 Dec 2017 01:46:30 +0000 (01:46 +0000)]
perldelta dd9e86b4501b7c8aeba1f5ebda9f8907747c443f

5 years agoperldelta 9b91093d3e74d13a6e4f67269a587f4ab397998a
Zefram [Fri, 15 Dec 2017 01:44:39 +0000 (01:44 +0000)]
perldelta 9b91093d3e74d13a6e4f67269a587f4ab397998a

5 years agoperldelta b5145c7d479fcfcb104fc6d3d89b4d757ca3cd15
Zefram [Fri, 15 Dec 2017 01:43:34 +0000 (01:43 +0000)]
perldelta b5145c7d479fcfcb104fc6d3d89b4d757ca3cd15

5 years agoperldelta 0301e899536a22752f40481d8a1d141b7a7dda82
Zefram [Fri, 15 Dec 2017 01:39:19 +0000 (01:39 +0000)]
perldelta 0301e899536a22752f40481d8a1d141b7a7dda82

5 years agoperldelta 6c4f4eb174d1e2e9f874786123a699d11ae741f9
Zefram [Fri, 15 Dec 2017 01:32:39 +0000 (01:32 +0000)]
perldelta 6c4f4eb174d1e2e9f874786123a699d11ae741f9

5 years agoperldelta 1af9149031d9f5d2d43b6df59b628a0f2c1041f6
Zefram [Fri, 15 Dec 2017 01:30:38 +0000 (01:30 +0000)]
perldelta 1af9149031d9f5d2d43b6df59b628a0f2c1041f6

5 years agoperldelta bff3de19b083d33895fc03f7d7d092e5830547a5
Zefram [Fri, 15 Dec 2017 01:29:23 +0000 (01:29 +0000)]
perldelta bff3de19b083d33895fc03f7d7d092e5830547a5

5 years agoperldelta b3893bfa90e8810497e2f81458a5a46db611cadf
Zefram [Fri, 15 Dec 2017 01:27:12 +0000 (01:27 +0000)]
perldelta b3893bfa90e8810497e2f81458a5a46db611cadf

5 years agoperldelta 0c9c439d08a65206d442724bcd9fb29fa5a7f937
Zefram [Fri, 15 Dec 2017 01:24:36 +0000 (01:24 +0000)]
perldelta 0c9c439d08a65206d442724bcd9fb29fa5a7f937

5 years agoperldelta 58be57636a42d6c6fd404c48c4e1cb87870182df
Zefram [Fri, 15 Dec 2017 01:20:03 +0000 (01:20 +0000)]
perldelta 58be57636a42d6c6fd404c48c4e1cb87870182df

5 years agoperldelta 7c6e7cf06853eef1d1b271077c402c5f8655fbe6
Zefram [Fri, 15 Dec 2017 01:16:14 +0000 (01:16 +0000)]
perldelta 7c6e7cf06853eef1d1b271077c402c5f8655fbe6

5 years agoperldelta 38a3df78b8fbbdf02988dd5fe691c23a8041334f
Zefram [Fri, 15 Dec 2017 01:14:01 +0000 (01:14 +0000)]
perldelta 38a3df78b8fbbdf02988dd5fe691c23a8041334f

5 years agoperldelta 557714184de18964b954b2c00fa13127fd3f216a
Zefram [Fri, 15 Dec 2017 01:11:47 +0000 (01:11 +0000)]
perldelta 557714184de18964b954b2c00fa13127fd3f216a

5 years agoperldelta 3c0dbbbaeb55e36a6beabd1cfc9f0432053bcaf0
Zefram [Fri, 15 Dec 2017 01:09:48 +0000 (01:09 +0000)]
perldelta 3c0dbbbaeb55e36a6beabd1cfc9f0432053bcaf0

5 years agoperldelta 7270698f29ae2f22f2cdfec7b156a75602cddf68
Zefram [Fri, 15 Dec 2017 01:08:38 +0000 (01:08 +0000)]
perldelta 7270698f29ae2f22f2cdfec7b156a75602cddf68

5 years agoperldelta d3f0c815eccb54ae88550259c06aa395b2274580
Zefram [Fri, 15 Dec 2017 01:07:08 +0000 (01:07 +0000)]
perldelta d3f0c815eccb54ae88550259c06aa395b2274580

5 years agoperldelta 39dc9d148281a0a05168f216359b3bdb696fec66
Zefram [Fri, 15 Dec 2017 01:04:32 +0000 (01:04 +0000)]
perldelta 39dc9d148281a0a05168f216359b3bdb696fec66

5 years agoperldelta 0740a29d60ebd4ff72090340b0140ec2210e90c7
Zefram [Fri, 15 Dec 2017 01:02:39 +0000 (01:02 +0000)]
perldelta 0740a29d60ebd4ff72090340b0140ec2210e90c7

5 years agoperldelta sub constructor documentation
Zefram [Fri, 15 Dec 2017 00:59:13 +0000 (00:59 +0000)]
perldelta sub constructor documentation

Covers commits 68cd13c6081a23a59561d3289dba5a99f73c1463,
a59b17fa6324328a12a1d86a5e187e07ba8cee6c, and
28ef70489d76deb9024de42a0571162f323148c8.

5 years agoperldelta 8bfeb7823012732f6bfd9c65485ae3ad9c0cce8d
Zefram [Fri, 15 Dec 2017 00:56:11 +0000 (00:56 +0000)]
perldelta 8bfeb7823012732f6bfd9c65485ae3ad9c0cce8d

5 years agoperldelta abda9fe0fe75ae824723761c1c98af958f17a41c
Zefram [Fri, 15 Dec 2017 00:51:21 +0000 (00:51 +0000)]
perldelta abda9fe0fe75ae824723761c1c98af958f17a41c

5 years agoperldelta a252c8fe5fbed43d9b362ed97d57a5a7764fac62
Zefram [Fri, 15 Dec 2017 00:47:10 +0000 (00:47 +0000)]
perldelta a252c8fe5fbed43d9b362ed97d57a5a7764fac62

5 years agomake exec keep its argument list more reliably
Zefram [Wed, 6 Dec 2017 21:27:15 +0000 (21:27 +0000)]
make exec keep its argument list more reliably

Bits of exec code were putting the constructed commands into globals
PL_Argv and PL_Cmd, which could then be clobbered by reentrancy.
These are only global in order to manage their freeing, but that's
better managed by using the scope stack.  So replace them with automatic
variables, with ENTER/SAVEFREEPV/LEAVE to free the memory.  Also copy
the strings acquired from SVs, to avoid magic clobbering the buffers of
SVs already read.  Fixes [perl #129888].

5 years agorefer to perldiag from perlfunc
Marco Fontani [Wed, 13 Dec 2017 10:11:44 +0000 (11:11 +0100)]
refer to perldiag from perlfunc

Rather than duplicating information as to which keyword, function, or
operator generates which warning, point the reader to the proper place
to read about which warnings Perl generates in which scenario, which are
well described in the POD for "warnings".  [perl #116080]

5 years agodon't lose mark when pp_reverse extends stack
Zefram [Fri, 8 Dec 2017 19:23:29 +0000 (19:23 +0000)]
don't lose mark when pp_reverse extends stack

Nullary reverse needs to extend the stack to push its result scalar.
It was actually extending the stack, but doing so invalidated MARK,
which it relied upon to place the stack pointer afterwards.  Upon stack
reallocation it was therefore leaving the stack pointer pointing to the
freed stack memory.  Reformulate stack manipulation to not rely on MARK
after extending.  Fixes [perl #132544].

5 years agoRevert "re_intuit_start(): rename some local vars"
David Mitchell [Thu, 14 Dec 2017 09:32:46 +0000 (09:32 +0000)]
Revert "re_intuit_start(): rename some local vars"

This reverts commit ea569f0097183cb2c1b98852f31b47264605f0b7.

This was just a cosmetic (if useful) change and clashes with a branch
Yves is working on. So I'll redo it some other time.

5 years agowarn on $a.$b.$c in void context
Zefram [Thu, 14 Dec 2017 04:23:58 +0000 (04:23 +0000)]
warn on $a.$b.$c in void context

$a.$b.$c gets transformed early on to execute as ($a.$b).=$c, which didn't
warn about void context becuase .= looks like a useful side effect.
Happily, the recently-added OPpCONCAT_NESTED flag identifies that this
has happened.  Make scalarvoid() pay attention to this flag when a concat
op is put into void context.  Fixes [perl #6997]

5 years agoCwd: Change strcmp into strEQ
Karl Williamson [Thu, 9 Mar 2017 19:06:34 +0000 (12:06 -0700)]
Cwd: Change strcmp into strEQ

The latter is easier to read

5 years agoFix typo in 183a822da3e11eb0f7dba393f5e6f2bc515cffe6
Karl Williamson [Thu, 14 Dec 2017 03:28:53 +0000 (20:28 -0700)]
Fix typo in 183a822da3e11eb0f7dba393f5e6f2bc515cffe6

Spotted by Tony Cook++

5 years agoData::Dumper: Change a strncmp to memBEGINs
Karl Williamson [Thu, 9 Mar 2017 17:54:20 +0000 (10:54 -0700)]
Data::Dumper: Change a strncmp to memBEGINs

The latter is much clearer as to what's going on

5 years agoData::Dumper: Change strcpy to strlcpy
Karl Williamson [Mon, 27 Mar 2017 20:24:41 +0000 (14:24 -0600)]
Data::Dumper: Change strcpy to strlcpy

strlcpy is safer.  This reverts to using strcpy if no version of strlcpy
is available (but one has been available in Perl since 5.9.4)

5 years agoadd preload to .gitignore
Zefram [Thu, 14 Dec 2017 02:37:03 +0000 (02:37 +0000)]
add preload to .gitignore

5 years agofix links in generated HTML documentation
Zefram [Thu, 14 Dec 2017 02:27:28 +0000 (02:27 +0000)]
fix links in generated HTML documentation

Invoke installhtml in the right way for it to generate relative links.
Fix installhtml's code for creating relative links in the index for
split documents.  Update Pod::Html's section name transformer to
match the actual output seen via Pod::Simple::XHTML.  Incidentally
update split-on-head code for the new style of HTML generated by
Pod::Simple::XHTML.  Fixes [perl #110056].

5 years agoAdd PERL_REENTRANT for XS modules
Karl Williamson [Thu, 14 Dec 2017 02:07:04 +0000 (19:07 -0700)]
Add PERL_REENTRANT for XS modules

This allows them to get the reentrant versions of libc functions
automatically.  Previously if they wanted to do this, they had to
declare themselves (shudder) as PERL_CORE or PERL_EXT.

5 years agoperlfunc: Add note about reentrant functions
Karl Williamson [Thu, 14 Dec 2017 01:36:02 +0000 (18:36 -0700)]
perlfunc: Add note about reentrant functions

perl automatically and silently uses reentrant versions of some
functions in threaded perls when such functions are available.  Note
this.

5 years agoautomatic titling in Pod::Html
Zefram [Wed, 13 Dec 2017 22:59:28 +0000 (22:59 +0000)]
automatic titling in Pod::Html

Automatic extraction of a title from the content was lost with the
switch to using Pod::Simple::XHTML for rendering.  It would be tricky
to add in Pod::Simple::XHTML, or anything else integrated into that
parser, because the stream-oriented approach plays poorly with any kind
of lookahead.  Instead go to a two-stage conversion, parsing the input
to tree form using Pod::Simple::SimpleTree and later feeding the tree
to the stream-oriented Pod::Simple::XHTML for output.  Between the two
stages, extract a default title from the tree, in time to use it when
setting options for Pod::Simple::XHTML.  Fixes [perl #110520].

5 years agopp_multiconcat() Use faster UTF-8 variant counting
Karl Williamson [Thu, 23 Nov 2017 06:10:58 +0000 (23:10 -0700)]
pp_multiconcat() Use faster UTF-8 variant counting

5 years agore_intuit_start()/S_reghop3(): don't go beyond end
David Mitchell [Wed, 13 Dec 2017 15:53:51 +0000 (15:53 +0000)]
re_intuit_start()/S_reghop3(): don't go beyond end

RT #132552

when hopping N characters along a string, if the 'end stop' lim wasn't
on a char boundary, the value returned by S_reghop3() could be up to
(but not including) one char's worth of bytes beyond lim.

This is fairly harmless, but gave valgrind/ASan palpitations.

So fixed by this commit.

5 years agore_intuit_start(): rename some local vars
David Mitchell [Wed, 13 Dec 2017 13:14:59 +0000 (13:14 +0000)]
re_intuit_start(): rename some local vars

(no functional changes)

For local variables which hold a length, rename that var with a _c or _b
suffix to indicate whether it holds a byte or character count.

There is a mixture of the two, and it's easy to get confused.

Also, in places, rename vars to more closely match the field they're
extracted from. For example, start_shift is set from the min_offset field
of the check slot of the substrings array, so it makes more sense to call
it check_min_offset_c.

Also add some code comments about what the vars are for.

5 years agoUpgrade Time::Piece from vesion 1.3202 to 1.3203
Steve Hay [Wed, 13 Dec 2017 08:37:43 +0000 (08:37 +0000)]
Upgrade Time::Piece from vesion 1.3202 to 1.3203

5 years agoinline.h: Fix wrong order of shift and mask
Karl Williamson [Wed, 13 Dec 2017 06:01:02 +0000 (23:01 -0700)]
inline.h: Fix wrong order of shift and mask

I realized that one should mask before the shift in this macro that is
used in is_utf8_invariant_string_loc() and variant_under_utf8_count().
This would only show up on a 32-bit platform that doesn't have 64-bit
ability at all.