This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
3 years agoRevert "PATCH: [perl #134031] BBC breake Math::Clipper"
Karl Williamson [Mon, 6 May 2019 13:41:42 +0000 (07:41 -0600)]
Revert "PATCH: [perl #134031] BBC breake Math::Clipper"

This reverts commit 9ddfdb573eecc4201e23e59c82335dbdd9e7c7d3.
It turns out that strtod() isn't less accurate than atof() on this
platform; it's generally more accurate.  We still don't fully understand
the situation, but the answer isn't this commit.

3 years agoS_scan_const: Make sure room for NUL in dest
Karl Williamson [Sat, 27 Apr 2019 20:30:02 +0000 (14:30 -0600)]
S_scan_const: Make sure room for NUL in dest

At the end of a constant, we add a trailing NUL.  This commit makes sure
there's room for it.  But the code earlier was supposed to have already
made enough space, so its a bug if there isn't enough space.  So on
DEBUGGING builds, we panic, as we've done before.  But otherwise we can
continue on with no actual harm having been done.

3 years agoPATCH: [perl #134067] heap buffer overflow in lexing
Karl Williamson [Sat, 27 Apr 2019 20:04:58 +0000 (14:04 -0600)]
PATCH: [perl #134067] heap buffer overflow in lexing

This bug happens under tr///.  In some circumstances, a byte is inserted
in the output that wasn't in the input, and it did not check that there
was space available for this character.  The result could be a write
after the buffer end.

I suspect that this bug has been there all along, and the blamed commit
rearranged things so that it is more likely to happen; it depends on
needing to malloc in just the wrong place.

3 years agoadd "see also" reference to newRV_inc and newRV_noinc to newSVrv() docs
Yves Orton [Fri, 3 May 2019 11:15:40 +0000 (13:15 +0200)]
add "see also" reference to newRV_inc and newRV_noinc to newSVrv() docs

3 years agoperldelta for 9a48f2ab9670, 5a6219089f70
Tony Cook [Fri, 3 May 2019 00:21:48 +0000 (10:21 +1000)]
perldelta for 9a48f2ab96705a6219089f70

3 years ago(perl #134061) move the test to t/uni/parser.t
Tony Cook [Fri, 3 May 2019 00:09:06 +0000 (10:09 +1000)]
(perl #134061) move the test to t/uni/parser.t

porting/test_bootstrap prevents most use of use in t/comp

3 years agoRT#134061: don't call pad_findmy_pvn() with invalid flags
Aaron Crane [Fri, 26 Apr 2019 13:02:47 +0000 (14:02 +0100)]
RT#134061: don't call pad_findmy_pvn() with invalid flags

3 years agoPATCH: [perl #134064] Assertion failure in toke.c
Karl Williamson [Fri, 26 Apr 2019 20:42:37 +0000 (14:42 -0600)]
PATCH: [perl #134064] Assertion failure in toke.c

The blamed commit simplified some code based on the assumption that
UTF-8 well-formedness had already been verified.  It had an assertion to
verify this.  The test case shows that there is a path, through 'eval',
that bypasses this usual checking.

The checking was based on the assumption that the program started not in
UTF-8, and something like a 'use utf8' would be needed to get it there,
at which point a flag would be set to the effect that well-formedness
should be checked.  But it turns out that a string eval (perhaps other
things) gets parsed separately and so the flag wasn't set, so no
well-formedness checking was being done.

The solution is a one word change, to initialize the flag to TRUE "'yes,
check" instead of FALSE "no, don't check" in the initialization routine
run at the beginning of lexing a code unit.  This catches eval and
presumably anything else that was being bypassed.

The checking is only actually done if the code being lexed is known to
be in UTF-8.  This will continue to get turned on by the ways it
currently gets turned on, such as 'use utf8'.

3 years agoPATCH: [perl #134031] BBC breake Math::Clipper
Karl Williamson [Tue, 30 Apr 2019 00:46:51 +0000 (18:46 -0600)]
PATCH: [perl #134031] BBC breake Math::Clipper

This turns out to be that strtod() is less accurate on this platform
than atof().  I looked at the difference, and a test failed that was
failing in this module was the difference between a 0 and a 1 in the
final digit.

The solution is to forbid in the hints file using strtod

3 years ago(perl #134046) list form system/exec/pipe open limits on Win32
Tony Cook [Wed, 24 Apr 2019 05:01:48 +0000 (15:01 +1000)]
(perl #134046) list form system/exec/pipe open limits on Win32

3 years agosync up with cpan release of Devel-PPPort 3.51
Karen Etheridge [Tue, 30 Apr 2019 23:10:29 +0000 (16:10 -0700)]
sync up with cpan release of Devel-PPPort 3.51

 3.51 - 2019-05-01

    * include the module version in metadata for proper PAUSE indexing

3 years agowhitespace
Karen Etheridge [Tue, 30 Apr 2019 19:02:21 +0000 (12:02 -0700)]
whitespace

3 years agoAnother re-order in Devel::PPPort - warn before uv for packWARN
H.Merijn Brand [Tue, 30 Apr 2019 18:59:32 +0000 (20:59 +0200)]
Another re-order in Devel::PPPort - warn before uv for packWARN

dromedary:/home/tux/Text-CSV_XS$ release -t

showed 5.6.1 as first FAIL:
undefined symbol: packWARN

After this, release -t on dromedary passed 5.6.1 .. 5.29.8

3 years agoUpdate note of the test failures reportied in perl #133981
Steve Hay [Tue, 30 Apr 2019 16:35:34 +0000 (17:35 +0100)]
Update note of the test failures reportied in perl #133981

3 years agomalloc.c: Move variable declaration used in -DDEBUGGING above code, #134071
Ryan Voots [Mon, 29 Apr 2019 22:36:10 +0000 (15:36 -0700)]
malloc.c: Move variable declaration used in -DDEBUGGING above code, #134071

3 years agoAdd Ryan Voots to AUTHORS file
Ryan Voots [Mon, 29 Apr 2019 22:36:18 +0000 (15:36 -0700)]
Add Ryan Voots to AUTHORS file

3 years agoperly.c: Fix typo in comment
Karl Williamson [Fri, 26 Apr 2019 18:39:53 +0000 (12:39 -0600)]
perly.c: Fix typo in comment

3 years agosync with cpan release of Devel-PPPort 3.49
Nicolas R [Mon, 29 Apr 2019 17:53:13 +0000 (11:53 -0600)]
sync with cpan release of Devel-PPPort 3.49

3 years agoext/POSIX/t/posix.t: Fix undefined C behavior in test
sisyphus [Sun, 28 Apr 2019 23:32:30 +0000 (17:32 -0600)]
ext/POSIX/t/posix.t: Fix undefined C behavior in test

Behavior marked as undefined by the C standard should be avoided.  Its
a simple matter to fix this .t to not have such behavior.

In general, the programmer may not have control over the input string
being parsed to convert to a number, and so it could be too large or
tiny for the available precision and hence result in undefined behavior.
That is something that is unavoidable.

3 years agoext/POSIX/t/posix.t: Fix typo in test name
sisyphus [Sun, 28 Apr 2019 23:31:35 +0000 (17:31 -0600)]
ext/POSIX/t/posix.t: Fix typo in test name

3 years agofix version
Karen Etheridge [Sun, 28 Apr 2019 22:10:20 +0000 (15:10 -0700)]
fix version

3 years agodo not include PPPort_pm.PL in the uploaded tarball
Karen Etheridge [Sun, 28 Apr 2019 22:09:15 +0000 (15:09 -0700)]
do not include PPPort_pm.PL in the uploaded tarball

3 years agoclarify the process for dist/ (blead-first) distributions
Karen Etheridge [Sun, 28 Apr 2019 21:42:19 +0000 (14:42 -0700)]
clarify the process for dist/ (blead-first) distributions

3 years agoignore more build artifacts
Karen Etheridge [Sun, 28 Apr 2019 21:38:47 +0000 (14:38 -0700)]
ignore more build artifacts

3 years agoDevel::PPPort order misc before uv because of UNLIKELY
H.Merijn Brand [Sun, 28 Apr 2019 11:22:52 +0000 (13:22 +0200)]
Devel::PPPort order misc before uv because of UNLIKELY

uv uses UNLIKELY before it gets undefined in misc, which will be the
case fro perl-5.8.8 and below

3 years agosync with cpan release of Devel-PPPort 3.47
Karen Etheridge [Sun, 28 Apr 2019 05:03:13 +0000 (22:03 -0700)]
sync with cpan release of Devel-PPPort 3.47

3 years agobump Typemap.pm version
David Mitchell [Sat, 27 Apr 2019 18:40:19 +0000 (19:40 +0100)]
bump Typemap.pm version

3 years agore-fix leak in Devel-PPPort
David Mitchell [Wed, 3 Apr 2019 13:14:13 +0000 (14:14 +0100)]
re-fix leak in Devel-PPPort

This the context of this commit (v5.29.10-31-g613175fa07) was
accidentally reverted by v5.29.10-25-gaadf4f9e12, so I'm re-applying it
blead here.

-------

The leaky code is only used during test. It creates 3 ops, does various
operations related to linking OpSIBLINGs, then fails to free them.

3 years agofix t/porting/bench.t
David Mitchell [Sat, 27 Apr 2019 17:15:48 +0000 (18:15 +0100)]
fix t/porting/bench.t

This tests the outputs of various runs of bench.pl and checks that the
output it gets matches various templates. Parts of these templates of
these formats are, e.g.

    NNN.NN NNN.NN NNN.NN

which are pre-processed into a regex that matches e.g.
    (\d+\.\d\d|-)
i.e. match either a two-sig-diff number of a '-' - that latter
indicating no valid result.

However, once, space-skipping is taken into account, the combination of
skipping any spaces before the number, and expecting 3 blank spaces
before the '-' means that '-' fields never matched.

Fix this by simplifying the generated regex.

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

3 years agoTypemap.xs: avoid leak
David Mitchell [Sat, 27 Apr 2019 14:55:20 +0000 (15:55 +0100)]
Typemap.xs: avoid leak

The code was doing Safefree(in[i++]) in a loop,
but Safefree() is a macro which may evaluate its arg multiple times,
causing to i to get multipally incremented and thus skipping over some
items that need freeing.

This module is only used for build and test and isn't isn't installed,
so this fix is for the benefit of smokers rather than end users.

3 years agoTwo more e-mail addresses for me
H.Merijn Brand [Sat, 27 Apr 2019 10:46:00 +0000 (12:46 +0200)]
Two more e-mail addresses for me

3 years agoDocument that local-on-negative-array-index is wildly surprising
Aaron Crane [Sat, 27 Apr 2019 09:40:07 +0000 (10:40 +0100)]
Document that local-on-negative-array-index is wildly surprising

3 years agoCBuilder is 0.280231 on the CPANs
Chris 'BinGOs' Williams [Sat, 27 Apr 2019 08:31:36 +0000 (09:31 +0100)]
CBuilder is 0.280231 on the CPANs

3 years agoUpdate Devel-PPPort to version 3.46
Nicolas R [Fri, 26 Apr 2019 22:49:12 +0000 (16:49 -0600)]
Update Devel-PPPort to version 3.46

Update dist/Devel-PPPort after recent work
from khw to provide UNICODE_REPLACEMENT

Note that 3.46 is also released to CPAN.

3 years agoremove leftovers from [perl #127663]
Tomasz Konojacki [Mon, 13 Aug 2018 23:28:05 +0000 (01:28 +0200)]
remove leftovers from [perl #127663]

Since e0d4aead3c87ba953fb1d70678a77a45e0c9f111 we no longer have
"Can't do inplace edit without backup" error, but perldiag and
t/io/inplace.t didn't get the memo.

3 years agoRemove entry from MANIFEST
Sawyer X [Tue, 23 Apr 2019 13:27:08 +0000 (16:27 +0300)]
Remove entry from MANIFEST

3 years agoBumping Storable to release to CPAN
Sawyer X [Tue, 23 Apr 2019 12:45:39 +0000 (15:45 +0300)]
Bumping Storable to release to CPAN

3 years agoperlguts: add some background information on op slab internals
Aaron Crane [Fri, 26 Apr 2019 09:29:11 +0000 (10:29 +0100)]
perlguts: add some background information on op slab internals

This text is a lightly-edited version of the commit message for
8be227ab5eaa23f2d21fd15f70190e494496dcbe, which is the change that
introduced slab-based op allocation. I found the overview in that
message to be very helpful, and it seems that it's much more useful
in the repository itself than hidden away in a seven-year-old commit
message.

3 years agoRegen uconfig.h
Aaron Crane [Fri, 26 Apr 2019 09:28:11 +0000 (10:28 +0100)]
Regen uconfig.h

3 years agoFurther integration from Configure works
H.Merijn Brand [Fri, 26 Apr 2019 08:36:38 +0000 (10:36 +0200)]
Further integration from Configure works

3 years agoFix precedence problems in preprocessor directives
Karl Williamson [Fri, 26 Apr 2019 03:22:27 +0000 (21:22 -0600)]
Fix precedence problems in preprocessor directives

Recent commit 9ec8aea5c056c7d3ffc270a57c9fb123a6416473 failed to fix
this precedence problem, which this does by adding some parens

3 years agoPATCH: [perl #134014] lib/locale.t panic on *bsd
Karl Williamson [Wed, 24 Apr 2019 21:46:38 +0000 (15:46 -0600)]
PATCH: [perl #134014] lib/locale.t panic on *bsd

This was due to a faulty logic in an assertion, corrected here.

3 years agoRegenerate Configure from latest metaconfig
Aaron Crane [Thu, 25 Apr 2019 11:21:29 +0000 (12:21 +0100)]
Regenerate Configure from latest metaconfig

This corresponds to metaconfig commit 70210eb08b2643bfce98cfa92a3ee52c613dfa56

3 years agoStorable is 3.15 on CPAN
Chris 'BinGOs' Williams [Thu, 25 Apr 2019 08:45:29 +0000 (09:45 +0100)]
Storable is 3.15 on CPAN

3 years agoCheck off 5.29.10
James E Keenan [Wed, 24 Apr 2019 22:33:46 +0000 (18:33 -0400)]
Check off 5.29.10

3 years agoRevert "win32: define HAS_BUILTIN_EXPECT on MinGW"
David Mitchell [Wed, 24 Apr 2019 11:22:35 +0000 (12:22 +0100)]
Revert "win32: define HAS_BUILTIN_EXPECT on MinGW"

This reverts commit 69aa5ebd1f8de0b4ea51faeba005dbcb734e0bef.

RT #13360

This patch was tickling a bug in the compiler on that platform, the
details of which have not yet been diagnosed. Since the original commit
was just a minor optimisation, its been agreed to revert for now.

3 years agofix the name shown in PERL_HASH_SEED_DEBUG for stadtx
Yves Orton [Tue, 23 Apr 2019 17:05:23 +0000 (19:05 +0200)]
fix the name shown in PERL_HASH_SEED_DEBUG for stadtx

3 years agoext/File-Glob/t/rt131211.t: simplify timing
David Mitchell [Tue, 23 Apr 2019 12:48:56 +0000 (13:48 +0100)]
ext/File-Glob/t/rt131211.t: simplify timing

This test file expects a glob which matches to be fast,
and a glob which doesn't match also to be fast, but which used to be
exponentially slow.

Previous commits of mine have tried to avoid false positives for the
failtime > 10 * passtime test when both pass and fail times are so small
that the calculation is just comparing noise.

This new change simplifies the logic to: fail if both
    fail time > 1 sec (slow)
    fail time > 10 * pass time (so pass was relatively fast)

3 years ago-DPERL_GLOBAL_STRUCT and -fno-common smoke fail
David Mitchell [Tue, 23 Apr 2019 11:21:54 +0000 (12:21 +0100)]
-DPERL_GLOBAL_STRUCT and -fno-common smoke fail

The combination of those two flags causes t/porting/libperl.t to fail
because its expecting no BSS symbols, while -fno-common forces PL_Vars to
be BSS rather than Common.

Whether those two compiler directives are a sane combination is another
matter, but don't fail smokes if they appear together.

3 years agofix -DPERL_POISON builds
David Mitchell [Tue, 23 Apr 2019 09:21:27 +0000 (10:21 +0100)]
fix -DPERL_POISON builds

Remove unnecessary casts that confused the Safefree() macro
under PERL_POISON.

The casts were needed when I directly called safefree(), but became
superfluous once I switched to using the Safefree() macro.

3 years agoPOD formatting correction only.
James E Keenan [Sun, 21 Apr 2019 22:09:38 +0000 (18:09 -0400)]
POD formatting correction only.

For: RT 134053

3 years agoUpdate release managers guide
Sawyer X [Sun, 21 Apr 2019 16:10:04 +0000 (19:10 +0300)]
Update release managers guide

3 years agoUpdate perldelta wrt Module::CoreList
Sawyer X [Sun, 21 Apr 2019 15:55:08 +0000 (18:55 +0300)]
Update perldelta wrt Module::CoreList

3 years agoUpdate Module::CoreList
Sawyer X [Sun, 21 Apr 2019 15:30:50 +0000 (18:30 +0300)]
Update Module::CoreList

3 years agolink epigraph to release
Sawyer X [Sun, 21 Apr 2019 14:56:13 +0000 (17:56 +0300)]
link epigraph to release

3 years agonew perldelta for 5.29.11, even though we won't see it
Sawyer X [Sat, 20 Apr 2019 18:35:00 +0000 (21:35 +0300)]
new perldelta for 5.29.11, even though we won't see it

3 years agotick off release
Sawyer X [Sat, 20 Apr 2019 18:30:13 +0000 (21:30 +0300)]
tick off release

3 years agoAdd my epigraph, sans link
Sawyer X [Sat, 20 Apr 2019 18:29:46 +0000 (21:29 +0300)]
Add my epigraph, sans link

3 years agoUpdate perlhist v5.29.10
Sawyer X [Sat, 20 Apr 2019 10:02:01 +0000 (13:02 +0300)]
Update perlhist

3 years agoUpdate perldelta for 5.29.10 release
Sawyer X [Sat, 20 Apr 2019 09:47:20 +0000 (12:47 +0300)]
Update perldelta for 5.29.10 release

3 years agoUpdate Module::CoreList for 5.29.10
Sawyer X [Sat, 20 Apr 2019 09:29:13 +0000 (12:29 +0300)]
Update Module::CoreList for 5.29.10

3 years agoDevel::PPPort: Always provide UTF8_SAFE_SKIP
Karl Williamson [Sat, 20 Apr 2019 16:04:07 +0000 (10:04 -0600)]
Devel::PPPort: Always provide UTF8_SAFE_SKIP

The official version uses MIN, which may not be available on a given
platform, so always use the provided version which doesn't use that.

3 years agotypo
Karen Etheridge [Sat, 20 Apr 2019 16:06:02 +0000 (09:06 -0700)]
typo

3 years agoMerge branch 'ppport' into blead
Karl Williamson [Sat, 20 Apr 2019 06:38:41 +0000 (00:38 -0600)]
Merge branch 'ppport' into blead

This branch makes Devel::PPPort ready for 5.31

It provides support for a deprecated function, so that it can be removed
from blead, and makes the replacement version significantly less likely
to read off the end of a buffer (that prospect is why the function is
deprecated).

It provides support for utf8_to_uvchr_buf(), which is the preferred
method for translating from UTF-8, back to 5.6 if we could actually test
that far.

And it adds a bunch of changes that have been in the pipeline, sometimes
for years.

The Changes file says:
 3.46 - 2019-04-20

   * Fix the isFOO character type classification macros to work properly on
      all versions, as follows:
        * Fixed isALNUM, isALPHA, isDIGIT, isIDFIRST, isLOWER, and isUPPER on
          very early perls to not be locale-dependent
        * Fixed isASCII on early perls to work with signed char arguments
        * Fixed isCNTRL on early perls to know that DEL is a control
        * Fixed isSPACE on perls before 5.20 to know that VERTICAL TAB is a
          space
        * Added isALPHANUMERIC, synonym for isALNUMC
        * Added isIDCONT, to match legal non-initial characters in an
          identifier
        * Added isOCTAL, to match [0-7]
        * Added isWORDCHAR, synonym for isALNUM
        * Make all the character classification isFOO macros work on EBCDIC
          platforms on all versions
        * Added isFOO_A synonyms for all character classification isFOO
          macros
   * Provide LIKELY/UNLIKELY branch prediction
   * Provide av_tindex/av_top_index
   * Provide __ASSERT_ for assertions inside macros
   * Provide UTF8_SAFE_SKIP
   * Provide my_strnlen()
   * Provide utf8_to_uvchr_buf()
   * Replace utf8_to_uvchr() with a safer version

A PR has been issued, and Travis tests green back to 5.10

3 years agoReplace utf8_to_uvchr() with a safer version
Karl Williamson [Fri, 19 Apr 2019 19:25:56 +0000 (13:25 -0600)]
Replace utf8_to_uvchr() with a safer version

This function has no parameter to tell it what the upper bound of the
input string is.  This makes it prone to reading beyond the end of the
buffer when presented with malformed UTF-8 input.

This commit lessens the chances of that by taking advantage of the fact
that the perl interpreter most often NUL terminates strings.  So the
function is rewritten to not read past a NUL.

This won't help code that's compiled to use the perl version in effect,
as that will continue to use the unsafe version, but it will help any
modules that get downloaded and recompiled using a ppport.h that
contains this commit.

The existing utf8_to_uvchr gets undefined and replaced with this safer
version.

3 years agoUse utf8_to_uvchr_buf()
Karl Williamson [Fri, 19 Apr 2019 21:48:46 +0000 (15:48 -0600)]
Use utf8_to_uvchr_buf()

Previously the code within D:P used utf8_to_uvchr(), which is deprecated
in blead.  Now that the previous commit provides the preferred
utf8_to_uvchr_buf(), convert to use that.

3 years agoProvide utf8_to_uvchr_buf()
Karl Williamson [Fri, 19 Apr 2019 19:15:10 +0000 (13:15 -0600)]
Provide utf8_to_uvchr_buf()

This is the preferred function for most conversions from UTF-8.  It
should be provided as far back as possible.  This commit provides an
implementation even to 5.6.2 by using existing implementations of
similar functions..

Note that these early function implementations have bugs for things like
overflow, Unicode non-chars, etc.  These remain, as this commit wraps
them without fixing those issues.

3 years agoProvide my_strnlen()
Karl Williamson [Fri, 19 Apr 2019 19:11:40 +0000 (13:11 -0600)]
Provide my_strnlen()

This is needed for a future feature

3 years agoProvide UTF8_SAFE_SKIP
Karl Williamson [Fri, 19 Apr 2019 19:08:23 +0000 (13:08 -0600)]
Provide UTF8_SAFE_SKIP

I would like to encourage developers to use this, so better make it
available

3 years agoProvide __ASSERT_
Karl Williamson [Fri, 19 Apr 2019 17:05:41 +0000 (11:05 -0600)]
Provide __ASSERT_

This is needed by future additions.  No test can be provided because it
would entail crashing the interpreter.

3 years agoDevel-PPPort: Implement av_top_index, av_tindex
Karl Williamson [Mon, 1 Apr 2019 20:02:08 +0000 (14:02 -0600)]
Devel-PPPort: Implement av_top_index, av_tindex

3 years agoDevel-PPPort: Add support for LIKELY/UNLIKELY
Karl Williamson [Mon, 1 Apr 2019 20:50:19 +0000 (14:50 -0600)]
Devel-PPPort: Add support for LIKELY/UNLIKELY

These don't do anything, but they don't cause a compilation error if
someone wants to use them.

3 years agoDevel-PPPort/parts/inc/misc: Rmv duplicates in =provides
Karl Williamson [Mon, 1 Apr 2019 20:42:01 +0000 (14:42 -0600)]
Devel-PPPort/parts/inc/misc: Rmv duplicates in =provides

These entries are unneeded, as the __UNDEFINED__ macro automatically
includes them.

3 years agoDevel-PPPort/parts/inc/misc: Sort =provides section
Karl Williamson [Mon, 1 Apr 2019 19:41:23 +0000 (13:41 -0600)]
Devel-PPPort/parts/inc/misc: Sort =provides section

This makes it easier to see if it corresponds to what's implemented

3 years agoAdd/fix character classification macros, like isDIGIT
Karl Williamson [Thu, 18 Apr 2019 20:57:34 +0000 (14:57 -0600)]
Add/fix character classification macros, like isDIGIT

3 years agoUpdate apidoc.fnc, embed.fnc to 5.30
Karl Williamson [Fri, 19 Apr 2019 22:09:21 +0000 (16:09 -0600)]
Update apidoc.fnc, embed.fnc to 5.30

my_sprintf has been removed from blead, but is furnished here, so it
can't be removed.

3 years agoHACKERS: Fix typo, clarify
Karl Williamson [Mon, 1 Apr 2019 19:51:38 +0000 (13:51 -0600)]
HACKERS: Fix typo, clarify

3 years agoPOSIX.xs: Use new inRANGE macro
Karl Williamson [Thu, 28 Mar 2019 03:22:59 +0000 (21:22 -0600)]
POSIX.xs: Use new inRANGE macro

3 years agohandy.h: Make inRANGE more robust
Karl Williamson [Sat, 20 Apr 2019 06:17:42 +0000 (00:17 -0600)]
handy.h: Make inRANGE more robust

It turns out that in order to make this work or assert if it won't, it
needs to be more complicated.  The problem has to do with signed and
unsigned operands.  It now special cases where the item being checked to
be in the range is a char, and casts that to a U8.  Otherwise, there is
a problem when that is a negative signed type and the range is above the
int_max for that type.  An assert is added to detect this rare event
(not rare for chars, hence the special case).  The use of sizeof() for
this case means that it will be resolved at compile time and not
generate extra code.  I did an experiment, and gcc even under -O0
compiled away the sizeof() clause.

As an example of why this is needed, suppose we have a signed char,
-127, and we want to see if it is in the range 128-130, expressed as
ints.  Without casting that -127 to an unsigned char, it would subtract
128 from -127, yield -255, which when cast to an unsigned int would be
wrong.  But casting the -127 to U8 first yields 129, and gives the
correct result.  The same issue could happen wih ints if the range is
above INT_MAX, but that is a much rarer case, and this macro asserts
against it.

3 years agoext/POSIX/t/mb.t: Skip a test on early HP-UX
Karl Williamson [Fri, 19 Apr 2019 21:33:10 +0000 (15:33 -0600)]
ext/POSIX/t/mb.t: Skip a test on early HP-UX

This was fixed by the time of 11.31

3 years agot/op/sprintf2.t - Mark failing tests as TODO with VC++ prior to VC14
Steve Hay [Fri, 19 Apr 2019 18:27:05 +0000 (19:27 +0100)]
t/op/sprintf2.t - Mark failing tests as TODO with VC++ prior to VC14

See perl #133982.

3 years agoSilence Cwd.pm warning on Android builds if targetsh is not defined
Richard Leach [Tue, 16 Apr 2019 20:07:00 +0000 (20:07 +0000)]
Silence Cwd.pm warning on Android builds if targetsh is not defined

3 years agoregcomp.c: Copy some safeguards from swash_init()
Karl Williamson [Fri, 19 Apr 2019 16:56:48 +0000 (10:56 -0600)]
regcomp.c: Copy some safeguards from swash_init()

Moving \p{user-defined} into core C code instead of utf8_heavy.pl
removes it from using swash_init(), instead calling the user sub
directly.  At the suggestion of Tony Cook, this commit cargo cults some
precautions that swash_init() did before calling utf8_heavy (which in
turn called the user sub).  Some of these make sense, but some we're
doing because swash_init() did, and presumably it had reasons to.  (git
blame doesn't really help).

3 years agoext/POSIX/t/posix.t: Clarify tests
Karl Williamson [Fri, 19 Apr 2019 16:35:12 +0000 (10:35 -0600)]
ext/POSIX/t/posix.t: Clarify tests

These tests, added in 693d95f399039f4aa96bb6737166aeeb546e5350, may be
confusing, due to truncation due to precision in any failing output.
This changes the test name to include a caveat.

3 years agoMake note of the test failures reportied in perl #133981
Steve Hay [Fri, 19 Apr 2019 16:36:22 +0000 (17:36 +0100)]
Make note of the test failures reportied in perl #133981

3 years agoCheck that perl and POSIX::strtod assign same value
sisyphus [Tue, 16 Apr 2019 12:09:20 +0000 (22:09 +1000)]
Check that perl and POSIX::strtod assign same value

3 years agoCreate Strtod()
Karl Williamson [Thu, 18 Apr 2019 04:22:48 +0000 (22:22 -0600)]
Create Strtod()

This commit creates my_strod() and a synonym, Strtod(), to emulate
strtod() using the most precise function known to us that is available
on the platform.  strtod() is not in K&R, but is in C90, so atof() may
be silently substituted instead on those few platforms without it.

This function also correctly handles locale issues, such as if the radix
character should be a dot or comma (or something else) depending on the
parent perl code is using locale or not, and which locale.

The symbol Perl_strtod continues to be defined on platforms which have
some version of strtod(), for backward compatibility, and can be called
as a function (or rather macro) but most applications should just use
Strtod() and not sweat the details.

This commit also fixes the problems with the prior commit:
    commit 4ac6fab20b8950ee14756c6f2438809c572082cd
     Author: Karl Williamson <khw@cpan.org>
     Date:   Mon Apr 15 11:10:31 2019 -0600

         PATCH: [perl #133945] Perl_strtod failures

         This commit wraps Perl_strtod() in macros that cause the proper
         radix character to be used.

3 years agot/op/taint.t - Skip failing test on Windows
Steve Hay [Fri, 19 Apr 2019 16:18:21 +0000 (17:18 +0100)]
t/op/taint.t - Skip failing test on Windows

As khw points out on perl #133980, other environment tainting tests are
skipped on Windows (and other platforms) already so it is probably wise
to do likewise for this test too. (It would be nice to understand why the
skip is necessary, though, so leaving ticket open for now...)

3 years agot/io/perlio.t: skips tests if no /tmp
Richard Leach [Tue, 16 Apr 2019 18:59:35 +0000 (18:59 +0000)]
t/io/perlio.t: skips tests if no /tmp

This skips tests that expect there to be a /tmp if there isn't one.

Committer: changed commit message

3 years agoRichard Leach is now a Perl author
Karl Williamson [Fri, 19 Apr 2019 16:07:28 +0000 (10:07 -0600)]
Richard Leach is now a Perl author

3 years agoImport perl5282delta.pod
Steve Hay [Fri, 19 Apr 2019 15:44:32 +0000 (16:44 +0100)]
Import perl5282delta.pod

3 years agoUpdate Unicode 12.1
Karl Williamson [Fri, 19 Apr 2019 15:19:35 +0000 (09:19 -0600)]
Update Unicode 12.1

This takes the few latest changes in the draft Unicode 12.1, ahead of
our freeze.  None are substantive.  No further non-substantive changes
will be added, except in the unlikely event that a substantive change is
made, we will take it and potentially delay Perl 5.30.

3 years agoUpdate Module-CoreList with data for 5.28.2
Steve Hay [Fri, 19 Apr 2019 15:37:35 +0000 (16:37 +0100)]
Update Module-CoreList with data for 5.28.2

3 years agoTick off 5.28.2
Steve Hay [Fri, 19 Apr 2019 15:17:17 +0000 (16:17 +0100)]
Tick off 5.28.2

3 years agoAdd epigraph for 5.28.2
Steve Hay [Fri, 19 Apr 2019 15:16:20 +0000 (16:16 +0100)]
Add epigraph for 5.28.2

3 years agoregcomp.c: Add more taint checking for \p{user-defined}
Karl Williamson [Fri, 19 Apr 2019 15:02:02 +0000 (09:02 -0600)]
regcomp.c: Add more taint checking for \p{user-defined}

User-defined properties are implemented as perl subs.  Prior to this
commit, if tainting had been found during pattern compilation, the sub
wasn't called, and the compilation aborted.  This commit adds checking
that the return of the sub isn't tainted, and if it is tainted, aborts

3 years ago5.28.2 today
Steve Hay [Fri, 19 Apr 2019 14:12:43 +0000 (15:12 +0100)]
5.28.2 today

3 years agoupdate Porting/deparse-skips.txt
David Mitchell [Fri, 19 Apr 2019 12:05:01 +0000 (13:05 +0100)]
update Porting/deparse-skips.txt

Remove 3 test scripts from the list which were expected to fail under
'TEST -deparse', but which now succeed.

This is likely to be due to unrelated changes to those scripts rather
than any specific bug fixes in Deparse.pm itself.

3 years agoDeparse: mark "$a[0]\[1]" TODO
David Mitchell [Fri, 19 Apr 2019 11:57:48 +0000 (12:57 +0100)]
Deparse: mark "$a[0]\[1]" TODO

Currently Deparse fails to output a backslash, turning the result
into a multi-dimensional array lookup. This is a long-standing fault.
For now, mark it TODO, and remove the construct from uni/fold.t, which is
where I first spotted the issue by running 'TEST -deparse'.

3 years agoext/File-Glob/t/rt131211.t: fix timing issues #2
David Mitchell [Fri, 19 Apr 2019 11:38:33 +0000 (12:38 +0100)]
ext/File-Glob/t/rt131211.t: fix timing issues #2

Commit v5.27.8-405-gf548aeca98 from a year ago tweaked this
timing-sensitive test script to reduce false positives.
However, we're still seeing the occasional failure of test 2 in smokes,
so twaks the timing a little further.