This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
4 years agoperlvar: Fix broken link
Karl Williamson [Wed, 13 Mar 2019 19:23:24 +0000 (13:23 -0600)]
perlvar: Fix broken link

4 years agoperlrecharclass: Minor wording improvements
Karl Williamson [Wed, 13 Mar 2019 19:18:28 +0000 (13:18 -0600)]
perlrecharclass: Minor wording improvements

4 years agoperlre: Minor wording improvements
Karl Williamson [Wed, 13 Mar 2019 19:17:39 +0000 (13:17 -0600)]
perlre: Minor wording improvements

4 years agoperlre: Italicize a bunch of stuff
Karl Williamson [Wed, 13 Mar 2019 19:16:43 +0000 (13:16 -0600)]
perlre: Italicize a bunch of stuff

These are not meant to be written literally.

4 years agodquote.c: Use UTF8_SAFE_SKIP
Karl Williamson [Wed, 13 Mar 2019 17:42:15 +0000 (11:42 -0600)]
dquote.c: Use UTF8_SAFE_SKIP

Otherwise malformed input could cause this to return a pointer outside
its buffer

4 years agoAdd UTF8_SAFE_SKIP API macro
Karl Williamson [Wed, 13 Mar 2019 17:41:09 +0000 (11:41 -0600)]
Add UTF8_SAFE_SKIP API macro

This version of UTF8SKIP refuses to advance beyond the end pointer

4 years agoperldiag: A deprecation is now fatal
Karl Williamson [Wed, 13 Mar 2019 16:38:13 +0000 (10:38 -0600)]
perldiag: A deprecation is now fatal

4 years agot/re/pat_advanced.t: Change some ok's to like's
Karl Williamson [Tue, 12 Mar 2019 22:21:27 +0000 (16:21 -0600)]
t/re/pat_advanced.t: Change some ok's to like's

4 years agoEncode: synch with CPAN version 3.01
Dan Kogai [Wed, 13 Mar 2019 02:09:18 +0000 (22:09 -0400)]
Encode: synch with CPAN version 3.01

4 years agotoke.c: Clarify comment
Karl Williamson [Tue, 12 Mar 2019 21:47:15 +0000 (15:47 -0600)]
toke.c: Clarify comment

4 years agot/re/pat_advanced.t: Add some comments
Karl Williamson [Tue, 12 Mar 2019 21:20:29 +0000 (15:20 -0600)]
t/re/pat_advanced.t: Add some comments

4 years agoAdd tests for wildcards in Unicode property values
Karl Williamson [Tue, 12 Mar 2019 17:36:48 +0000 (11:36 -0600)]
Add tests for wildcards in Unicode property values

4 years agoAdd Unicode property wildcards
Karl Williamson [Mon, 11 Mar 2019 23:16:34 +0000 (17:16 -0600)]
Add Unicode property wildcards

4 years agoregen/mk_invlists.pl: Add tables for Unicode wildcards
Karl Williamson [Mon, 11 Mar 2019 21:55:54 +0000 (15:55 -0600)]
regen/mk_invlists.pl: Add tables for Unicode wildcards

This supports this new feature.

4 years agoAdd warnings category experimental::uniprop_wildcards
Karl Williamson [Mon, 11 Mar 2019 19:14:36 +0000 (13:14 -0600)]
Add warnings category experimental::uniprop_wildcards

4 years agois_invlist(): Allow NULL input
Karl Williamson [Thu, 7 Mar 2019 22:31:58 +0000 (15:31 -0700)]
is_invlist(): Allow NULL input

For generality, it should allow a NULL and return FALSE.

4 years agoperlunicode: Update, clarify
Karl Williamson [Mon, 11 Mar 2019 23:10:06 +0000 (17:10 -0600)]
perlunicode: Update, clarify

This updates to match the latest Unicode document on regular
expressions, and to incorporate changes that have happened to Perl that
didn't get updated here.  It also includes new clarifications about some
of the Unicode requirements.

4 years agoperlapi: Clarify entry for hv_store()
Karl Williamson [Thu, 7 Mar 2019 22:29:28 +0000 (15:29 -0700)]
perlapi: Clarify entry for hv_store()

