perl.git
7 weeks 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.

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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.

7 weeks 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.

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

7 weeks 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

7 weeks 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.

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

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

7 weeks 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

8 weeks 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.

8 weeks 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

8 weeks 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

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

8 weeks 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.

8 weeks 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

8 weeks 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)

8 weeks 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.

8 weeks 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.

8 weeks 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

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

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

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

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

2 months 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

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

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

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

2 months 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

2 months 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

2 months 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.

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

2 months 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

2 months 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.

2 months 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.

2 months 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.

2 months 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

2 months 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

2 months 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.

2 months 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

2 months 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.

2 months 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.

2 months 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

2 months 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

2 months 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.

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

2 months 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

2 months 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.

2 months 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

2 months 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.

2 months 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

2 months 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).

2 months 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.

2 months 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

2 months 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

2 months 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.

2 months 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...)

2 months 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

2 months 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

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

2 months 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.

2 months 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

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

2 months 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

2 months 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

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

2 months 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.

2 months 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'.

2 months 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.

2 months agoupgrade Module-Metadata to 1.000036
Karen Etheridge [Thu, 18 Apr 2019 18:29:31 +0000 (11:29 -0700)] 
upgrade Module-Metadata to 1.000036

1.000036  2019-04-18 18:25:15Z
  - properly clean up temp dirs after testing

2 months agointrpvar.h: Add emphasis to comment
Karl Williamson [Thu, 18 Apr 2019 16:06:47 +0000 (10:06 -0600)] 
intrpvar.h: Add emphasis to comment

2 months agoext/I18N-Langinfo/Langinfo.pm: Fix comments
Karl Williamson [Thu, 18 Apr 2019 16:02:37 +0000 (10:02 -0600)] 
ext/I18N-Langinfo/Langinfo.pm: Fix comments

2 months agoRevert "ignore new temp dirs"
Karen Etheridge [Thu, 18 Apr 2019 18:09:34 +0000 (11:09 -0700)] 
Revert "ignore new temp dirs"

This reverts commit 94945d95701937a050ccc231eafa0087c9a74ee3.

