This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
2 years agoModern Androids do support locales
Richard Leach [Sun, 19 May 2019 03:50:37 +0000 (03:50 +0000)]
Modern Androids do support locales

2 years agoPATCH: [perl #134117] Close DATA in loc_tools.pl
Richard Leach [Sun, 19 May 2019 20:16:41 +0000 (20:16 +0000)]
PATCH: [perl #134117] Close DATA in loc_tools.pl

This prevents unexpected text in lib/warnings.t

2 years agolocale.c: Fix '%s' directive argument is null
Karl Williamson [Thu, 23 May 2019 16:48:30 +0000 (10:48 -0600)]
locale.c: Fix '%s' directive argument is null

This was just an oversight.  THe code doesn't get executed unless it's
trying to panic

2 years agoasan_ignore: Explicitly list ignored behavior fcns
Karl Williamson [Fri, 3 May 2019 20:30:53 +0000 (14:30 -0600)]
asan_ignore: Explicitly list ignored behavior fcns

Overflow on signed integers is undefined behavior.  Perl does whatever
the underlying compiler does in this case.  Previously this file used a
wildcard which could specify more functions than we really expect to see
this potential overflow from.  It is safer to mention explicitly all the
functions.

2 years agoRemove undefined behavior from IV shifting
Karl Williamson [Fri, 3 May 2019 19:57:47 +0000 (13:57 -0600)]
Remove undefined behavior from IV shifting

It is undefined behavior to shift a negative integer to the left.  This
commit avoids that by treating the value as unsigned, then casting back
to integer for return.

2 years agopp.c: Add two UNLIKELY()s
Karl Williamson [Wed, 1 May 2019 16:41:38 +0000 (10:41 -0600)]
pp.c: Add two UNLIKELY()s

It should be uncommon to shift beyond a full word

2 years agoCreate fcn for lossless conversion of NV to IV
Karl Williamson [Sun, 28 Apr 2019 23:42:44 +0000 (17:42 -0600)]
Create fcn for lossless conversion of NV to IV

Essentially the same code was being used in three places, and had
undefined C behavior for some inputs.

This consolidates the code into one inline function, and rewrites it to
avoid undefined behavior.

2 years agopp.c: White-space only
Karl Williamson [Sun, 28 Apr 2019 23:26:38 +0000 (17:26 -0600)]
pp.c: White-space only

Fix indentation of this routine to current standards, in preparation for
making changes to it, and add a blank line for readability

2 years agoperl.h: Clarify debugging text
Karl Williamson [Wed, 24 Apr 2019 21:45:43 +0000 (15:45 -0600)]
perl.h: Clarify debugging text

2 years agoAdd some comments around tainting
Karl Williamson [Thu, 18 Apr 2019 16:10:41 +0000 (10:10 -0600)]
Add some comments around tainting

2 years agolocale.c: Add some comments
Karl Williamson [Wed, 3 Apr 2019 20:11:27 +0000 (14:11 -0600)]
locale.c: Add some comments

2 years agolocale.c: remove unnecessary cast
Jerome Duval [Thu, 25 Apr 2019 21:19:43 +0000 (23:19 +0200)]
locale.c: remove unnecessary cast

This was failing in gcc 2.95.  The original commit added a cast, but we
figured out that removing this other one that really served no purpose
causes this compiler to work.

2 years agoJereome Duval is a Perl author
Karl Williamson [Fri, 10 May 2019 14:54:45 +0000 (08:54 -0600)]
Jereome Duval is a Perl author

2 years agoregcomp.sym: Fix typo in comment
Karl Williamson [Thu, 23 May 2019 06:48:49 +0000 (00:48 -0600)]
regcomp.sym: Fix typo in comment

2 years agonumeric.c: Add #error case
Karl Williamson [Sun, 5 May 2019 16:03:01 +0000 (10:03 -0600)]
numeric.c: Add #error case

It's best to have a #error case when nothing in the #if #else series is
true, as it catches the problem at compile time.

2 years agoS_scan_const() Properly test if need to grow
Karl Williamson [Sat, 27 Apr 2019 19:56:39 +0000 (13:56 -0600)]
S_scan_const() Properly test if need to grow

As we parse the input, creating a string constant, we may have to grow
the destination if it fills up as we go along.  It allocates space in an
SV and populates the string, but it doesn' update the SvCUR until the
end, so in single stepping the debugger through the code, the SV looks
empty until the end.  It turns out that as a result SvEND also doesn't
get updated and still points to the beginning of the string until SvCUR
is finally set.  That means that the test changed by this commit was
always succeeding, because it was using SvEND that didn't get updated,
so it would attempt to grow each time through the loop.  By moving a
couple of statements earlier, and using SvLEN instead, which does always
have the correct value, those extra growth attempts are avoided.

2 years agoPOSIX.xs: Add NOTREACHED to silence cygwin compiler
Karl Williamson [Mon, 29 Apr 2019 03:26:35 +0000 (21:26 -0600)]
POSIX.xs: Add NOTREACHED to silence cygwin compiler

2 years agoposix_bump
Karl Williamson [Wed, 24 Apr 2019 22:22:08 +0000 (16:22 -0600)]
posix_bump

2 years agocygwin.c: Fix misleading indentation
Karl Williamson [Mon, 29 Apr 2019 03:17:21 +0000 (21:17 -0600)]
cygwin.c: Fix misleading indentation

2 years agoregnodes.h: Change some regnodes' names
Karl Williamson [Thu, 14 Mar 2019 18:18:59 +0000 (12:18 -0600)]
regnodes.h: Change some regnodes' names

These were misleading, as elsewhere a leading 'N' in the name means the
complement.  Instead move the N to the end of the name

2 years agoPATCH: [perl #134126] -Dusemymalloc, -Dusethreads
Karl Williamson [Wed, 22 May 2019 20:37:20 +0000 (14:37 -0600)]
PATCH: [perl #134126] -Dusemymalloc, -Dusethreads

This was due to a missing declaration for thread context needed to
output a message.

2 years agoPATCH: [perl #134059] panic outputting a warning
Karl Williamson [Mon, 29 Apr 2019 21:24:18 +0000 (15:24 -0600)]
PATCH: [perl #134059] panic outputting a warning

This was due to a logic error on my part.  We need to save and restore a
value.  Instead, it was getting restored to the wrong value.

This particular instance of the bug was outputting a fatal error
message, so that the only harm is not giving the user the correct info,
and creating unnecessary work for them and us when it gets reported.
But this bug could manifest itself when trying to output just a warning
that the program otherwise would carry on from.

2 years agoperllocale: Use L</Foo Bar>, not L<Foo Bar>
Karl Williamson [Fri, 1 Jun 2018 16:51:05 +0000 (10:51 -0600)]
perllocale: Use L</Foo Bar>, not L<Foo Bar>

2 years agoPATCH: [perl #134134] read beyond end of buffer
Karl Williamson [Fri, 24 May 2019 15:15:59 +0000 (09:15 -0600)]
PATCH: [perl #134134] read beyond end of buffer

This turns out to be because of a special input case in myatof3(),
wherein if the input length is 0, it call strlen to find the length.

The solution is to add a test and not call the function unless the
length is positive.

2 years agoResolve merge conflict
Sawyer X [Fri, 24 May 2019 22:18:57 +0000 (01:18 +0300)]
Resolve merge conflict

2 years agoBump Module::CoreList
Sawyer X [Fri, 24 May 2019 22:06:41 +0000 (01:06 +0300)]
Bump Module::CoreList

2 years agoBump the perl version in various places for 5.31.1
Sawyer X [Fri, 24 May 2019 21:58:31 +0000 (00:58 +0300)]
Bump the perl version in various places for 5.31.1

2 years agonew perldelta for 5.31.1
Sawyer X [Fri, 24 May 2019 21:44:00 +0000 (00:44 +0300)]
new perldelta for 5.31.1

2 years agoFix perldelta from 5.30.1 to 5.31.0:
Sawyer X [Fri, 24 May 2019 21:32:42 +0000 (00:32 +0300)]
Fix perldelta from 5.30.1 to 5.31.0:

perldelta was accidentally set to 5.30.1 instead of 5.31.0.
Hopefully this commit should fix it, along with the correction
of the symlink in pod/.

2 years agoFix perldelta mistake
Sawyer X [Fri, 24 May 2019 21:21:18 +0000 (00:21 +0300)]
Fix perldelta mistake

2 years agofix version in perldelta
Karen Etheridge [Fri, 24 May 2019 20:13:54 +0000 (13:13 -0700)]
fix version in perldelta

2 years agoTick off release
Sawyer X [Fri, 24 May 2019 19:49:37 +0000 (22:49 +0300)]
Tick off release

2 years agoUpdate epigraph
Sawyer X [Fri, 24 May 2019 19:46:18 +0000 (22:46 +0300)]
Update epigraph

2 years agoRemove the update from perldelta v5.31.0
Sawyer X [Fri, 24 May 2019 17:40:59 +0000 (20:40 +0300)]
Remove the update from perldelta

2 years agoRevert "Bump Pod::Simple from 3.35 to 3.36"
Sawyer X [Fri, 24 May 2019 17:40:11 +0000 (20:40 +0300)]
Revert "Bump Pod::Simple from 3.35 to 3.36"

This reverts commit 314f4963bff4d23e773eee5559e5fd1de2dc6cbc.

This is causing testing failures on FreeBSD-11, raised by Jim Keenan.

2 years agoadd new release to perlhist
Sawyer X [Fri, 24 May 2019 15:59:27 +0000 (18:59 +0300)]
add new release to perlhist

2 years agoFinalize perldelta
Sawyer X [Fri, 24 May 2019 15:41:53 +0000 (18:41 +0300)]
Finalize perldelta

2 years agoBump Module::CoreList
Sawyer X [Fri, 24 May 2019 15:29:24 +0000 (18:29 +0300)]
Bump Module::CoreList

2 years agoBump Socket.pm from 2.027 to 2.029
Sawyer X [Fri, 24 May 2019 15:06:58 +0000 (18:06 +0300)]
Bump Socket.pm from 2.027 to 2.029

2 years agoBump Pod::Simple from 3.35 to 3.36
Sawyer X [Fri, 24 May 2019 14:56:15 +0000 (17:56 +0300)]
Bump Pod::Simple from 3.35 to 3.36

2 years agoPrepare the next release schedule
Sawyer X [Wed, 22 May 2019 11:36:07 +0000 (14:36 +0300)]
Prepare the next release schedule

2 years agoUpdate Module::CoreList for 5.31.0
Sawyer X [Wed, 22 May 2019 11:14:04 +0000 (14:14 +0300)]
Update Module::CoreList for 5.31.0

2 years agoBump the perl version in various places for 5.31.0
Sawyer X [Wed, 22 May 2019 11:07:31 +0000 (14:07 +0300)]
Bump the perl version in various places for 5.31.0

2 years agoupdate features
Sawyer X [Wed, 22 May 2019 09:50:21 +0000 (12:50 +0300)]
update features

2 years agoNew perldelta
Sawyer X [Wed, 22 May 2019 09:47:10 +0000 (12:47 +0300)]
New perldelta

2 years agotick off release
Sawyer X [Wed, 22 May 2019 09:46:41 +0000 (12:46 +0300)]
tick off release

2 years agoUpdate epigraph
Sawyer X [Wed, 22 May 2019 09:40:52 +0000 (12:40 +0300)]
Update epigraph

2 years agoUpdate perlhist v5.30.0
Sawyer X [Wed, 22 May 2019 08:29:58 +0000 (11:29 +0300)]
Update perlhist

2 years agoLast minute fix, thanks SHIRAKATA Kentaro
Sawyer X [Wed, 22 May 2019 08:16:07 +0000 (11:16 +0300)]
Last minute fix, thanks SHIRAKATA Kentaro

2 years agoadd new release to perlhist
Sawyer X [Tue, 21 May 2019 22:40:22 +0000 (01:40 +0300)]
add new release to perlhist

2 years agoTypo fix
Sawyer X [Tue, 21 May 2019 21:42:20 +0000 (00:42 +0300)]
Typo fix

2 years agoUpdate Module::CoreList for 5.30.0
Sawyer X [Tue, 21 May 2019 20:22:06 +0000 (23:22 +0300)]
Update Module::CoreList for 5.30.0

2 years ago[perldelta] Typo, thanks Paul Johnson!
Sawyer X [Mon, 20 May 2019 17:56:21 +0000 (20:56 +0300)]
[perldelta] Typo, thanks Paul Johnson!

2 years ago[perldelta] Rephrase Acknowledgements, thanks Hugo and Craig
Sawyer X [Sun, 19 May 2019 06:31:53 +0000 (09:31 +0300)]
[perldelta] Rephrase Acknowledgements, thanks Hugo and Craig

2 years agoUpdate epigraph, linkify later
Sawyer X [Fri, 17 May 2019 20:50:42 +0000 (23:50 +0300)]
Update epigraph, linkify later

2 years agoUpdate META
Sawyer X [Fri, 17 May 2019 20:47:05 +0000 (23:47 +0300)]
Update META

2 years agodisarm RC2 bump
Sawyer X [Fri, 17 May 2019 20:46:18 +0000 (23:46 +0300)]
disarm RC2 bump

2 years agoUpdate META files v5.30.0-RC2
Sawyer X [Fri, 17 May 2019 18:51:10 +0000 (21:51 +0300)]
Update META files

2 years agobump version to RC2
Sawyer X [Fri, 17 May 2019 18:50:51 +0000 (21:50 +0300)]
bump version to RC2

2 years agoRemove selected information from non-blead-point release
Sawyer X [Fri, 17 May 2019 18:50:18 +0000 (21:50 +0300)]
Remove selected information from non-blead-point release

2 years agoupdate release
Sawyer X [Fri, 17 May 2019 18:50:01 +0000 (21:50 +0300)]
update release

2 years agoFix to acknowledgements
Sawyer X [Fri, 17 May 2019 18:30:47 +0000 (21:30 +0300)]
Fix to acknowledgements

2 years agoSmall update to Module::CoreList:
Sawyer X [Fri, 17 May 2019 18:28:27 +0000 (21:28 +0300)]
Small update to Module::CoreList:

We bumped Devel::PPPort between RC1 and RC2. No new version of
Module::CoreList was released for this.

2 years agoMerge branch 'smoke-me/khw-petr' into blead
Sawyer X [Fri, 17 May 2019 18:18:23 +0000 (21:18 +0300)]
Merge branch 'smoke-me/khw-petr' into blead

2 years agoPATCH: [perl #133860] 5.30 regression
Karl Williamson [Thu, 16 May 2019 21:47:20 +0000 (15:47 -0600)]
PATCH: [perl #133860] 5.30 regression

These bugs stem from trying to compile a user-defined \p{IsProperty}
before the data for the property is available.  In the past, a bug used
the wrong package for IsProperty, and it wasn't found, so its expansion
was delayed until runtime.  But that bug got fixed, and now it finds the
property and thinks its deliberately empty, at compile time.

This is a change in behavior, even if it is fixing a bug, where the real
problem is unobvious.  The solution adopted in this commit is to defer
all empty properties at pattern compilation time.  If they are still
empty at runtime, that's what the expansion will be.

2 years agoRevert "Rename PPPort_xs.PL to RealPPPort_xs.PL"
Nicolas R [Thu, 16 May 2019 22:47:56 +0000 (16:47 -0600)]
Revert "Rename PPPort_xs.PL to RealPPPort_xs.PL"

This reverts commit 0f14f67985491207f4a0e3936307f4c565717fd6.

need to apply after current freeze

2 years agoRevert "Fix compilation issues with version older than 5.010"
Nicolas R [Thu, 16 May 2019 22:47:37 +0000 (16:47 -0600)]
Revert "Fix compilation issues with version older than 5.010"

This reverts commit a09f79fbc2455b7ea72a49f6627a639101ba35a2.

need to apply after current freeze

2 years agoFix compilation issues with version older than 5.010
Nicolas R [Wed, 15 May 2019 14:53:26 +0000 (08:53 -0600)]
Fix compilation issues with version older than 5.010

By adding more Perl versions to the Travis CI configuration
file we discovered that versions earlier 5.010 are broken.

Note that the uv.t does not raise the overflow warning
as expected by the test and we probably want to fix this in
a short future.

The test uv.t is simply not passing with 5.006 versions and
has several failures. I've currently disabled it.

Patch provided by Pali

2 years agoRename PPPort_xs.PL to RealPPPort_xs.PL
Nicolas R [Tue, 14 May 2019 19:53:45 +0000 (13:53 -0600)]
Rename PPPort_xs.PL to RealPPPort_xs.PL

Fixes Devel-PPPort GH #21

To avoid confusion rename the template for RealPPPort.xs
file as RealPPPort_xs.PL so it's now clear what file
it generates.

2 years agoAdjust perlvar doc for @INC
Nicolas R [Wed, 15 May 2019 16:02:55 +0000 (10:02 -0600)]
Adjust perlvar doc for @INC

RT #134108

dot is not in @INC anymore since 5.26

2 years agoLinkify B::Debug and Locale::Codes to CPAN in a uniform way
Sawyer X [Thu, 16 May 2019 16:13:56 +0000 (10:13 -0600)]
Linkify B::Debug and Locale::Codes to CPAN in a uniform way

2 years agoperldelta: Improvements
Karl Williamson [Thu, 16 May 2019 16:10:33 +0000 (10:10 -0600)]
perldelta: Improvements

This includes some small wording changes, reordering by importance,
collapsing near-duplicate entries.

2 years ago[perldelta] Missing =item
Sawyer X [Wed, 15 May 2019 04:36:57 +0000 (07:36 +0300)]
[perldelta] Missing =item

2 years agoFix up perldelta in regard to Unicode versions
Karl Williamson [Mon, 13 May 2019 16:11:06 +0000 (10:11 -0600)]
Fix up perldelta in regard to Unicode versions

2 years agoRevert "[perldelta] Merge Unicode 11.0, 12.0, and 12.1"
Sawyer X [Wed, 15 May 2019 04:27:48 +0000 (07:27 +0300)]
Revert "[perldelta] Merge Unicode 11.0, 12.0, and 12.1"

This reverts commit d4c6f1162051dc6f5ddb49bb9598500047458e03.

2 years agoRevert "[perldelta] Missing 'of'"
Sawyer X [Wed, 15 May 2019 04:27:33 +0000 (07:27 +0300)]
Revert "[perldelta] Missing 'of'"

This reverts commit 78ccf50b87776a7a9e721f24512c10a2b7cd0f06.

2 years ago[perldelta] Missing 'of'
Sawyer X [Wed, 15 May 2019 04:18:49 +0000 (07:18 +0300)]
[perldelta] Missing 'of'

2 years ago[perldelta] Merge Unicode 11.0, 12.0, and 12.1
Sawyer X [Wed, 15 May 2019 04:15:21 +0000 (07:15 +0300)]
[perldelta] Merge Unicode 11.0, 12.0, and 12.1

2 years agoLinkify epigraph
Sawyer X [Wed, 15 May 2019 04:09:59 +0000 (07:09 +0300)]
Linkify epigraph

2 years agosync with cpan release of Devel-PPPort 3.52
Nicolas R [Tue, 14 May 2019 18:15:54 +0000 (12:15 -0600)]
sync with cpan release of Devel-PPPort 3.52

2 years agominor wording changes, rt links
Karen Etheridge [Mon, 13 May 2019 20:32:14 +0000 (13:32 -0700)]
minor wording changes, rt links

2 years agoRemove references to 5.29
Sawyer X [Sun, 12 May 2019 13:12:07 +0000 (16:12 +0300)]
Remove references to 5.29

2 years agoRegen for some reason
Sawyer X [Sat, 11 May 2019 23:14:49 +0000 (02:14 +0300)]
Regen for some reason

2 years agoEpigraph update
Sawyer X [Sat, 11 May 2019 23:03:34 +0000 (02:03 +0300)]
Epigraph update

2 years agodisarm RC1 bump
Sawyer X [Sat, 11 May 2019 22:58:43 +0000 (01:58 +0300)]
disarm RC1 bump

2 years agoRemove unnecessary MANIFEST entry v5.30.0-RC1
Sawyer X [Sat, 11 May 2019 22:08:35 +0000 (01:08 +0300)]
Remove unnecessary MANIFEST entry

2 years agoWhoops
Sawyer X [Sat, 11 May 2019 22:06:59 +0000 (01:06 +0300)]
Whoops

2 years agoRemove symlink
Sawyer X [Sat, 11 May 2019 22:01:29 +0000 (01:01 +0300)]
Remove symlink

2 years agoupdate MANIFEST
Sawyer X [Sat, 11 May 2019 21:38:01 +0000 (00:38 +0300)]
update MANIFEST

2 years agoUpdate perl.pod with 5300delta
Sawyer X [Sat, 11 May 2019 21:34:55 +0000 (00:34 +0300)]
Update perl.pod with 5300delta

2 years agoUpdate META files
Sawyer X [Sat, 11 May 2019 20:52:54 +0000 (23:52 +0300)]
Update META files

2 years agobump version to RC1
Sawyer X [Sat, 11 May 2019 20:52:37 +0000 (23:52 +0300)]
bump version to RC1

2 years agoadd new release to perlhist
Sawyer X [Sat, 11 May 2019 20:48:58 +0000 (23:48 +0300)]
add new release to perlhist

2 years agoFinalize perldelta
Sawyer X [Sat, 11 May 2019 20:39:25 +0000 (23:39 +0300)]
Finalize perldelta

2 years ago5.30 utf8_to_uvchr_buf still has wrong retval
Karl Williamson [Fri, 10 May 2019 22:18:35 +0000 (16:18 -0600)]
5.30 utf8_to_uvchr_buf still has wrong retval

Wrong for some failure conditions, anyway.  It should get fixed early in
5.31, make the cutoff here 5.31.2 to give us some leeway, so don't have
to change Devel::PPPort again.

2 years agoUpdate Module::CoreList for 5.30.0
Sawyer X [Fri, 10 May 2019 20:26:59 +0000 (23:26 +0300)]
Update Module::CoreList for 5.30.0

2 years agoBump the perl version in various places for 5.30.0
Sawyer X [Fri, 10 May 2019 19:44:00 +0000 (22:44 +0300)]
Bump the perl version in various places for 5.30.0

2 years agofix version number in Changes
Karen Etheridge [Thu, 9 May 2019 03:47:04 +0000 (20:47 -0700)]
fix version number in Changes

2 years agoperldelta for 9f300641fc6f
Tony Cook [Thu, 9 May 2019 00:29:17 +0000 (10:29 +1000)]
perldelta for 9f300641fc6f

2 years ago(perl #133958) preserve errno on successful malloc/realloc origin/tonyc/133958-realloc-errno-success
Tony Cook [Fri, 3 May 2019 04:49:50 +0000 (14:49 +1000)]
(perl #133958) preserve errno on successful malloc/realloc

In general perl doesn't try to preserve errno (aka $!) since we're
aiming at the same behaviour as for C code - errno is only meaningful
if a function returned an error.

The exception to that is when perl is working without an explicit
request from the perl programmer.

When code is performing assignments, concatenating strings, pushing on
arrays etc, perl is exercising the memory allocation machinery,
calling malloc() and realloc().

It turns out that at least on one platform, realloc() can modify errno
on success.

It appears to be happening when jemalloc (the malloc() implementation
used on FreeBSD) tries to extend a memory arena and fails, leaving the
error number from that failure in errno, from truss:

mmap(0x80142f000,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON|MAP_EXCL,-1,0x0) ERR#12 'Cannot allocate memory'

This magic call appears to be a FreeBSD specific mechanism to resize
the anonymous mapping.  On Linux the equivalent seems to be calling
mremap().

In each case for the test code mmap() is successfully called
immediately afterwards:

mmap(0x0,69632,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 34390323200 (0x801d2b000)

and realloc() succeeds.

glibc() realloc seems to be simpler, AFAICT from reading the code it
only uses mremap() when the memory block is the entire mapping,
ie. for large blocks rather than for memory arenas, and it doesn't
request the same address, so it doesn't fail.

For blocks that are part of arenas, glibc tries to expand in-place
within the current arena (with no extending the arena itself) or falls
back to malloc, so there's no chance for errno to be changed on a
successful realloc().