This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
12 months agoUpdate Module-CoreList with data for 5.28.3 and 5.30.3
Steve Hay [Mon, 1 Jun 2020 19:53:08 +0000 (20:53 +0100)]
Update Module-CoreList with data for 5.28.3 and 5.30.3

12 months agoTick off 5.28.3 and 5.30.3
Steve Hay [Mon, 1 Jun 2020 19:44:38 +0000 (20:44 +0100)]
Tick off 5.28.3 and 5.30.3

12 months agoAdd epigraphs for 5.28.3 and 5.30.3
Steve Hay [Mon, 1 Jun 2020 19:43:21 +0000 (20:43 +0100)]
Add epigraphs for 5.28.3 and 5.30.3

12 months agostudy_chunk: honour mutate_ok over recursion
Hugo van der Sanden [Tue, 28 Apr 2020 17:52:44 +0000 (18:52 +0100)]
study_chunk: honour mutate_ok over recursion

As described in #17743, study_chunk can re-enter itself either by
simple recursion or by enframing. 089ad25d3f used the new mutate_ok
variable to track whether we were within the framing scope of GOSUB,
and to disallow mutating changes to ops if so.

This commit extends that logic to reentry by recursion, passing in
the current state as was_mutate_ok.

(CVE-2020-12723)

(cherry picked from commit 3445383845ed220eaa12cd406db2067eb7b8a741)

12 months agoregcomp.c: Prevent integer overflow from nested regex quantifiers.
John Lightsey [Thu, 21 Nov 2019 02:02:45 +0000 (20:02 -0600)]
regcomp.c: Prevent integer overflow from nested regex quantifiers.