These temp dirs should never be created in the repository itself (if
they are, that's a bug!)

2 months agoignore new temp dirs
Karen Etheridge [Thu, 18 Apr 2019 03:22:55 +0000 (20:22 -0700)] 
ignore new temp dirs

2 months agoupgrade Module-Metadata to 1.000035
Karen Etheridge [Thu, 18 Apr 2019 02:50:09 +0000 (19:50 -0700)] 
upgrade Module-Metadata to 1.000035

1.000035  2019-04-18 02:43:11Z
  - quieten noisy tests (issue #31)

1.000034  2018-07-19 20:26:18Z (TRIAL RELEASE)
  - fix how relative paths are absolutized, so they work properly on MSWin32
    (Christian Walde, PR#24)

2 months agoRevert "skip leaky Storable tests"
David Mitchell [Wed, 17 Apr 2019 08:25:26 +0000 (09:25 +0100)] 
Revert "skip leaky Storable tests"

This reverts commit 2cf75007609600e27520fb4e25a34103543889ca.

The problem the tests were skipped has been resolved by
v5.29.9-142-g1d7b2a7e3a

2 months agos/safefree()/Safefree() in a few places
David Mitchell [Tue, 16 Apr 2019 21:17:45 +0000 (22:17 +0100)] 
s/safefree()/Safefree() in a few places

Karl pointed that a couple of my recent commits used (lower case)
safefree() rather than Safefree(), the latter having extra debugging
facilities.

2 months agomktables: Silence warning
Karl Williamson [Tue, 16 Apr 2019 18:27:15 +0000 (12:27 -0600)] 
mktables: Silence warning

A variable needed to be updated for Unicode 12.1

2 months agofree pseen in the magic free code
Tony Cook [Wed, 17 Apr 2019 01:10:13 +0000 (11:10 +1000)] 
free pseen in the magic free code

2 months agofix leak when $LANG unset
David Mitchell [Tue, 16 Apr 2019 15:49:47 +0000 (16:49 +0100)] 
fix leak when $LANG unset

The following leaked:

    LANG=  perl -e1

because in S_emulate_setlocale(), it was
1) making a copy of $ENV{"LANG"};
2) throwing that copy away and replacing it with "C" when it discovered
   that the string was empty.

A little judicious reordering of that chunk of code makes the issue go
away.

Showed up as failures of lib/locale_threads.t under valgrind / ASan.

2 months agofix locale leaks on utf8 strings
David Mitchell [Tue, 16 Apr 2019 14:48:39 +0000 (15:48 +0100)] 
fix locale leaks on utf8 strings

For example the following leaked:

    require POSIX; import POSIX ':locale_h';

    setlocale(&POSIX::LC_ALL, 'aa_DJ.iso88591') or die;
    use locale;

    my $ok = 'A' lt chr 0x100;

Some code in Perl__mem_collxfrm() does a couple of

    for (j = 1; j < 256; j++) { ... }

loops where for each chr(j) character it recursively calls itself, and
records the index of the 'smallest' / 'largest' result. However, when
updating cur_min_x / cur_max_x, it wasn't freeing the previous value.

The symptoms were that valgrind / Address Sanitizer found fault with
lib/locale.t

2 months agofix locale leak on zero-length strings
David Mitchell [Tue, 16 Apr 2019 14:28:16 +0000 (15:28 +0100)] 
fix locale leak on zero-length strings

For example the following leaked:

    use locale;
    my $le = "" le "";

When a comparison is done within locale scope, PERL_MAGIC_collxfrm
magic is added to the SV. However, the value set for mg_len is the length
of the collated string, not the malloced size of the buffer. This means
that mg_len can be set to zero, which by convention, means that mg_ptr
shouldn't be freed.

For now, fix by putting special-cased code in S_mg_free_struct. After
5.30.0 is out, I'll probably add a PERL_MAGIC_collxfrm-specific svt_free
vtable method.

The symptoms were that valgrind / Address Sanitizer found fault with
lib/locale.t

2 months agohandle an ASAN specific section name parsing nm output on darwin tonyc/libperl-asan
Tony Cook [Tue, 16 Apr 2019 05:24:00 +0000 (15:24 +1000)] 
handle an ASAN specific section name parsing nm output on darwin

ASAN builds can generate a section name of __asan_cstring on darwin,
which could make libperl.t fail.

2 months agoext/POSIX/t/mb.t: Fix osvers= syntax checking
Karl Williamson [Mon, 15 Apr 2019 22:01:49 +0000 (16:01 -0600)] 
ext/POSIX/t/mb.t: Fix osvers= syntax checking

Commit 918fbd43ad287e3a4b8f309a55f91e409747c895 added a test skip to
this .t for early HP-UX platforms.  Unfortunately, due to a machine
crash, I don't have access to such a platform to test it on, and I got
the syntax wrong.  In consulation with Merijn Brand, I believe this
commit gets it right.

2 months agoPATCH: [perl #133945] Perl_strtod failures
Karl Williamson [Mon, 15 Apr 2019 17:10:31 +0000 (11:10 -0600)] 
PATCH: [perl #133945] Perl_strtod failures

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

2 months agoPATCH: [perl #134034] Assert fail in pattern match
Karl Williamson [Mon, 15 Apr 2019 21:08:05 +0000 (15:08 -0600)] 
PATCH: [perl #134034] Assert fail in pattern match

This turned out to be a general problem in regexec.c.  The function
regtry() can change the position we are looking at in the target string.
In particular it can point to just past the end of the string.  Previous
to this commit, we were assuming that the returned string contained
valid data in the returned position, and in many places we assumed that
it was before the end.  This commit fixes that in a bunch of places.

2 months agoPATCH: [perl #134029] Fail assert in pattern wildcard
Karl Williamson [Mon, 15 Apr 2019 18:05:07 +0000 (12:05 -0600)] 
PATCH: [perl #134029] Fail assert in pattern wildcard

The failing pattern has a single character subpattern, which should be
caught and compilation aborted, and this commit now does so.

2 months agoskip leaky Storable tests
David Mitchell [Mon, 15 Apr 2019 10:18:22 +0000 (11:18 +0100)] 
skip leaky Storable tests

A bunch of tests make use of freeze/thaw hooks which deliberately die.
Fixing this looks non-trivial, so this commit just skips those tests
for now if running under Address Sanitizer.

This skip includes a version check, so come 5.31.0 it will start failing
smokes again, providing an incentive to fix.

Example of leaking code:

    use Storable qw(store);
    sub FreezeHookDies::STORABLE_freeze { die ${$_[0]} }
    my $x = bless [], "FreezeHookDies";
    eval { store($x, "store99"); 1 };

2 months agoDan Book is now a perl AUTHOR
Tony Cook [Mon, 15 Apr 2019 00:37:08 +0000 (10:37 +1000)] 
Dan Book is now a perl AUTHOR

2 months agomodernize Exporter usage in perlmod module template
Dan Book [Fri, 8 Mar 2019 00:34:14 +0000 (19:34 -0500)] 
modernize Exporter usage in perlmod module template

TonyC: placate podcheck by wrapping a verbatim line.

2 months agoperldelta for 05fed879afad, 15f67d146cf1, 0a4d1779402e
Tony Cook [Mon, 15 Apr 2019 00:17:35 +0000 (10:17 +1000)] 
perldelta for 05fed879afad15f67d146cf10a4d1779402e

2 months ago(perl #133951) fallback to the built-in getcwd if we can
Tony Cook [Tue, 26 Mar 2019 03:23:53 +0000 (14:23 +1100)] 
(perl #133951) fallback to the built-in getcwd if we can

2 months ago(perl #133951) add Internals::getcwd
Tony Cook [Mon, 25 Mar 2019 05:48:40 +0000 (16:48 +1100)] 
(perl #133951) add Internals::getcwd

2 months ago(perl #133951) don't write an invalid lib/buildcustomize.pl
Tony Cook [Mon, 25 Mar 2019 05:11:16 +0000 (16:11 +1100)] 
(perl #133951) don't write an invalid lib/buildcustomize.pl

Cwd under miniperl (at this point) can't determine the current
directory if some ancestor directory isn't readable.

So Cwd::getcwd() would return undef, and write_buildcustomize.pl
would write out a list of paths relative to / rather than to the cwd.

2 months agoPOSIX/t/mb.t: Skip test on early HP-UX
Karl Williamson [Sun, 14 Apr 2019 19:03:51 +0000 (13:03 -0600)] 
POSIX/t/mb.t: Skip test on early HP-UX

There is a bug in this OS, fixed as of 11.31, in which mblen() doesn't
return the proper result in the UTF-8 locale C.utf8.  Any other UTF-8
locales on this platform are broken for another reason, being that a
bunch of what Perl expects to be punctuation characters aren't.

2 months agoPATCH: [perl #133997] Assert fail with script runs
Karl Williamson [Sun, 14 Apr 2019 01:55:56 +0000 (19:55 -0600)] 
PATCH: [perl #133997] Assert fail with script runs

The cause of this is the emulation of recursion in executing regex
patterns and that the script run feature did not cooperate with it.  The
result is that the input pointers got pushed (but not the script run)
and popped, so that the script run was pointing to something that had
been tried, failed and otherwise popped.

The solution I've adopted is to always push the current script run start
position whenever a push is done; and pop it whenever a pop is done.

If someone has suggestions about this code, please step forward.

2 months agoembed.fnc: Add comment
Karl Williamson [Sat, 13 Apr 2019 22:24:53 +0000 (16:24 -0600)] 
embed.fnc: Add comment

I meant to do this in the previous commit

2 months agoMake a few parse fcns accessible to B::Hooks::Parser
Karl Williamson [Wed, 27 Mar 2019 03:54:03 +0000 (21:54 -0600)] 
Make a few parse fcns accessible to B::Hooks::Parser

This module had made copies of three functions from toke.c many releases
ago, and they stagnated.  Most outside code has no business calling
them, but the least worst choice I believe is to make them accessible,
but hide that fact.

This commit makes them accessible to modules that have defined PERL_EXT.
It does not document their API's, and marks them as subject to change,
so they aren't even listed as available in the docs.  In other words,
you'd have to really go digging to find out you could use them.

And the API of two of the three had changed since the code was
originally stolen.  So that "subject to change" actually has happened.
We should feel free to change the API as needed, and B::Hooks::Parser
will have to be updated.

Thanks to Tony Cook for advising me on this area unfamiliar to me.