4 years agoregen/mk_invlists.pl: Remove stray debugging stmts
Karl Williamson [Mon, 11 Mar 2019 17:18:18 +0000 (11:18 -0600)]
regen/mk_invlists.pl: Remove stray debugging stmts

These debugging lines were left in by 21c34e9717d

4 years agoregen/mk_invlists.pl: Comment/white-space only
Karl Williamson [Sat, 9 Mar 2019 18:09:01 +0000 (11:09 -0700)]
regen/mk_invlists.pl: Comment/white-space only

4 years agoregen/mk_invlists.pl, lib/utf8_heavy.pl: Rename variable
Karl Williamson [Sat, 9 Mar 2019 16:43:45 +0000 (09:43 -0700)]
regen/mk_invlists.pl, lib/utf8_heavy.pl: Rename variable

This renames a variable to more accurately reflect its content, and adds
a new one which has the old name but with an accurate content.

4 years agocharclass_invlists.h: Add comment
Karl Williamson [Thu, 7 Mar 2019 22:14:56 +0000 (15:14 -0700)]
charclass_invlists.h: Add comment

4 years agot/re/reg_mesg.t: Add test
Karl Williamson [Sat, 9 Mar 2019 18:48:20 +0000 (11:48 -0700)]
t/re/reg_mesg.t: Add test

4 years agofix blead on non-threaded builds
David Mitchell [Tue, 12 Mar 2019 07:10:10 +0000 (07:10 +0000)]
fix blead on non-threaded builds

My recent v5.29.8-64-g02a9632ac4 commit broke unthreaded builds.
This is the obvious fix. I've heard a report that unthreaded perl
SEGVs now but can't reproduce.

4 years agoFix leak on syntax error in main prog
David Mitchell [Mon, 11 Mar 2019 16:18:10 +0000 (16:18 +0000)]
Fix leak on syntax error in main prog

t/lib/croak.t was failing several tests under ASan because it was
running small stand-alone programs with some sort of error in, such as

    BEGIN { }
    myfunc 1;

Unlike other code paths (such as S_doeval_compile() for evals),
Perl_newPROG() - when called for the main body rather than for a
completed eval - was calling cv_forget_slab() on PL_compcv regardless of
whether an error was present. That call converts  the compiling CV into
a compiled one, which disclaims ownership of the slab(s) its ops are
embedded in. This means that when the CV is freed, ops within the slab
which aren't embedded within the PL_main_root tree would leak.

Such ops may exist when Perl_newPROG() is reached after one of more
errors.

The fix is simply to not call cv_forget_slab() if the error count is > 0.

4 years agofix leak when compiling typed hash deref
David Mitchell [Fri, 8 Mar 2019 08:40:29 +0000 (08:40 +0000)]
fix leak when compiling typed hash deref

In something like

    my Foo $h;
    $h->{bad_key}

perl will croak if package Foo defines valid %FIELDS and  bad_key isn't
one of them. This croak happens during the second pass in
S_maybe_multideref(), which is trying to convert $h->{bad_key} into a
single multideref op. Since the aux buffer is allocated at the end of
the first pass, the buffer leaks.

The fix is to do the check in the first pass, which has been done by
adding an extra boolean flag to S_check_hash_fields_and_hekify(),
indicating whether to just check or actually do it.

4 years agoDon't use utf8_heavy.pl unless needed
Karl Williamson [Fri, 8 Mar 2019 16:45:37 +0000 (09:45 -0700)]
Don't use utf8_heavy.pl unless needed

Prior to this commit 'use utf8' loaded utf8_heavy.pl.  But previous
commits in the 5.29 series mean it is not needed from the core unless a
tr/// is using UTF-8, a much less likely occurrence.  So load it only on
demand

4 years agoupgrade ExtUtils::Manifest from version 1.71 to 1.72
Karen Etheridge [Sun, 10 Mar 2019 20:33:58 +0000 (13:33 -0700)]
upgrade ExtUtils::Manifest from version 1.71 to 1.72

4 years agoperldelta for fd879d933c2a2ee22ac6e2462acc016aa033854d
Karl Williamson [Mon, 2 Jul 2018 04:39:47 +0000 (22:39 -0600)]
perldelta for fd879d933c2a2ee22ac6e2462acc016aa033854d

This patch causes pack to die rather than return malformed UTF-8.  This
protects the rest of the core from unexpectedly getting malformed
inputs.