(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.

Fixes: Perl/perl5-security#125
(cherry picked from commit 670c54b00a47d930431dd470e72fd7d13643e169)

12 months agoregcomp: use long jumps if there is any possibility of overflow
Karl Williamson [Thu, 20 Feb 2020 17:49:36 +0000 (17:49 +0000)]
regcomp: use long jumps if there is any possibility of overflow

(CVE-2020-10878) Be conservative for backporting, we'll aim to do
something more aggressive for bleadperl.

(cherry picked from commit 8243e7d09fa7bd65b70935e3170c6abda3e34917)

12 months agostudy_chunk: extract rck_elide_nothing
Hugo van der Sanden [Tue, 18 Feb 2020 13:51:16 +0000 (13:51 +0000)]
study_chunk: extract rck_elide_nothing

(CVE-2020-10878)

(cherry picked from commit 4fccd2d99bdeb28c2937c3220ea5334999564aa8)

12 months agoMinor tweaks to perldelta.pod
Richard Leach [Mon, 1 Jun 2020 16:59:30 +0000 (17:59 +0100)]
Minor tweaks to perldelta.pod

Remove duplicate entry of "It is now possible to write C<qr/\p{Name=...}/>, or C<\p{Na=...}>"
Fix probably typo in "features *we* set outside of a feature bundle"
Move streamzip entry from "Configure and Compilation" to "Utility Changes"

12 months agoperldelta: remove blead-only regressions from changelog
Sergey Aleynikov [Sun, 31 May 2020 14:47:28 +0000 (17:47 +0300)]
perldelta: remove blead-only regressions from changelog

12 months agos/Github/GitHub/
Karen Etheridge [Sat, 30 May 2020 22:43:14 +0000 (15:43 -0700)]
s/Github/GitHub/

12 months agoperldelta: move windows-specific bugfix to the right section
Tomasz Konojacki [Sat, 30 May 2020 21:13:07 +0000 (23:13 +0200)]
perldelta: move windows-specific bugfix to the right section

12 months agoperldelta: mention sort optimization
Tomasz Konojacki [Sat, 30 May 2020 21:09:51 +0000 (23:09 +0200)]
perldelta: mention sort optimization

12 months agofix the remaining whitespace changes made in error
Karen Etheridge [Sat, 30 May 2020 19:59:34 +0000 (12:59 -0700)]
fix the remaining whitespace changes made in error

12 months agofix whitespace in error message
Karen Etheridge [Sat, 30 May 2020 19:58:20 +0000 (12:58 -0700)]
fix whitespace in error message

12 months agoedit 5.32.0 perldelta for spelling, grammar, links
Karen Etheridge [Sat, 30 May 2020 19:52:49 +0000 (12:52 -0700)]
edit 5.32.0 perldelta for spelling, grammar, links

- outdated information on Unicode 13.0.0 (beta) removed
- links to RT and github issues added when missing, and normalized
- various small punctuation and grammar fixes
- some pod markup added where it was missing, and syntax mistakes fixed

12 months agodisarmed META.json
Sawyer X [Sat, 30 May 2020 19:36:32 +0000 (22:36 +0300)]
disarmed META.json

12 months agoUpdate epigraph
Sawyer X [Sat, 30 May 2020 18:55:04 +0000 (21:55 +0300)]
Update epigraph

12 months agoMerge branch 'release-5.32.0-RC0' into blead
Sawyer X [Sat, 30 May 2020 18:52:32 +0000 (21:52 +0300)]
Merge branch 'release-5.32.0-RC0' into blead

12 months agoMerge branch 'blead' of github.com:Perl/perl5 into blead
Sawyer X [Sat, 30 May 2020 18:52:15 +0000 (21:52 +0300)]
Merge branch 'blead' of github.com:Perl/perl5 into blead

12 months agodisarm RC0 bump
Sawyer X [Sat, 30 May 2020 18:51:26 +0000 (21:51 +0300)]
disarm RC0 bump

12 months agoUpdate hist v5.32.0-RC0
Sawyer X [Sat, 30 May 2020 15:57:07 +0000 (18:57 +0300)]
Update hist

12 months agoUpdate META files
Sawyer X [Sat, 30 May 2020 15:41:48 +0000 (18:41 +0300)]
Update META files

12 months agoBump version to RC0
Sawyer X [Sat, 30 May 2020 15:41:32 +0000 (18:41 +0300)]
Bump version to RC0

12 months agoPartially reinstate "Perl 6" instead of Raku for mro.pm and feature.pm:
Sawyer X [Sat, 30 May 2020 14:49:18 +0000 (17:49 +0300)]
Partially reinstate "Perl 6" instead of Raku for mro.pm and feature.pm:

Changing those will cause a version change.

12 months agoAdd gitignore
Sawyer X [Sat, 30 May 2020 14:34:29 +0000 (17:34 +0300)]
Add gitignore

12 months agoFixup perldelta files
Sawyer X [Sat, 30 May 2020 13:32:12 +0000 (16:32 +0300)]
Fixup perldelta files

12 months agoMerge all perldelta files
Sawyer X [Sat, 30 May 2020 13:21:17 +0000 (16:21 +0300)]
Merge all perldelta files

12 months agoUpdate Module::CoreList for 5.32.0
Sawyer X [Fri, 29 May 2020 12:24:22 +0000 (15:24 +0300)]
Update Module::CoreList for 5.32.0

12 months agoUpdate META
Sawyer X [Fri, 29 May 2020 12:23:32 +0000 (15:23 +0300)]
Update META

12 months agoBump perl version in various places for 5.32.0
Sawyer X [Fri, 29 May 2020 11:52:52 +0000 (14:52 +0300)]
Bump perl version in various places for 5.32.0

12 months agoPerl 6 -> Raku where appropriate
H.Merijn Brand [Thu, 28 May 2020 12:38:52 +0000 (14:38 +0200)]
Perl 6 -> Raku where appropriate

12 months agoIssue template - Suggest putting perl configuration in fenced code block
Dan Book [Fri, 29 May 2020 20:31:27 +0000 (16:31 -0400)]
Issue template - Suggest putting perl configuration in fenced code block

12 months agoBump perl version in various places for 5.32.0
Sawyer X [Fri, 29 May 2020 11:52:52 +0000 (14:52 +0300)]
Bump perl version in various places for 5.32.0

12 months agoAaron Crane is a moderator
Sawyer X [Wed, 27 May 2020 14:28:30 +0000 (17:28 +0300)]
Aaron Crane is a moderator

12 months agocharnames: Explicitly return undef for empty input
Karl Williamson [Wed, 13 May 2020 04:18:54 +0000 (22:18 -0600)]
charnames: Explicitly return undef for empty input

Rather it returns an empty list for undefined or zero width input names.

This fixes #17768

12 months agoregcomp.c: Improve dump ANYOFR patterns
Karl Williamson [Wed, 12 Feb 2020 16:26:22 +0000 (09:26 -0700)]
regcomp.c: Improve dump ANYOFR patterns

On ASCII platforms, where its easy to calculate, when dumping a pattern,
don't output the lowest first UTF-8 byte when the entire range is ASCII.
The info about this minimum byte is carried in the node, but is ignored
unless the pattern is UTF-8, and in the case of UTF-8 invariant
characters gives no extra help.  The information is quite useful for
large code points, so we can quickly rule out large swaths of potential
matches without having to convert the target UTF-8 string to code point
format.  But for ASCII matches it isn't helpful and dumping it is just
extra noise.

12 months agoop/exec.t: ENOTDIR is a legit errno
Karl Williamson [Thu, 9 Apr 2020 18:02:12 +0000 (12:02 -0600)]
op/exec.t: ENOTDIR is a legit errno

This test file does a system() on a non-existent file, and checks
that an error happens, and that the errno is one that is expected.
Prior to this commit it didn't think that ENOTDIR could happen.

But it can If PATH contains a component that is plain file, or, on some
systems, a component simply doesn't exist.

I examined the possible errnos listed in a Linux man page for this, and
this looked to be the only one that is likely to come up that weren't
already covered.

This fixes GH #17515

12 months agot/re/speed.t: Adapt for sl-o-o-w boxes
Karl Williamson [Sun, 24 May 2020 18:48:35 +0000 (12:48 -0600)]
t/re/speed.t: Adapt for sl-o-o-w boxes

On some slow smokers, this test times out.  There is an existing
mechanism which allows a smoker to compensate for this, but which was
not being used by this test file.  Use it.

12 months agot/re/pat_advanced.t: Adapt for sl-o-o-w boxes
Karl Williamson [Sun, 24 May 2020 19:04:47 +0000 (13:04 -0600)]
t/re/pat_advanced.t: Adapt for sl-o-o-w boxes

On some slow smokers, this test times out.  There is an existing
mechanism which allows a smoker to compensate for this, but which was
not being used by this test file.  Use it.

12 months agore/regexp_nonull.t: Skip if no APItest built
Karl Williamson [Sat, 23 May 2020 14:12:48 +0000 (08:12 -0600)]
re/regexp_nonull.t: Skip if no APItest built

This moves the require to the file that actually uses it, and checks
that it succeeded.

12 months agoop/sub.t: Skip APItest test if that not built
Karl Williamson [Sat, 23 May 2020 13:56:46 +0000 (07:56 -0600)]
op/sub.t: Skip APItest test if that not built

12 months agot/re/anyof.t: Adapt a test for EBCDIC
Karl Williamson [Sun, 24 May 2020 18:42:10 +0000 (12:42 -0600)]
t/re/anyof.t: Adapt a test for EBCDIC

a-z is not contiguous on EBCDIC platforms

12 months agolib/DBM_Filter/t/encode.t: TODO a test on EBCDIC
Karl Williamson [Sun, 24 May 2020 18:55:17 +0000 (12:55 -0600)]
lib/DBM_Filter/t/encode.t: TODO a test on EBCDIC

This depends on Encode which has some problems

12 months agodist/IO/t/cachepropagate-unix.t: Add os390 to TODO list
Karl Williamson [Sun, 24 May 2020 18:51:18 +0000 (12:51 -0600)]
dist/IO/t/cachepropagate-unix.t: Add os390 to TODO list

To TODO a test for

12 months agolib/warnings.t: Fix EBCDIC toke warning wording
Karl Williamson [Wed, 20 May 2020 20:27:41 +0000 (14:27 -0600)]
lib/warnings.t: Fix EBCDIC toke warning wording

12 months agopod/perluniprops: Split run-on lines before '\'
Karl Williamson [Fri, 22 May 2020 13:20:14 +0000 (07:20 -0600)]
pod/perluniprops: Split run-on lines before '\'

This changes mktables, which generates this pod, to consider long pod
lines to be splittable before most backslashes.  On os390, the lack of
this caused a line to not be split at all, creating a Porting test
failure.

There is also a current rule that you can split at a lowercase/uppercase
boundary.  This works for the limited domain this code is run on.  But
it shouldn't split \cK.  So don't do the split if the lowercase is a
single letter preceded by a backslash.

12 months agot/TEST: Skip some cpan module testing on EBCDIC
Karl Williamson [Sun, 24 May 2020 18:40:17 +0000 (12:40 -0600)]
t/TEST: Skip some cpan module testing on EBCDIC

These modules have known problems, varying from one test failing, to not
working at all.  This is a big improvement from earlier releases where
all of cpan testing was entirely ckipped.

12 months agohints/os390.sh: Handle no C optimizations
Karl Williamson [Wed, 27 May 2020 01:42:52 +0000 (19:42 -0600)]
hints/os390.sh: Handle no C optimizations

There is a bug in Configure where it doesn't handle 'none' properly for
platforms which have no flag to indicate don't optimize.  Instead of
fixing this for 5.32 at this late date, change the hints file for os390
to use the equivalent " ", that does work.

12 months agot/re/regexp.t: Fix to properly handle EBCDIC
Karl Williamson [Wed, 20 May 2020 20:27:10 +0000 (14:27 -0600)]
t/re/regexp.t: Fix to properly handle EBCDIC

5.31 commit 2b7f9bbf39f71c0d94db058b0110977a9470c1b2 caused this to not
work at all on EBCDIC platforms.

12 months agoFix tr/// determination of inplace editing for EBCDIC
Karl Williamson [Mon, 25 May 2020 17:15:01 +0000 (11:15 -0600)]
Fix tr/// determination of inplace editing for EBCDIC

I realized as a result of fixing GH #17654, that the code didn't
properly decide if a tr/// can be done in-place on EBCDIC platforms.
Since we didn't have an EBCDIC smoker at the time, I couldn't be sure
that the fix actually worked.  Now that we do have a smoker, I have
successfully tested it.

This patch is constructed so that the code generated on non-EBCDIC
platforms should not be changed by it.

12 months agoset magic on $lex for $lex = (index(...) == -1) and make it an lvalue
Tony Cook [Wed, 22 Apr 2020 05:01:40 +0000 (15:01 +1000)]
set magic on $lex for $lex = (index(...) == -1) and make it an lvalue

related to #17737 and fixes #17739

re-work of my original patch that only pushes the final result

12 months agofix utf8 length magic handling for scalar reverse
Tony Cook [Wed, 22 Apr 2020 01:02:16 +0000 (11:02 +1000)]
fix utf8 length magic handling for scalar reverse

fixes #17737

12 months agoRemove part of comment
Sawyer X [Sun, 24 May 2020 22:02:22 +0000 (01:02 +0300)]
Remove part of comment

12 months agoRevision to hvds patch for #17775
Karl Williamson [Tue, 12 May 2020 17:45:29 +0000 (11:45 -0600)]
Revision to hvds patch for #17775

12 months agopjacklam has an email alias - fix checkAUTHORS.pl
Sawyer X [Sun, 24 May 2020 20:03:47 +0000 (23:03 +0300)]
pjacklam has an email alias - fix checkAUTHORS.pl

12 months agoAdd quadmath to list of libraries.
Peter John Acklam [Sat, 11 Apr 2020 12:28:10 +0000 (14:28 +0200)]
Add quadmath to list of libraries.

12 months agoregcomp.c: Fix leak
Karl Williamson [Sat, 25 Apr 2020 15:28:51 +0000 (09:28 -0600)]
regcomp.c: Fix leak

This leak is the result of my misplacing the frees in an inner block
which isn't always executed after space is allocated; instead of the
next outer where the free will get done.

This fixes # 17729

12 months agoFinally, bump version of File-Glob 17801/head
Sawyer X [Sun, 24 May 2020 05:55:22 +0000 (08:55 +0300)]
Finally, bump version of File-Glob

12 months agoFix File::Glob test:
Sawyer X [Sat, 23 May 2020 23:08:22 +0000 (02:08 +0300)]
Fix File::Glob test:

glob() should not exist. We check this with `->can('glob')`.

12 months agoCorrect text on my() in false conditional
Sawyer X [Sat, 23 May 2020 21:57:57 +0000 (00:57 +0300)]
Correct text on my() in false conditional

12 months agoRemove File::Glob::glob() entirely
Sawyer X [Sat, 23 May 2020 21:46:46 +0000 (00:46 +0300)]
Remove File::Glob::glob() entirely

12 months agoFinalize config_h.SH for the __attribute__(always_inline) probe
Niko Tyni [Fri, 15 May 2020 21:39:28 +0000 (00:39 +0300)]
Finalize config_h.SH for the __attribute__(always_inline) probe

For some reason this comment was not added by commit

 https://github.com/Perl/perl5/commit/e849841dca2a8b11119997585f795647c52cdcdf

but it gets included when regenerating from metaconfig, stemming from

 https://github.com/Perl/metaconfig/commit/829ae3555af6c3549169acf1fab1bd089b442e47

(Also includes regenerated uconfig.h by regen/uconfig_h.pl)

12 months agoFix config_h.SH duplication due to re-running Porting/config_h.pl
Niko Tyni [Sat, 16 May 2020 16:49:23 +0000 (19:49 +0300)]
Fix config_h.SH duplication due to re-running Porting/config_h.pl

Quoting Porting/config_h.pl :

  # This script is run just after metaconfig, and it
  # is run ONLY ONCE. Not to be used afterwards

It looks like e849841dca2a8b11119997585f795647c52cdcdf accidentally did
re-run it, resulting in some duplication in config_h.SH.

(Also includes regenerated uconfig.h by regen/uconfig_h.pl)

12 months agoupdate POSIX POD to indicate that 'to(lower|upper)' were removed
Sergiy Borodych [Sat, 23 May 2020 09:31:20 +0000 (12:31 +0300)]
update POSIX POD to indicate that 'to(lower|upper)' were removed

... since 5.26

They have been removed from the module by a65dc09f8c as leftovers,
but the documentation was not updated

12 months agoSergey Borodych is a perl author
Karl Williamson [Sat, 23 May 2020 13:32:19 +0000 (07:32 -0600)]
Sergey Borodych is a perl author

12 months agoUpdate perlfaq to CPAN version 5.20200523
Karen Etheridge [Fri, 22 May 2020 03:30:45 +0000 (20:30 -0700)]
Update perlfaq to CPAN version 5.20200523

  [DELTA]

5.20200523  2020-05-22 03:28:54Z
  * switch perlbug references to GitHub issue tracker (PR##87, Dan Book)

5.20200522  2020-05-22 02:24:31Z
  * updated perlfaq1 entry on Raku (PR##86, Dan Book)

12 months agoFix a bunch of repeated-word typos
Dagfinn Ilmari Mannsåker [Thu, 23 Apr 2020 13:33:05 +0000 (14:33 +0100)]
Fix a bunch of repeated-word typos

Mostly in comments and docs, but some in diagnostic messages and one
case of 'or die die'.

12 months agoB: Remove duplicate check for split op in walkoptree.t
Dagfinn Ilmari Mannsåker [Thu, 23 Apr 2020 17:14:05 +0000 (18:14 +0100)]
B: Remove duplicate check for split op in walkoptree.t

Commit 5012eebe558 eliminated the pushre op and did a blanket
replacement of pushre with split, but missed that there was already a
check for split in the loop.  Eliminate the duplicate.

12 months agoio_unix.t: make tests run on Windows builds if threads + AF_UNIX
Richard Leach [Thu, 12 Mar 2020 23:56:09 +0000 (23:56 +0000)]
io_unix.t: make tests run on Windows builds if threads + AF_UNIX

io_unix.t: simplify AF_UNIX check on Windows

io_unix.t: make tests run on Windows builds if threads + AF_UNIX

12 months agoeliminate recursion from yyl_fake_eof() into yyl_try()
Tony Cook [Mon, 6 Apr 2020 05:33:08 +0000 (15:33 +1000)]
eliminate recursion from yyl_fake_eof() into yyl_try()

This is intended as a minimal commit due to the current stage
of the release process.

fixes #17268

12 months agoeliminate len from recursive yyl_try/yyl_fake_eof
Tony Cook [Mon, 6 Apr 2020 04:29:03 +0000 (14:29 +1000)]
eliminate len from recursive yyl_try/yyl_fake_eof

len is only used in these functions to pass to the other function when
recursing.

12 months agoremoved unused len parameter from yyl_dblquote()
Tony Cook [Mon, 6 Apr 2020 01:59:52 +0000 (11:59 +1000)]
removed unused len parameter from yyl_dblquote()

The len variable is used, but the value is overwritten before being
read.

12 months agotest that many blank lines doesn't exhaust stack in the tokenizer
Tony Cook [Mon, 6 Apr 2020 05:59:02 +0000 (15:59 +1000)]
test that many blank lines doesn't exhaust stack in the tokenizer

test for #17268

12 months agoperlop - Use a tied scalar directly in chained comparison examples
Dan Book [Tue, 28 Apr 2020 19:38:24 +0000 (15:38 -0400)]
perlop - Use a tied scalar directly in chained comparison examples

12 months agoperlop - Add more examples for chained comparisons
Dan Book [Tue, 28 Apr 2020 19:18:18 +0000 (15:18 -0400)]
perlop - Add more examples for chained comparisons

The distinction between how many times an expression may be evaluated and how many times its result may be fetched is somewhat confusing. This calls out the distinction earlier in the text rather than just buried in a paragraph, and adds examples to help explain the difference.

12 months agoperlsyn - Mention that postfix foreach cannot specify a lexical variable
Dan Book [Thu, 9 Apr 2020 18:27:35 +0000 (14:27 -0400)]
perlsyn - Mention that postfix foreach cannot specify a lexical variable

13 months agoA few small cleanups in Configure
H.Merijn Brand [Tue, 19 May 2020 07:09:32 +0000 (09:09 +0200)]
A few small cleanups in Configure

Meta is now 100% in sync

13 months agopp_sys.c: don't hardcode socket address buffer size
Tomasz Konojacki [Thu, 30 Apr 2020 06:42:40 +0000 (06:42 +0000)]
pp_sys.c: don't hardcode socket address buffer size

When it's possible, use sizeof(struct sockaddr_storage).

fixes #17761

13 months agoadd Configure probe for struct sockaddr_storage
Tomasz Konojacki [Thu, 30 Apr 2020 06:34:41 +0000 (06:34 +0000)]
add Configure probe for struct sockaddr_storage

13 months agoReflect move of metaconfig.git
Dominic Hargreaves [Sun, 17 May 2020 13:19:02 +0000 (14:19 +0100)]
Reflect move of metaconfig.git

13 months agoUpdate release schedule for forthcoming maint releases
Steve Hay [Fri, 15 May 2020 09:33:03 +0000 (10:33 +0100)]
Update release schedule for forthcoming maint releases

13 months agoAdd epigraph for 5.31.11
Steve Hay [Thu, 14 May 2020 11:21:18 +0000 (12:21 +0100)]
Add epigraph for 5.31.11

13 months agoTick 5.31.11 in another place and correct its release date
Steve Hay [Thu, 14 May 2020 11:13:55 +0000 (12:13 +0100)]
Tick 5.31.11 in another place and correct its release date

13 months agotypo "set_locale" should be "setlocale"
Paul Marquess [Tue, 12 May 2020 07:57:41 +0000 (08:57 +0100)]
typo "set_locale" should be "setlocale"

(Committer changed author address to the already-known @cpan one, so
this would pass porting tests.)

13 months agoFixed typemap in perlxs.
Håkon Hægland [Thu, 7 May 2020 18:57:31 +0000 (20:57 +0200)]
Fixed typemap in perlxs.

Fixed quoting and string concatenation mistakes in C++ typemap in perlxs.

Committer: Håkon Hægland is now a Perl author.

13 months agoStore github token after workflow v1 checkout.
John Lightsey [Tue, 14 Apr 2020 23:50:55 +0000 (18:50 -0500)]
Store github token after workflow v1 checkout.

The i386 smoke runs uses the v1 checkout action to function on
an i386 base OS. The v1 checkout action did not persist credentials,
making the subsequent git commands fail on private repos.

13 months agoperlguts.pod - add C<> around a mention of dTHX;
Richard Leach [Sun, 3 May 2020 22:30:29 +0000 (23:30 +0100)]
perlguts.pod - add C<> around a mention of dTHX;

13 months agoSync Encode version 3.06 into blead
Dan Kogai [Sun, 3 May 2020 00:11:05 +0000 (20:11 -0400)]
Sync Encode version 3.06 into blead

Pumpking okayed merge during code freeze.  This addresses:
https://rt.cpan.org/Ticket/Display.html?id=132471

13 months agohandle_names_wildcard: better avoid compiler warning
Dagfinn Ilmari Mannsåker [Thu, 30 Apr 2020 16:56:31 +0000 (17:56 +0100)]
handle_names_wildcard: better avoid compiler warning

instead of casting away the const from a string literal,
declare the variable as a pointer to const char

13 months agohandle_names_wildcard: avoid compiler warning
Hugo van der Sanden [Thu, 30 Apr 2020 13:20:39 +0000 (14:20 +0100)]
handle_names_wildcard: avoid compiler warning

13 months agoFix panic in Unicode wildcard matching
Karl Williamson [Sun, 26 Apr 2020 14:27:25 +0000 (08:27 -0600)]
Fix panic in Unicode wildcard matching

The reason this bug occurs is that wildcard matching changes the anchor
assertions \A, \Z, and \z, without corresponding changes in regexec.c.

We earlier noticed that all these were being marked SIMPLE, and a
zero-width construct shouldn't really be.  But it was considered too
late in the development cycle to make that change.  So the plan was to
live with this bug in an experimental feature in 5.32.

But I eventually realized that the change could be effected for just the
wildcard versions, and this commit does that.  If there is some issue
with making these non-SIMPLE, it will affect only the wildcard feature,
and those potential bugs are better than a known bug.  I also seems
unlikely that this will introduce any bug.  What removing SIMPLE does is
merely remove potential optimizations in the handling.  The most general
case should work.\7f; it's doing an improper optimization that gets one
into trouble.

This fixes #17677

13 months agoregcomp.c: Add assert
Karl Williamson [Tue, 28 Apr 2020 16:27:01 +0000 (10:27 -0600)]
regcomp.c: Add assert

The code's proper functioning currently depends on bracketed character
classes not returning a sequence of characters to the regex sets feature
(?[...])

Add an assert to validate that.

13 months agoregcomp.c: Fix named sequences in (?[...])
Karl Williamson [Wed, 22 Apr 2020 21:37:23 +0000 (15:37 -0600)]
regcomp.c: Fix named sequences in (?[...])

The regex_sets feature cannot yet handle named sequences possibly
returned by \p{name=...}.  I forgot to check for this possibility which
led to a null pointer dereference.  Also, the called function was
returning success when it should have failed in this circumstance.

This fixes #17732

13 months agoregcomp.c: Avoid use after free
Karl Williamson [Tue, 21 Apr 2020 23:30:42 +0000 (17:30 -0600)]
regcomp.c: Avoid use after free

It turns out that the SV returned by re_intuit_string() may be freed by
future calls to re_intuit_start().  Thus, the caller doesn't get clear
title to the returned SV.  (This wasn't documented until the
commit immediately prior to this one.)

Cope with this situation by making a mortalized copy.  This commit also
changes to use the copy's PV directly, simplifying some 'if' statements.

re_intuit_string() is effectively in the API, as it is an element in the
regex engine structure, callable by anyone.  It should not be returning
a tenuous SV.  That returned scalar should not freed before the pattern
it is for is freed.  It is too late in the development cycle to change
this, so this workaround is presented instead for 5.32.

This fixes #17734.

13 months agoregcomp.c: Add comments
Karl Williamson [Wed, 29 Apr 2020 16:47:44 +0000 (10:47 -0600)]
regcomp.c: Add comments

13 months agoWhat can we make with pasta and toilet roll?
Chris 'BinGOs' Williams [Wed, 29 Apr 2020 18:29:00 +0000 (19:29 +0100)]
What can we make with pasta and toilet roll?

13 months agoUpdate repository and bugtracker meta for Module-CoreList
Chris 'BinGOs' Williams [Wed, 29 Apr 2020 18:26:38 +0000 (19:26 +0100)]
Update repository and bugtracker meta for Module-CoreList

13 months agoLink to the definition of true and false from perlsyn
E. Choroba [Tue, 28 Apr 2020 23:43:40 +0000 (01:43 +0200)]
Link to the definition of true and false from perlsyn

There used to be a section on Truth and Falsehood there, as the
following paragraphs talk about conditions and booleans a lot. It was
moved to perldata in 77fae4394e3ad9f159a74a6731a8d347cd2466c7, but
without a trace. Let's have a link to the new destination in the old one.

13 months agoperldiag: Alphabetize two entries
Karl Williamson [Tue, 28 Apr 2020 23:28:18 +0000 (17:28 -0600)]
perldiag: Alphabetize two entries

The order of these  was swapped

13 months agoperldiag: Update text about '{' warnings/death
Karl Williamson [Tue, 28 Apr 2020 23:22:24 +0000 (17:22 -0600)]
perldiag: Update text about '{' warnings/death