4 years agoPATCH: [perl #131642] pack returning malformed UTF-8
Karl Williamson [Mon, 2 Jul 2018 04:39:47 +0000 (22:39 -0600)]
PATCH: [perl #131642] pack returning malformed UTF-8

This patch causes pack to die rather than return malformed UTF-8.  This
protects the rest of the core from unexpectedly getting malformed
inputs.

4 years agoPATCH: [perl #133876] Write out of bounds
Karl Williamson [Fri, 8 Mar 2019 17:01:48 +0000 (10:01 -0700)]
PATCH: [perl #133876] Write out of bounds

This was caused by a lapse on my part about the inputs to this function
that grows memory.  I was thinking the trailing NUL was included, but
it's not.  This patch adds space for that to all calls of
sv_utf8_upgrade_flags_grow() in the file.

But it occurs to me that maybe the function itself should just add one
instead of having the caller do it.  If you think so, let me know.

4 years agoperldelta for d22170b0f355 through bf3e41ff5d42
Tony Cook [Fri, 8 Mar 2019 00:08:53 +0000 (11:08 +1100)]
perldelta for d22170b0f355 through bf3e41ff5d42

4 years ago(perl #124203) fix a similar problem with DB::lsub
Tony Cook [Thu, 28 Feb 2019 00:53:19 +0000 (11:53 +1100)]
(perl #124203) fix a similar problem with DB::lsub

4 years agobump $DB::VERSION for perl5db.pl to 1.55
Tony Cook [Wed, 27 Feb 2019 04:29:23 +0000 (15:29 +1100)]
bump $DB::VERSION for perl5db.pl to 1.55

4 years agobump $threads::shared::VERSION to 1.60
Tony Cook [Wed, 27 Feb 2019 04:28:37 +0000 (15:28 +1100)]
bump $threads::shared::VERSION to 1.60

4 years ago(perl #124203) avoid a deadlock in DB::sub
Tony Cook [Wed, 27 Feb 2019 01:01:40 +0000 (12:01 +1100)]
(perl #124203) avoid a deadlock in DB::sub

I don't know how this ever worked.

Previously, DB::sub() would hold a lock on $DB::DBGR for it's entire
body, including the call to the subroutine being called.

This could cause problems in two cases:

a) on creation of a new thread, CLONE() is called in the context of
the new interpreter before the new thread is created.  So you'd have a
sequence like:

  threads->new
  DB::sub for threads::new (lock $DBGR)
  call into threads::new which creates a new interpreter
  Cwd::CLONE() (in the new interpreter)
  DB::sub for Cwd::CLONE (in the new interpreter) (deadlock trying to lock $DBGR)

One workaround I tried for this was to prevent pp_entersub calling
DB::sub if we were cloning (by checking PL_ptr_table).  This did
improve matters, but wasn't needed in the final patch.

Note that the recursive lock on $DBGR would have been fine if the new
code was executing in the same interpreter, since the locking code
simply bumps a reference count if the current interpreter already
holds the lock.

b) when the called subroutine blocks.  For the test case this could
happen with the call to $thr->join.  There would be a sequence like:

  (parent) $thr->join
  (parent) DB::sub for threads::join (lock $DBGR)
  (parent) call threads::join and block
  (child) try to call main::sub1
  (child) DB::sub for main::sub1 (deadlock trying to lock $DBGR)

This isn't limited to threads::join obviously, one thread could be
waiting for input, sleeping, or performing a complex calculation.

The solution I chose here was the obvious one - don't hold the lock
for the actual call.

This required some rearrangement of the code and removed some
duplication too.

4 years agoadd extra lock tracing to threads::shared
Tony Cook [Wed, 27 Feb 2019 01:01:12 +0000 (12:01 +1100)]
add extra lock tracing to threads::shared

This was useful in tracing the cause for the deadlock in #124203.

This can be enabled during a build of perl by adding:

  -Accflags=-DSHARED_TRACE_LOCKS -DDEBUGGING

to the Configure command-line.

To see the trace at run-time add -DU or -DUv to the perl command-line.

The original DEBUG_LOCKS tracing using warn caused extra calls
confusing back traces when trying to debug this problem.

4 years agoPATCH: [perl #133882] Assertion failure
Karl Williamson [Thu, 7 Mar 2019 20:44:34 +0000 (13:44 -0700)]
PATCH: [perl #133882] Assertion failure

The asserts in this routine were doing there job.  It was called
inappropriately, with len set to 0, which means for it that it's
supposed to calculate the length by using strlen().  But, len being 0
here meant that the input was empty.  When run under valgrind, errors
would also show up.

This function was being called to see if the string had any characters
that varied depending on if it is UTF-8 or not.  Since we know that the
answer is no if the length is 0, we simply don't call this function
then.

4 years agot/re/subst.t: Fix typo in comment
Karl Williamson [Thu, 7 Mar 2019 20:44:14 +0000 (13:44 -0700)]
t/re/subst.t: Fix typo in comment

4 years agoregexec.c: Rule out match sooner
Karl Williamson [Thu, 7 Mar 2019 18:40:25 +0000 (11:40 -0700)]
regexec.c: Rule out match sooner

If this function is passed a regnode that won't match a non-UTF-8
string, we can fail immediately if the string isn't UTF-8.

4 years agoregexec.c: Improve comments for a function
Karl Williamson [Thu, 7 Mar 2019 18:39:49 +0000 (11:39 -0700)]
regexec.c: Improve comments for a function

4 years agoPATCH: [perl #133899] panic in s///
Karl Williamson [Thu, 7 Mar 2019 18:37:21 +0000 (11:37 -0700)]
PATCH: [perl #133899] panic in s///

Thanks for finding this bug, and the others you've been finding.

A new regnode was added, but this function was not updated to account
for that.  I've now checked all the other new regnodes in 5.29 and this
was the only missing one.

4 years agoAdd hook for Unicode private use override
Karl Williamson [Thu, 7 Mar 2019 00:50:23 +0000 (17:50 -0700)]
Add hook for Unicode private use override

I am starting to write a Unicode::Private_Use module which will allow
one to specify the Unicode properties of private use code points, thus
making them actually useful.  This commit adds a hook to regcomp.c to
accommodate this module.  The changes are pretty minimal.  This way we
don't have to wait another release cycle to get it out there.

I don't want to document this interface, until it's proven.

4 years agofix CvFILE() leak in Perl_newATTRSUB_x()
David Mitchell [Thu, 7 Mar 2019 10:23:04 +0000 (10:23 +0000)]
fix CvFILE() leak in Perl_newATTRSUB_x()

When overwriting cv with the contents of PL_compcv, it was checking the
CvDYNFILE(cv) flag (to see if CvFILE(cv) needed freeing) *after*
overwriting cv's flags with PL_compcv's flag.

4 years agoImprove description of CVf_DYNFILE flag
David Mitchell [Thu, 7 Mar 2019 10:21:25 +0000 (10:21 +0000)]
Improve description of CVf_DYNFILE flag

4 years agoadd comments above Perl_newSTUB()
David Mitchell [Thu, 7 Mar 2019 08:42:59 +0000 (08:42 +0000)]
add comments above Perl_newSTUB()

4 years agofix leak in regex re-entrant capture buffer
David Mitchell [Wed, 6 Mar 2019 16:13:45 +0000 (16:13 +0000)]
fix leak in regex re-entrant capture buffer

When a regex is about to be executed, if it is the same regex as
PL_curpm, then its 'offs' capture-indices buffer is saved in a local var
pointer and a new one allocated. At the end of execution, depending on
success or failure, the old buffer is restored and the new freed, or
vice versa.

However, if the regex dies during execution, e.g. /(?{ die })/
then the old buffer will leak.

So use SAVEFREEPV() on the old buffer, and change the 'restore on
failure' behaviour - always free the old buffer and keep the new
buffer, and instead copy the old indices to the new buffer.

4 years agofix leak in /[(?{]/
David Mitchell [Wed, 6 Mar 2019 10:36:23 +0000 (10:36 +0000)]
fix leak in /[(?{]/

This pattern is correctly interpreted by the parser as not containing
any code blocks, e.g. (?{...}). It's then passed to the regex compiler,
which thinks it may after all contain a code block not seen before (e.g.
interpolated in at runtime). So it evals the code qr'[(?{]' to compile
any code blocks.  Again the parser doesn't see any code blocks, so the
regex compiler realises it was wrong, and attempts to free the hidden
anon CV associated with compiling a qr// (this CV would take ownership
of any found code blocks, but is empty apart from a single OP_CONST
containing the text of regex).

This freeing of the CV was going wrong, resulting in the op slab(s)
associated with the anon CV leaking.

This was because cv_forget_slab(PL_compcv) was being called, which
converts a compiling CV into a compiled  CV, where CvSTART() no longer
points to the op slab, and instead the slab can only be accessed
indirectly via the ops in CvROOT().

Then when the CV is freed, because it is no longer marked as SvSLABBED,
the freeing code assumes that any associated ops are attached via
SvROOT() - but they haven't been yet - they're still sitting on the
yyparse stack. So they leak.

The solution seems to be a simple as removing the call to
cv_forget_slab().

I sort of understood this as I wrote this commit message, but it's
fading already. Don't ask me to explain this in a week's time, let alone
next year.

4 years agodocs for op slab functions
David Mitchell [Tue, 5 Mar 2019 10:24:30 +0000 (10:24 +0000)]
docs for op slab functions

Add some basic code comments at the top of each function associated
with allocating and freeing OP slabs.

4 years agoCheck for \n in EBCDIC code pages
Karl Williamson [Wed, 6 Mar 2019 21:00:10 +0000 (14:00 -0700)]
Check for \n in EBCDIC code pages

IBM says that there are 13 characters whose code point varies depending
on the EBCDIC code page.  They fail to mention that the \n character may
also vary.  This commit adds checks for \n, in addition to the checks
for the 13 graphic variant ones.

4 years agodocs (incl. perldelta) for aa8a2baafac
Karl Williamson [Wed, 6 Mar 2019 21:22:22 +0000 (14:22 -0700)]
docs (incl. perldelta) for aa8a2baafac

4 years agoUse POSIX locale functions if setlocale not available
Karl Williamson [Mon, 4 Mar 2019 21:00:41 +0000 (14:00 -0700)]
Use POSIX locale functions if setlocale not available

POSIX 2008 added an independent set of locale handling functions beyond
the venerable setlocale.  This commit changes so they can be used rather
than have no locale handling if there is, say, a problem with setlocale.

4 years agoperldelta for Unicode 12.0
Karl Williamson [Mon, 4 Mar 2019 23:15:39 +0000 (16:15 -0700)]
perldelta for Unicode 12.0

4 years agoUse Unicode 12.0
Unicode Consortium [Mon, 4 Mar 2019 23:08:22 +0000 (16:08 -0700)]
Use Unicode 12.0

Unicode 12.0 is finalized.  Change to use it.

4 years agoMerge branch 'crippled_locales' into blead
Karl Williamson [Mon, 4 Mar 2019 20:03:02 +0000 (13:03 -0700)]
Merge branch 'crippled_locales' into blead

This adds Configure probes to find platforms that have crippled locale
implementations, in which they pretend that they allow for locales, but
really don't.  Then use these probe results to inform our locale
handling; otherwise our locale tests on such systems would otherwise
fail.

4 years agoProperly handle systems with crippled locales
Karl Williamson [Mon, 4 Mar 2019 19:27:59 +0000 (12:27 -0700)]
Properly handle systems with crippled locales

Some systems fake their locales, so that they pretend to accept a locale
change, but they either do nothing, making everything the C locale, or
on some systems there is a a second locale "C-UTF-8" that can be
switched to.  Configure probes have been added to find such systems, and
this commit changes to use the results of these probes, so that we don't
try looking for other locales (any names we came up with would be
accepted as valid, but don't work, and tests were failing as a result).

Anything running the musl library fits, as does OpenBSD and its kin, as
they view locales as security risks.  This commit allows us to take out
some code that was looking for particular OS's.

4 years agot/loc_tools.pl: Only try C.UTF-8 if Configure says avail
Karl Williamson [Mon, 4 Mar 2019 18:56:05 +0000 (11:56 -0700)]
t/loc_tools.pl: Only try C.UTF-8 if Configure says avail

I added a Configure probe for this capability, since some platforms will
say yes to any locale name, so we can't really test for it in perl.

4 years agolocale.c: Tighten turkish locale tests on C99 platforms
Karl Williamson [Sun, 17 Feb 2019 05:01:44 +0000 (22:01 -0700)]
locale.c: Tighten turkish locale tests on C99 platforms

C99 has wide character case changing.  If those are available, use them
to be surer we have a Turkic locale.

4 years agoImprove setlocale() detection in Configure-ish files
Karl Williamson [Sun, 17 Feb 2019 05:12:41 +0000 (22:12 -0700)]
Improve setlocale() detection in Configure-ish files

This also now notes some behavior of setlocale

4 years agoAdd towupper() and towlower() to Configure-ish files
Karl Williamson [Sun, 17 Feb 2019 04:55:12 +0000 (21:55 -0700)]
Add towupper() and towlower() to Configure-ish files

4 years agoAdd wctype.h to Configure-ish files
Karl Williamson [Sun, 17 Feb 2019 04:31:29 +0000 (21:31 -0700)]
Add wctype.h to Configure-ish files

4 years agoperl.h: Improve a comment's wording
Karl Williamson [Mon, 4 Mar 2019 18:43:37 +0000 (11:43 -0700)]
perl.h: Improve a comment's wording

4 years agoregcomp.c: Silence compiler warning msg.
Karl Williamson [Mon, 4 Mar 2019 18:28:13 +0000 (11:28 -0700)]
regcomp.c: Silence compiler warning msg.

Some compilers aren't smart enough to realize there is no path through
this function that doesn't set the return value.  So initialize to an
illegal value.

Spotted by atoomic

4 years agolocale.c: Fix grammar in comment
Karl Williamson [Mon, 4 Mar 2019 18:26:04 +0000 (11:26 -0700)]
locale.c: Fix grammar in comment

4 years agolib/locale.t: Improve wording of test name
Karl Williamson [Mon, 4 Mar 2019 18:25:22 +0000 (11:25 -0700)]
lib/locale.t: Improve wording of test name

4 years agoperlop: Improve documentation for (mostly) tr///
Karl Williamson [Tue, 19 Feb 2019 00:57:11 +0000 (17:57 -0700)]
perlop: Improve documentation for (mostly) tr///

This adds examples and clarifications

4 years agoebcdic_tables.h: Remove alien '#'
Karl Williamson [Mon, 4 Mar 2019 17:30:38 +0000 (10:30 -0700)]
ebcdic_tables.h: Remove alien '#'

These were introduced in c05125c57fd7868af65366bacb6fe40c04b1c719 in
July 2018, and would cause any EBCDIC compilations to fail.

That I found it by code inspection shows that we've lost all our EBCDIC
smokers again.

4 years agoregen/ebcdic.pl: Move code to function
Karl Williamson [Mon, 4 Mar 2019 17:20:35 +0000 (10:20 -0700)]
regen/ebcdic.pl: Move code to function

This is for eventual use in being called from more than one place.

4 years agoFix dup_warnings()
Karl Williamson [Wed, 27 Feb 2019 22:09:07 +0000 (15:09 -0700)]
Fix dup_warnings()

It turns out that some Configure options cause this to be called with a
NULL parameter. (I didn't check, but my guess is it's threaded builds.)
That means that the embed.fnc entry should be NULLOK for the parameter.
And that means that embed.fnc doesn't generate an ARGS_ASSERT macro, so
that should be removed from the function.

(I actually think it should generate an empty ARGS_ASSERT that could be
included or not, so that code wouldn't have to change if a parameter
became required to be non-null or vice versa.  The porting test would
only check for non-empty macros being present.  But this is for another
day.)

The reason it works as-was with a NULL parameter is because of an
apparent coincidence: specialWARN() is called first thing in this
function and thinks a NULL is a defined marker for a particular meaning,
so the function immediately returns.  This commit makes that explicit
rather than relying on the apparent coincidence.

4 years agoAdd missing ARGS_ASSERT
Karl Williamson [Wed, 27 Feb 2019 16:28:05 +0000 (09:28 -0700)]
Add missing ARGS_ASSERT

From c1e47bad34ce1d9c84ed57c9b8978bcbd5a02e98

4 years agoadd Perl_dup_warnings() and fix leak
David Mitchell [Mon, 25 Feb 2019 13:05:04 +0000 (13:05 +0000)]
add Perl_dup_warnings() and fix leak

The macro DUP_WARNINGS() was doing (approximately)

    new = CopyD(old, malloc(size), size);

which, depending on how the CopyD macro expanded (e.g. on debugging
builds), could result in its arguments being used multiple times, and
thus malloc() being called multiple times, with the result of the
earlier call(s) then leaking.

Fix this by implementing DUP_WARNINGS using a new function,
Perl_dup_warnings() that stores its intermediate values in local vars.

This function isn't performance critical, as its usually only called
once per cop creation at compile time.

4 years agot/re/pat.t: avoid failing test under ASan
David Mitchell [Sun, 24 Feb 2019 12:53:20 +0000 (12:53 +0000)]
t/re/pat.t: avoid failing test under ASan

4 years agoperldelta for 7d0a46b7159e
Tony Cook [Mon, 25 Feb 2019 00:52:24 +0000 (11:52 +1100)]
perldelta for 7d0a46b7159e

4 years agobump $PerlIO::encoding::VERSION
Tony Cook [Mon, 25 Feb 2019 00:40:14 +0000 (11:40 +1100)]
bump $PerlIO::encoding::VERSION

4 years ago(perl #131683) enable warnings for the block that tests for warnings
Tony Cook [Mon, 25 Feb 2019 00:00:35 +0000 (11:00 +1100)]
(perl #131683) enable warnings for the block that tests for warnings

4 years agoPerlIO::encoding: Use Encode::ONLY_PRAGMA_WARNINGS in fallback by default
Pali [Sat, 1 Jul 2017 10:34:25 +0000 (12:34 +0200)]
PerlIO::encoding: Use Encode::ONLY_PRAGMA_WARNINGS in fallback by default

This would enable to respect utf8 warnings enabled/disabled by pramga
warnings when processing filehandle with :encoding layer.

4 years agoperldelta for 238f2c136aa0
Tony Cook [Sun, 24 Feb 2019 23:41:09 +0000 (10:41 +1100)]
perldelta for 238f2c136aa0

4 years agoAdd newSVsv_nomg() macro which is like newSVsv() but does not process get magic
Pali [Thu, 7 Feb 2019 13:10:35 +0000 (14:10 +0100)]
Add newSVsv_nomg() macro which is like newSVsv() but does not process get magic

Both newSVsv() and newSVsv_nomg() are now implemented via new Perl_newSVsv_flags() function.

4 years agoupgrade cpan/JSON-PP from 4.00 to 4.02
David Mitchell [Sat, 23 Feb 2019 12:27:17 +0000 (12:27 +0000)]
upgrade cpan/JSON-PP from 4.00 to 4.02

4.02 2019-02-23
    - fix a test that breaks if perl is compiled with
      -Dquadmath (RT-128589)

4.01 2019-02-22
    - allow to pass indent_length to json_pp (GH#46)

4 years agoPerl_op_sibling_splice(0 remove dead code
David Mitchell [Fri, 22 Feb 2019 10:59:23 +0000 (10:59 +0000)]
Perl_op_sibling_splice(0 remove dead code

Spotted by Coverity.

We've already checkerd earlier on that at least one of parent and start
is non-null, so the line in question can never be reached. Turn it into
an assertion instead.

4 years agoEpigraph for 5.29.8
Nicolas R [Thu, 21 Feb 2019 22:27:02 +0000 (15:27 -0700)]
Epigraph for 5.29.8

4 years agothey seek him here, they seek him there
Chris 'BinGOs' Williams [Thu, 21 Feb 2019 11:11:58 +0000 (11:11 +0000)]
they seek him here, they seek him there

4 years agofix for Module/CoreList.pm 5.029009
Nicolas R [Thu, 21 Feb 2019 06:34:27 +0000 (23:34 -0700)]
fix for Module/CoreList.pm 5.029009

damn it Nico..

4 years agoUpdate Module::CoreList for 5.29.9
Nicolas R [Thu, 21 Feb 2019 06:18:33 +0000 (23:18 -0700)]
Update Module::CoreList for 5.29.9

4 years agoBump the perl version in various places for 5.29.9
Nicolas R [Thu, 21 Feb 2019 06:11:11 +0000 (23:11 -0700)]
Bump the perl version in various places for 5.29.9

4 years agoNew perldelta for 5.29.9
Nicolas R [Thu, 21 Feb 2019 06:04:45 +0000 (23:04 -0700)]
New perldelta for 5.29.9

4 years agoTick! 5.29.8
Nicolas R [Thu, 21 Feb 2019 06:01:27 +0000 (23:01 -0700)]
Tick! 5.29.8

4 years agoExtra advice to release_managers_guide.pod
Nicolas R [Thu, 21 Feb 2019 05:11:03 +0000 (22:11 -0700)]
Extra advice to release_managers_guide.pod

4 years ago(perl #133778) adjust MARK if we extend the stack in pp_repeat
Tony Cook [Tue, 5 Feb 2019 23:37:58 +0000 (10:37 +1100)]
(perl #133778) adjust MARK if we extend the stack in pp_repeat

for a list repeat in scalar/void context

4 years agoBump Devel::PPPort to 3.44 for CPAN release v5.29.8
Nicolas R [Wed, 20 Feb 2019 23:15:28 +0000 (16:15 -0700)]
Bump Devel::PPPort to 3.44 for CPAN release

During v5.29.8 dev cycle a change was made to Devel-PPPort
18d728ac3b which justify to bump and release a new
version of Devel::PPPort.

4 years agoAdd 5.29.8 release to pod/perlhist
Nicolas R [Wed, 20 Feb 2019 20:58:44 +0000 (13:58 -0700)]
Add 5.29.8 release to pod/perlhist

4 years agoAdd XS::APItest to unclaimedModules in corelist-perldelta.pl
Nicolas R [Wed, 20 Feb 2019 19:23:50 +0000 (12:23 -0700)]
Add XS::APItest to unclaimedModules in corelist-perldelta.pl

Without this change corelist-perldelta.pl would not see the
changes from XS::APItest.

    ./perl -Ilib Porting/corelist-perldelta.pl \
        --mode=update pod/perldelta.pod

4 years agoUpdate Module::CoreList for 5.19.8
Nicolas R [Wed, 20 Feb 2019 18:34:52 +0000 (11:34 -0700)]
Update Module::CoreList for 5.19.8

4 years agoPerldelta final massage for 5.29.8 release
Nicolas R [Wed, 20 Feb 2019 17:22:48 +0000 (10:22 -0700)]
Perldelta final massage for 5.29.8 release

Update perldelta file with recent changes
and perform some extra cleanup.

4 years agoAdd more Travis CI flavors to the matrix
Nicolas R [Thu, 14 Feb 2019 20:57:11 +0000 (13:57 -0700)]
Add more Travis CI flavors to the matrix

This configuration is going to considerably slowing
down smokes but this is a useful alternate when
preparing a release.

We can probably consider commenting these extra config
and only check them for release. Or we could also provide
two travis.yaml:
- .travis.yml.light
- .travis.yml.full

And use a symlink depending which one we want to use.

4 years agoAdd note for BLEAD point release to release_managers_guide.pod
Nicolas R [Wed, 20 Feb 2019 16:32:59 +0000 (09:32 -0700)]
Add note for BLEAD point release to release_managers_guide.pod

Add note concerning the bump of PERL_API_* constants
for blead point releases.

4 years agoTime-HiRes 1.9760 - bump Module::CoreList & co
Nicolas R [Wed, 20 Feb 2019 00:04:33 +0000 (17:04 -0700)]
Time-HiRes 1.9760 - bump Module::CoreList & co

Also bump Porting/Maintainers.pl to synchronize
with the upstream version we are using.

4 years agoDevel::PPPort: Fix D_PPP_FIX_UTF8_ERRSV macro
Pali [Thu, 14 Feb 2019 11:35:23 +0000 (12:35 +0100)]
Devel::PPPort: Fix D_PPP_FIX_UTF8_ERRSV macro

It should use errsv value from passed argument.

4 years agoperldelta for 125ddee8ebdb, 2e51033c15c9
Tony Cook [Wed, 20 Feb 2019 00:53:58 +0000 (11:53 +1100)]
perldelta for 125ddee8ebdb2e51033c15c9

4 years agotest for error set on socket() failure origin/tonyc/socket-error
Tony Cook [Tue, 19 Feb 2019 23:57:19 +0000 (10:57 +1100)]
test for error set on socket() failure