This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 months agoExclude get_context on non-win32 in makedef.pl
Craig A. Berry [Sun, 26 Mar 2023 01:26:54 +0000 (20:26 -0500)]
Exclude get_context on non-win32 in makedef.pl

Otherwise we'll try (and fail) to make a global symbol for a
static inline function.

13 months ago.PHONY not portable in dist/Locale-Maketext/Makefile.PL
Craig A. Berry [Sat, 8 Apr 2023 15:15:55 +0000 (10:15 -0500)]
.PHONY not portable in dist/Locale-Maketext/Makefile.PL

It breaks the build on VMS because .PHONY is a syntax error in
the native make-like utilities.  It probably also breaks nmake
builds on Windows.

The solution here is to exclude the .PHONY directive unless running
under gmake or bsdmake.

13 months agoDevel::PPPort: Fix broken pod link
Karl Williamson [Thu, 13 Apr 2023 15:40:32 +0000 (09:40 -0600)]
Devel::PPPort: Fix broken pod link

ppport.h is pod, but the link to it, removed by this commit, is broken,
resulting in a 404 "Raptor not found" from

https://perldoc.perl.org/Devel::PPPort#SEE-ALSO

This commit changes the mention of the file from a link to a F<>.

13 months agoperl5376delta - Remove erroneous hyphen (fixes #21014)
Dan Book [Wed, 12 Apr 2023 02:21:10 +0000 (22:21 -0400)]
perl5376delta - Remove erroneous hyphen (fixes #21014)

13 months agoPorting/epigraphs - Add epigraph for 5.36.1-RC2
Steve Hay [Tue, 11 Apr 2023 19:58:41 +0000 (20:58 +0100)]
Porting/epigraphs - Add epigraph for 5.36.1-RC2

13 months ago5.36.1-RC2 today
Steve Hay [Tue, 11 Apr 2023 19:02:57 +0000 (20:02 +0100)]
5.36.1-RC2 today

13 months agoPorting/epigraphs - Add epigraph for 5.36.1-RC1
Steve Hay [Mon, 10 Apr 2023 20:24:50 +0000 (21:24 +0100)]
Porting/epigraphs - Add epigraph for 5.36.1-RC1

13 months ago5.36.1-RC1 today
Steve Hay [Mon, 10 Apr 2023 19:00:31 +0000 (20:00 +0100)]
5.36.1-RC1 today

13 months agoperlhist - Minor fix to list of pumpkin keepers
Steve Hay [Mon, 10 Apr 2023 18:47:59 +0000 (19:47 +0100)]
perlhist - Minor fix to list of pumpkin keepers

13 months agoExpand a few recent links in epigraphs.pod
Steve Hay [Mon, 10 Apr 2023 11:33:16 +0000 (12:33 +0100)]
Expand a few recent links in epigraphs.pod

13 months agoFill in release schedule up to 5.38.0
Steve Hay [Sun, 9 Apr 2023 19:34:22 +0000 (20:34 +0100)]
Fill in release schedule up to 5.38.0

(including a 5.36.1, currently aiming for 23 April)

13 months agoregen/HeaderParser.pm - improved expression formatting and wrapping
Yves Orton [Tue, 28 Mar 2023 19:57:22 +0000 (21:57 +0200)]
regen/HeaderParser.pm - improved expression formatting and wrapping

Karl complained about some of the wrapping logic we use for expressions.
This tweaks the rules in a number of different ways in an attempt to
produce more legible expressions. For instance if we have a complex
expression with different parenthesized sub expressions, then try to put
each sub expression on its own line. A previous patch ensures that we
put shorter sub expressions first, and this patch builds on that to put
each sub expression on its own line.

We also use different logic to wrap the expressions, with the end result
that each line should have the same number of defined() operations on it
(with the exception of the last). We also try harder to line up
logical operators and defined() functions.

13 months agoregen/HeaderParser.pm - remove comments from elif/else/endif when the contents is...
Yves Orton [Tue, 28 Mar 2023 13:36:31 +0000 (15:36 +0200)]
regen/HeaderParser.pm - remove comments from elif/else/endif when the contents is short

it is a bit "noisy" to have comments that duplication the conditions
when the original line with the condition is visible on the screen at
the same time. this patch changes the rules so we only add these comments
when the clause is 10 lines or more from its prior

13 months agoembed.fnc - remove incorrect comment
Yves Orton [Tue, 28 Mar 2023 13:32:52 +0000 (15:32 +0200)]
embed.fnc - remove incorrect comment

which in turn allows the nested if clauses to be merged

13 months agoregen/HeaderParser.pm - with multi-term expressions put least first
Yves Orton [Tue, 28 Mar 2023 12:38:01 +0000 (14:38 +0200)]
regen/HeaderParser.pm - with multi-term expressions put least first

if we have defined(X) && (defined(Y) || defined(Z)) put the defined(X)
first because it has less operations in it.

13 months agothreads.xs: Set non thread context in ithread_set()
Karl Williamson [Tue, 28 Mar 2023 02:25:35 +0000 (20:25 -0600)]
threads.xs: Set non thread context in ithread_set()

This generally was getting set anyway, but a test yet to be committed
found a case where it wasn't.

13 months agoworkflows/testsuite.yaml - Add testing of -DNO_TAINT_SUPPORT
Yves Orton [Fri, 31 Mar 2023 19:29:02 +0000 (21:29 +0200)]
workflows/testsuite.yaml - Add testing of -DNO_TAINT_SUPPORT

Test that we can pass test with -DNO_TAINT_SUPPORT but without
-DSILENT_NO_TAINT_SUPPORT. Both disable taint mode, but the latter
causes -t and -T to be silently ignored, whereas the former by itself
causes use of -t and -T to throw fatal exceptions during process
startup.

13 months agotest infra - Under -DNO_TAINT_SUPPORT skip tests that use -T or -t
Yves Orton [Fri, 31 Mar 2023 11:22:15 +0000 (13:22 +0200)]
test infra - Under -DNO_TAINT_SUPPORT skip tests that use -T or -t

This patch uses a collection of heuristics to skip test files which
would die on a perl compiled with -DNO_TAINT_SUPPORT but without
-DSILENT_NO_TAINT_SUPPORT.

-DNO_TAINT_SUPPORT disables taint support in a "safe" way, such that if
you try to use taint mode with the -t or -T options an exception will be
thrown informing you that the perl you are using does not support taint.
(The related setting -DSILENT_NO_TAINT_SUPPORT disables taint support
but causes the -t and -T options to be silently ignored.)

The error from using -t and -T is thrown very early in the process
startup and there is no way to "gracefully" handle it and convert it
into something else, for instance to skip a test file which contains it.

This patch generally fixes our code to skip these tests.

* Make t/TEST and t/harness check shebang lines and use filename checks
  to filter out tests that use -t or -T. Primarily this is the result of
  checking their shebang line, but some cpan/ files are excluded by
  name, either from a very short list of exclusions, or because their
  file name contains the word "taint". Non-cpan test files were fixed
  individually as noted below.

* test.pl - make run_multiple_progs() skip test cases based on the
  switches that are part of the test definition. This function is
  used in a great deal of our internal tests, so it fixes a lot of
  tests in one go.

* XS-APITest/t/call.t, t/run/switchDX.t, lib/B/Deparse.t - Skip a small
  set of tests in each file.

13 months agoworkflows/testsuite.yml - Automatically test without taint support
David Cantrell [Sat, 25 Mar 2023 22:46:01 +0000 (22:46 +0000)]
workflows/testsuite.yml - Automatically test without taint support

Add an entry for -DSILENT_NO_TAINT_SUPPORT to our linux based test
matrix. Currently we cannot do the same for plain -DNO_TAINT_SUPPORT
as it chokes on -t and -T on the command line.

[Committers note: edited commit message to add detail]

13 months agoConfig.pm - add taint_disabled and taint_support to %Config
Yves Orton [Wed, 29 Mar 2023 09:51:05 +0000 (11:51 +0200)]
Config.pm - add taint_disabled and taint_support to %Config

This adds 'taint_disabled' and 'taint_support' to Config.pm and %Config.
This way people can use them while we decide what to do about the
changes to Configure. We shouldn't need to have Configure changed to
export status variables like this in Config.pm

See: https://github.com/Perl-Toolchain-Gang/Test-Harness/pull/118
and: https://github.com/Perl/perl5/pull/20972

for related work that is stalled because we have not decided what
to do about these variables.

13 months agoDeparse: fix scalar-proto sub calls without arguments
Lukas Mai [Thu, 30 Mar 2023 00:42:40 +0000 (02:42 +0200)]
Deparse: fix scalar-proto sub calls without arguments

- fix (;$)
- remove infinite loops from check_proto()
- implement (+)
- fix (\@) and (\%)

Fixes GH #20989.

13 months agoperlretut: use a numbered list to format a numbered list
Lukas Mai [Fri, 31 Mar 2023 07:59:31 +0000 (09:59 +0200)]
perlretut: use a numbered list to format a numbered list

Manually messing around with Z<> and E<nbsp> just ends up looking weird
in some formatters. See for example
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033649>.

Use POD's built-in support for numbered lists instead. (Also, add the
missing "." after some numbers in the first list.)

Fixes #20997.

13 months agoregexec.c: fix warning about unused argument to capture_clear
Lukas Mai [Thu, 30 Mar 2023 17:17:56 +0000 (19:17 +0200)]
regexec.c: fix warning about unused argument to capture_clear

Previously:

    regexec.c: In function ‘S_capture_clear’:
    regexec.c:373:72: warning: unused parameter ‘str’ [-Wunused-parameter]
      373 | S_capture_clear(pTHX_ regexp *rex, U16 from_ix, U16 to_ix, const char *str comma_pDEPTH) {
          |                                                            ~~~~~~~~~~~~^~~

13 months agolocale.c: Don't use bit-wise 'or' when bool is meant
Karl Williamson [Mon, 27 Mar 2023 23:57:02 +0000 (17:57 -0600)]
locale.c: Don't use bit-wise 'or' when bool is meant

This thinko was exposed by smoke tests using an uncommitted test.

PEBKAC

13 months agoParseXS: Correct colon translation of $type in OUTPUT section
Leon Timmermans [Wed, 29 Mar 2023 15:13:07 +0000 (17:13 +0200)]
ParseXS: Correct colon translation of $type in OUTPUT section

The $type variable in typemaps is documented as in perlxstypemap as
"any : replaced with _", however currently it only does so in INPUT
sections. This will also make it do the same in OUTPUT sections.

13 months agot/porting/bincompat.t - test the code itself not just the output
Yves Orton [Wed, 29 Mar 2023 17:09:38 +0000 (19:09 +0200)]
t/porting/bincompat.t - test the code itself not just the output

Our checks on the define info we expose via Internals::V(), especially
the sorted part, did not really work properly as it only checked defines
that are actually exposed in our standard builds.  Many of the defines
that are exposed in this list are special cases that would not be
enabled in a normal build we test under CI, and indeed prior to this
patch it was possible for us to produce unsorted output if certain
defines were enabled.

This patch adds checks that reads the actual code.  It checks that the
define and the string are the same, and it checks that strings would be
output in sorted order assuming every define was enabled.

There are two historical exceptions where the string we show and the
define use internally are different, but we work around these two cases
with as special case hash.

13 months agoop.c: use consistent spacing around = and ,
Lukas Mai [Thu, 30 Mar 2023 07:21:54 +0000 (09:21 +0200)]
op.c: use consistent spacing around = and ,

... in the Module::Install::DSL hack. Also, move `{` up to the same line
as the controlling `if` for consistency with the rest of the file.

13 months agoop.c: remove unneeded variable
Lukas Mai [Wed, 29 Mar 2023 21:42:49 +0000 (23:42 +0200)]
op.c: remove unneeded variable

`is_module_install_hack` is a local variable in S_process_special_blocks
that is only used to silently treat INIT blocks (in package
Module::Install::DSL) as BEGIN blocks. But instead of setting the
variable and jumping before the `if` block that checks the variable, we
can just jump into the block and get rid of the variable.

13 months agoedit a comment in op.c that confused me
Lukas Mai [Wed, 29 Mar 2023 21:28:46 +0000 (23:28 +0200)]
edit a comment in op.c that confused me

13 months agoPerl RFC have been renamed to PPC
Philippe Bruhat (BooK) [Mon, 27 Mar 2023 23:10:01 +0000 (01:10 +0200)]
Perl RFC have been renamed to PPC

13 months agoFix some wording per @demerphq
Scott Baker [Wed, 29 Mar 2023 16:12:45 +0000 (09:12 -0700)]
Fix some wording per @demerphq

13 months agoAdd docs for BEGIN, INIT, CHECK for pop()
Scott Baker [Thu, 9 Feb 2023 19:48:31 +0000 (11:48 -0800)]
Add docs for BEGIN, INIT, CHECK for pop()

13 months agoAdd a section about additional blocks
Scott Baker [Thu, 9 Feb 2023 16:52:52 +0000 (08:52 -0800)]
Add a section about additional blocks

13 months agoUpdate shift() docs with examples
Scott Baker [Wed, 8 Feb 2023 22:52:59 +0000 (14:52 -0800)]
Update shift() docs with examples

Make wording consistent

Foobar

13 months agoUpdate pop() docs with examples
Scott Baker [Wed, 8 Feb 2023 22:39:02 +0000 (14:39 -0800)]
Update pop() docs with examples

13 months agodist/Net-Ping - remove HPUX from the exclusions list in 450_service.t
Yves Orton [Sat, 25 Mar 2023 19:28:35 +0000 (20:28 +0100)]
dist/Net-Ping - remove HPUX from the exclusions list in 450_service.t

We pass these tests just fine on HPUX 11.31.

13 months agoPorting/maintainers.pl - remove Net-Ping customized files
Yves Orton [Sat, 25 Mar 2023 19:26:19 +0000 (20:26 +0100)]
Porting/maintainers.pl - remove Net-Ping customized files

Net-Ping is in dist/ which means we are upstream, so there should
not be any customized files.

13 months agot/porting/globvar.t - fix for HPUX
Yves Orton [Sat, 25 Mar 2023 13:20:03 +0000 (14:20 +0100)]
t/porting/globvar.t - fix for HPUX

On HPUX `nm globals.o` produces output like this (without the indent):

    [5]    |                  2420|       2|OBJT |GLOB |0| .rodata|PL_Yes

So change the $define qr// to accommodate it.

We also have to TODO some of the tests, as HPUX seems to export
everything.

13 months agohints/hpux - only run d_strtold define override check on version < 11.23
Yves Orton [Sat, 25 Mar 2023 12:18:10 +0000 (13:18 +0100)]
hints/hpux - only run d_strtold define override check on version < 11.23

I added a version check around the logic as the comment already says
that "In HP-UXes prior to 11.23 strtold() returned a HP-UX specific
union called long_double, not a C99 long double."

The logic did not check for the version mentioned in the comment, it
simply greped for something that is no longer present in the file:

    grep 'double strtold.const' /usr/include/stdlib.h

outputs nothing on HPUX version B.11.31.

But

    grep "double strtold" /usr/include/stdlib.h

outputs:

    extern long_double strtold __((const char * __restrict, char ** __restrict));
    extern long double strtold __((const char * __restrict, char ** __restrict));

on HPUX version B.11.31.

13 months agoperl.c - show HAS_LONG_DOUBLE and HAS_STRTOLD as well as USE_LONG_DOUBLE
Yves Orton [Sat, 25 Mar 2023 11:37:01 +0000 (12:37 +0100)]
perl.c - show HAS_LONG_DOUBLE and HAS_STRTOLD as well as USE_LONG_DOUBLE

Makes it easier to debug long double issues.

13 months agothreads-shared - use pure pragma version of CLANG_DIAG_IGNORE
Yves Orton [Thu, 23 Mar 2023 11:51:44 +0000 (12:51 +0100)]
threads-shared - use pure pragma version of CLANG_DIAG_IGNORE

Otherwise HPUX complains about unreachable statements.

"shared.xs", line 707: warning #2111-D: statement is unreachable
        CLANG_DIAG_RESTORE_STMT;
        ^

This version should do the same thing, the only difference being
it doesnt allow a semicolon on the macro call.

13 months agodist/threads - use pure pragma form of CLANG_DIAG_IGNORE in threads.xs
Yves Orton [Thu, 23 Mar 2023 11:47:42 +0000 (12:47 +0100)]
dist/threads - use pure pragma form of CLANG_DIAG_IGNORE in threads.xs

Otherwise on HPUX we get warnings

    "threads.xs", line 1057: warning #2111-D: statement is unreachable
          CLANG_DIAG_IGNORE_STMT(-Wthread-safety);

13 months agointrpvar - ignore deprecated warning on MSVC as well
Yves Orton [Thu, 23 Mar 2023 11:33:51 +0000 (12:33 +0100)]
intrpvar - ignore deprecated warning on MSVC as well

13 months agointrpvar.h - silence deprcation warning on HPUX
Yves Orton [Thu, 23 Mar 2023 11:28:37 +0000 (12:28 +0100)]
intrpvar.h - silence deprcation warning on HPUX

We were already silencing it on GCC, so lets add HPUX to the party.
Unfortunately I have not figured out a way to have a nice neat define
for it like we have for GCC or MSVC. :-(

Silences this:
    "intrpvar.h", line 941: warning #3215-D: function "Perl_sv_nounlocking"
              (declared at line 5934 of "proto.h") was declared deprecated
      PERLVARI(I, unlockhook,       share_proc_t, PERL_UNLOCK_HOOK)
      ^

We probably should add the same for MSVC as well.

13 months agoutil.c - avoid warning about truncated pointer value
Yves Orton [Thu, 23 Mar 2023 10:50:54 +0000 (11:50 +0100)]
util.c - avoid warning about truncated pointer value

This code is part of the fallback rng initialization, it should
only be used in odd circumstances, and it is intended to be "random"ish,
so the logic change should not be a problem.

This more or less reverts commit 4b4c4ab35e70f005167c863eae6d2003492c393c,
although the S_ptr_hash() now lives in util.c instead of hv.c.

Turns out having a decent pointer hash /is/ useful.

13 months agoutil.c - assign HS_GETXSVERLEN() to var before assert
Yves Orton [Thu, 23 Mar 2023 10:42:56 +0000 (11:42 +0100)]
util.c - assign HS_GETXSVERLEN() to var before assert

This makes it easier to see the value with gdb, and also avoids an
assignment in the if condition body.

13 months agoperlio.c - double cast PerlIO_lockcnt()
Yves Orton [Wed, 22 Mar 2023 19:17:49 +0000 (20:17 +0100)]
perlio.c - double cast PerlIO_lockcnt()

This avoids various warnings about alignment on HPUX.

13 months agoDevel-PPPort - deal with signed klen in check_HeUTF8
Yves Orton [Wed, 22 Mar 2023 19:15:54 +0000 (20:15 +0100)]
Devel-PPPort - deal with signed klen in check_HeUTF8

Some of the HV logic uses a negative key length to indicate utf8
keys, and this logic was using an unsigned keylength, which obviously
does not work

13 months agonumeric.c - change logical && to bitwise & in nantype test
Yves Orton [Wed, 22 Mar 2023 19:04:10 +0000 (20:04 +0100)]
numeric.c - change logical && to bitwise & in nantype test

This appears to have been broken since 2015, found by HPUX compiler warnings:

    "numeric.c", line 927: warning #4277-D: logical AND with a constant, do you
          mean to use '&'?
                          !(nantype && IS_NUMBER_IN_UV)) {

13 months agoregcomp.c - eliminate assignment in while condition
Yves Orton [Wed, 22 Mar 2023 18:43:52 +0000 (19:43 +0100)]
regcomp.c - eliminate assignment in while condition

This gives covertiy heartburn, and also makes the HPUX compiler
whine. Reworking it so that it is a while 1 and the condition determines
if we break out of the loop resolves the heartburn and makes for more
readable code.

13 months agoExtUtils-ParseXS - silence warnings about unreached code in generated XS code
Yves Orton [Wed, 22 Mar 2023 11:12:00 +0000 (12:12 +0100)]
ExtUtils-ParseXS - silence warnings about unreached code in generated XS code

On HPUX we get a lot of:

"APItest.c", line 4004: warning #2111-D: statement is unreachable: PUTBACK

because people have used something like XSRETURN(1); and we generate
code that does PUTBACK; return; Adding a pragma to silence it makes the builds
happier;

13 months agot/op/sprintf2 - TODO some failing tests for %g.
Yves Orton [Wed, 22 Mar 2023 10:02:13 +0000 (11:02 +0100)]
t/op/sprintf2 - TODO some failing tests for %g.

On HPUX none of the usual methods for doing high precision %g seem to
work:

    Checking for an efficient way to convert floats to strings.
    Trying sprintf...
    sprintf() found.
    sprintf length mismatch:  Expected 55, got 38
    ...But sprintf didn't work as I expected.
    Trying gconvert...
    gconvert NOT found.
    Trying gcvt...
    gcvt() found.
    gcvt length mismatch:  Expected 55, got 38
    ...But gcvt didn't work as I expected.
    *** WHOA THERE!!! ***
    None of ( sprintf gconvert gcvt)  seemed to work properly.  I'll use sprintf.

So we can safely TODO these tests for now.

See: https://github.com/Perl/perl5/issues/20953#issuecomment-1478744988
and: https://github.com/Perl/perl5/issues/20953#issuecomment-1483814118

Fixes: #20953
And also some issues in: #20959

13 months agoPorting/cmpVERSION.pl - deal with old git clients better in tag date parsing
Yves Orton [Wed, 22 Mar 2023 09:39:30 +0000 (10:39 +0100)]
Porting/cmpVERSION.pl - deal with old git clients better in tag date parsing

The HPUX box we smoke on does not have a modern git and chokes
on taggerdate:unix, so we use taggerdata:iso8601 instead, and
then parse the date with Time::Local.

13 months agosv.c - don't cast SVTYPEMASK to svtype, use SvIS_FREED() instead.
Yves Orton [Wed, 22 Mar 2023 08:51:39 +0000 (09:51 +0100)]
sv.c - don't cast SVTYPEMASK to svtype, use SvIS_FREED() instead.

svtype is an enum with 18 values. SVTYPEMASK is 31. A picky compiler
(like on HPUX) will complain that casting 31 to a svtype is an error.

We have SvIS_FREED() to do this properly anyway.

13 months agoregexec.c - mark the bottom of a sub as never reached
Yves Orton [Wed, 22 Mar 2023 08:50:45 +0000 (09:50 +0100)]
regexec.c - mark the bottom of a sub as never reached

We used to have a return statement here that picky compilers
would complain about.

13 months agoregcomp.c - simplify logic to eliminate unreached code
Yves Orton [Wed, 22 Mar 2023 08:46:41 +0000 (09:46 +0100)]
regcomp.c - simplify logic to eliminate unreached code

We always goto out of this if, so eliminate the unreached code
and also eliminate the useless else block.

13 months agopp_sys.c - suppress warning about comparison to unsigned value
Yves Orton [Wed, 22 Mar 2023 08:46:16 +0000 (09:46 +0100)]
pp_sys.c - suppress warning about comparison to unsigned value

13 months agoop.c - deal with not-reached statement warning
Yves Orton [Wed, 22 Mar 2023 08:44:33 +0000 (09:44 +0100)]
op.c - deal with not-reached statement warning

The return statement could never be reached as the while loop
is while(1) and there is no break statement inside of it. This
patch replaces the 'return arg;' with a NOT_REACHED; assertion,
just in case someone does add a break later on without thinking.

13 months agopeep.c - ensure deferred_queue is initialized before use
Yves Orton [Tue, 21 Mar 2023 21:31:31 +0000 (22:31 +0100)]
peep.c - ensure deferred_queue is initialized before use

HPUX was warning that it can be used before it is initialized.
There is no cost to nulling it out early so do so.

13 months agoregcomp.h - use a common union for head and args across all regnodes.
Yves Orton [Tue, 21 Mar 2023 21:02:48 +0000 (22:02 +0100)]
regcomp.h - use a common union for head and args across all regnodes.

This helps with HPUX builds where we need to ensure everything
is aligned the same (on 32 bit boundaries). It also strongly
encourages everything to use the accessor macros and not access
the members directly.

By using a union for the variadic fields we make it more obvious
that some regops use the field in different ways. This patch
also converts all the arg unions into a standardized union with
standardized member names.

13 months agoregcomp.h - use different struct member names for U8 vs U32 str_len
Yves Orton [Tue, 21 Mar 2023 20:48:18 +0000 (21:48 +0100)]
regcomp.h - use different struct member names for U8 vs U32 str_len

It is confusing to have two different members, at different struct
offsets and with different sizes, with the same name. So rename them
so they have different names that include their size so it is obvious
what is going on.

13 months agoperl.h - silence certain warnings on HPUX globally.
Yves Orton [Tue, 21 Mar 2023 18:37:04 +0000 (19:37 +0100)]
perl.h - silence certain warnings on HPUX globally.

There are two warnings classes which account for a very large number of
the warnings produced when building on HPUX Itanium. We know the cause
of these warnings and we are ok with ignoring them.

One set comes from our memory wrap checks, where we end up doing a
comparison against constants in certain conditions. See the comments in
handy.h line 2723 related to PERL_MALLOC_WRAP.

The other set comes from our common "trick" of doing OO in C code with
casting. This is the foundation of how we manage SV types and how we
manage regular expression ops (regops).

If this logic really was a problem then we would have lots of test
failures and segfaults, and we do not, so we can silence them.

13 months agolocale.c: get_displayable_string: Check bad input
Karl Williamson [Mon, 27 Mar 2023 23:38:17 +0000 (17:38 -0600)]
locale.c: get_displayable_string: Check bad input

Just refuse to go out of bounds on an empty string

13 months agoutf8.h: Add comment
Karl Williamson [Tue, 28 Mar 2023 12:07:33 +0000 (06:07 -0600)]
utf8.h: Add comment

13 months agoperlre: Fix grammar
Karl Williamson [Tue, 28 Mar 2023 12:11:11 +0000 (06:11 -0600)]
perlre: Fix grammar

In a list, only the final item has an 'and'

13 months agot/harness - rework App::Prove::State setup to not warn and use customizable state...
Yves Orton [Sat, 25 Mar 2023 10:32:18 +0000 (11:32 +0100)]
t/harness - rework App::Prove::State setup to not warn and use customizable state file

Currently we only store state if we are running parallel tests, so if
you run the tests in series we do not store data on how long they took,
and we can't use that information in a follow up parallel test run.

We also do not allow the state file to be customized to be outside of
the repo, so git clean -dfx wipes it. This means you can't keep your
test data over time, which can be a bit annoying.

We also currently construct the state object twice during setup,
resulting in two (useless) warnings when the state file is missing,
which also doubles the time to set up the tests because the yaml file
gets read twice, and not very efficiently either.

This patch changes the logic so that we initialize the state object only
once during startup, and we use the state file if we are going to run
tests, parallel or not, provided the user does not explicitly disable it
(see below). The order that tests are run is affected only when the
tests are run in parallel.

It also allows the user to specify where the state file should live,
with the $ENV{PERL_TEST_STATE_FILE} environment variable, which can be
set to 0 or the empty string to disable use of the state file if needed.

We also take care to silence the warning about an empty state file,
except in the case where the user has overriden the file name with the
$ENV{PERL_TEST_STATE_FILE}.

Lastly this patch disables loading the state data /at all/, when
the dump_tests option is invoked. There is no need nor point to
load the state data when we are simply going to dump out the list
of tests we will run.

13 months agocpan/ExtUtils-MakeMaker - Update to version 7.70
Yves Orton [Sun, 26 Mar 2023 14:21:36 +0000 (16:21 +0200)]
cpan/ExtUtils-MakeMaker - Update to version 7.70

7.70    Sun 26 Mar 14:13:20 BST 2023

    No changes since v7.69_01

7.69_01 Sat 25 Mar 11:06:19 GMT 2023

    Core reversions:
    - Reverted the PERL_CORE and PERL_SRC changes from v7.67_02
      These will be reintroduced after more testing in core

7.68    Tue 14 Mar 21:38:00 GMT 2023

    No changes since v7.67_02

7.67_02 Mon  6 Mar 10:53:22 GMT 2023

    Core fixes:
    - initialize PERL_CORE object var early and use it consistently
    - only search for PERL_SRC when PERL_CORE is true or unset

    Clean-ups:
    - remove use vars from non-bundled modules
    - remove unused _find_magic_vstring function

7.67_01 Wed  1 Mar 12:38:00 GMT 2023

    Bug fixes:
    - Treat MidnightBSD as a BSD
    - fix MIN_PERL_VERSION for perl versions with underscores

    Test fixes:
    -  t/.../More.pm - remove isn't: apostrophe as a package sep is deprecated

13 months agoPorting/sync-with-cpan - pickup ExtUtils::MakeMaker changes better
Yves Orton [Wed, 15 Mar 2023 11:27:33 +0000 (12:27 +0100)]
Porting/sync-with-cpan - pickup ExtUtils::MakeMaker changes better

ExtUtils::MakeMaker makes heavy use of dev releases, so the most recent change entry
does not contain much. This patch makes it so we read the full set of changes since
the last change when doing an update.

13 months ago[doc] update description of $^H and %^H in perlvar
Lukas Mai [Tue, 28 Mar 2023 07:14:35 +0000 (09:14 +0200)]
[doc] update description of $^H and %^H in perlvar

- remove trailing spaces
- add hyperlink to "caller" in perlfunc
- add hyperlink to $^H in description of %^H
- change "pointers to objects" to "references to objects"
- change "semantic" to "semantics"
- reword "useful for implementation of pragmas" as "useful for
  implementing pragmas"

13 months agoreport uninit variable name even in optimized cases
Lukas Mai [Mon, 20 Mar 2023 14:39:42 +0000 (15:39 +0100)]
report uninit variable name even in optimized cases

Several cases that used to be simple assignment ops with lexical
variables have been optimized in some way:

 - $foo = undef is now a single OP_UNDEF with special flags
 - $foo = ... is now a single OP_PADSV_STORE
 - $foo[0] = ... is now a single OP_AELEMFASTLEX_STORE

This is mostly transparent to users, except for "Use of uninitialized
value" warnings, which previously mentioned the name of the undefined
variable, but don't do so anymore in blead.

This commit teaches find_uninit_var() about the new ops, so error
messages for these ops can mention variable names again.

Fixes #20945.

13 months ago[doc] clarify behavior of File::Copy::cp re: permissions
Lukas Mai [Thu, 23 Mar 2023 14:13:33 +0000 (15:13 +0100)]
[doc] clarify behavior of File::Copy::cp re: permissions

In particular, explain that "preserve permission bits like cp" means the
default behavior of /bin/cp, not "cp -p" or "cp --preserve", so the
umask still applies.

13 months agodon't set a special filetype for generated .gitignore
Lukas Mai [Thu, 23 Mar 2023 16:43:28 +0000 (17:43 +0100)]
don't set a special filetype for generated .gitignore

Previously it would default to Perl, which happens to produce the right
comment character ("#"), but results in nonsensical syntax highlighting.
Now we set $lang to the special value 'None', which still produces
read-only declarations, but doesn't force a mode/filetype on editors.

13 months agofix incorrect vi filetype declarations in generated files
Lukas Mai [Thu, 23 Mar 2023 16:07:03 +0000 (17:07 +0100)]
fix incorrect vi filetype declarations in generated files

Vim's filetype declarations are case sensitive. The correct types for
Perl, C, and Pod are perl, c, and pod, respectively.

13 months agoperlio.c: remove silly casts
Lukas Mai [Wed, 22 Mar 2023 19:56:01 +0000 (20:56 +0100)]
perlio.c: remove silly casts

13 months agoperldelta for 51675517951
Tony Cook [Thu, 23 Mar 2023 03:54:12 +0000 (14:54 +1100)]
perldelta for 51675517951

13 months agogetsockopt: increase the buffer size for getsockopt()
Tony Cook [Wed, 8 Mar 2023 04:39:53 +0000 (15:39 +1100)]
getsockopt: increase the buffer size for getsockopt()

As suggested in the ticket, the buffer size is now 1024 by default,
but this can be adjusted at perl build time with:

  -Accflags=-DPERL_GETSOCKOPT_SIZE=2048

or similarly with hints.

I considered making this adjustable with a ${^...} variable, but that
seemed excessive.

I don't see a practical way to regression test this, TCP_INFO is
non-portable.  I did examine strace output for a one-liner that
calls getsockopt() and the new buffer size was used.

Fixes #19758

13 months agoperl.h - remove redundant /*EMPTY*/ comment
Yves Orton [Wed, 22 Mar 2023 10:39:05 +0000 (11:39 +0100)]
perl.h - remove redundant /*EMPTY*/ comment

mauke: it was added by Andy Lester in 6f207bd3ddac24959aa7f00f2d7a66f116dcc7ed
mauke: when he replaced '/*EMPTY*/;' statements by 'NOOP;'
mauke: I would also remove the comment

13 months agofix precedence issue with NOOP
Zefram [Wed, 22 Mar 2023 10:19:20 +0000 (11:19 +0100)]
fix precedence issue with NOOP

Parens are required or precedence issues can occur.

13 months agot/porting/test_testlist.t - test that we test the same thing with t/harness and t...
Yves Orton [Sat, 18 Mar 2023 21:31:56 +0000 (22:31 +0100)]
t/porting/test_testlist.t - test that we test the same thing with t/harness and t/TEST

Also that we test everything expected in MANIFEST.

Also includes some fixups to t/TEST to deal with the fact
that List/Util is not anymore the name of a distribution
even though it is the name of an extension. Same for Cwd.

13 months agot/TEST - rework poor mans getopt
Yves Orton [Sun, 19 Mar 2023 17:58:11 +0000 (18:58 +0100)]
t/TEST - rework poor mans getopt

Less cryptic and repetitive code.

13 months agot/TEST - glob @ARGV after we setup @INC properly (win32 only)
Yves Orton [Sun, 19 Mar 2023 17:42:44 +0000 (18:42 +0100)]
t/TEST - glob @ARGV after we setup @INC properly (win32 only)

On win32 we glob the arguments passed into @ARGV. *However*, this was
done in an unsafe way that could result in @ARGV being empty if 'lib'
was not in @INC prior to execution. Also it was being done in an eval
STRING to avoid loading File::Glob unnecessarily, but with no error
checking of the eval.

In fact this logic was firing much too early, before option parsing, and
before @INC was set up properly.

This patch moves this logic to much later, after any options are parsed
out and after @INC is set up, which should reduce or eliminate the
chance it dies. It also reworks the logic so that if the eval does die
that the entire script dies as well.

13 months agoCast to avoid a signedness-comparison warning
Paul "LeoNerd" Evans [Tue, 21 Mar 2023 17:20:48 +0000 (17:20 +0000)]
Cast to avoid a signedness-comparison warning

13 months agoCast result of hv_store_ent() to (void) to quiet an HPUX compiler warning
Paul "LeoNerd" Evans [Tue, 21 Mar 2023 17:13:20 +0000 (17:13 +0000)]
Cast result of hv_store_ent() to (void) to quiet an HPUX compiler warning

13 months agoBump version to 5.37.11, update Module-CoreList
Yves Orton [Tue, 21 Mar 2023 10:04:25 +0000 (11:04 +0100)]
Bump version to 5.37.11, update Module-CoreList

Module-CoreList was synced with CPAN and had its version in
Porting/Maintainers.pl updated. Module-CoreList was also updated
by running:

        ./perl -Ilib Porting/corelist.pl cpan

With some manual fixups afterwards to make it pass test.

13 months agomake sync-with-cpan support dist as well
Yves Orton [Tue, 21 Mar 2023 10:40:58 +0000 (11:40 +0100)]
make sync-with-cpan support dist as well

This way it can be used to sync Module-CoreList as well.

13 months agoNew perldelta for 5.37.11
Yves Orton [Tue, 21 Mar 2023 09:30:02 +0000 (10:30 +0100)]
New perldelta for 5.37.11

13 months agorelease_schedule.pod - update to reflect 5.37.10 is released
Yves Orton [Tue, 21 Mar 2023 09:23:28 +0000 (10:23 +0100)]
release_schedule.pod - update to reflect 5.37.10 is released

13 months agorelease_managers_guide.pod - tweak metacpan location to check for the release
Yves Orton [Tue, 21 Mar 2023 09:14:58 +0000 (10:14 +0100)]
release_managers_guide.pod - tweak metacpan location to check for the release

After 30 minutes of waiting I did not see an update to author/YOUR_PAUSE_ID,
but I did see updates to the urls I have replaced it with.

13 months agoepigraphs.pod - add epigraph from 5.37.10
Yves Orton [Tue, 21 Mar 2023 09:07:34 +0000 (10:07 +0100)]
epigraphs.pod - add epigraph from 5.37.10

My dad had beautiful handwriting, and whenever he got a new pen he would
write out this stanza of Lewis Carrolls poem on the blue lined paper he
used to write his notes on. So this is my homage to him.

For some reason I can never remember the wording properly and say it
as "to /speak/ of many things" instead of "to /talk/ of many things".
Memory is a funny thing.

14 months agoAdd new release to perlhist v5.37.10
Yves Orton [Mon, 20 Mar 2023 21:31:05 +0000 (22:31 +0100)]
Add new release to perlhist

14 months agoperldelta.pod - add more docs on %{^HOOK}, update github links,
Yves Orton [Mon, 20 Mar 2023 21:10:55 +0000 (22:10 +0100)]
perldelta.pod - add more docs on %{^HOOK}, update github links,

Also spell check and remove empty sections.

14 months agoUpdate Module::CoreList for 5.37.10
Yves Orton [Mon, 20 Mar 2023 20:48:55 +0000 (21:48 +0100)]
Update Module::CoreList for 5.37.10

14 months agoupdate INSTALL
Yves Orton [Mon, 20 Mar 2023 19:58:40 +0000 (20:58 +0100)]
update INSTALL

14 months agoPorting/Maintainers.pl - update Module-CoreList entry to reflect latest on CPAN
Yves Orton [Mon, 20 Mar 2023 19:55:18 +0000 (20:55 +0100)]
Porting/Maintainers.pl - update Module-CoreList entry to reflect latest on CPAN

Apparently this should have been updated some time ago.

14 months agocpan/libnet - update to version 3.15 and remove old customization info
Yves Orton [Mon, 20 Mar 2023 17:52:13 +0000 (18:52 +0100)]
cpan/libnet - update to version 3.15 and remove old customization info

We were bundling something that claimed to be 3.14 but which was not.
This removes the customization info and sync with a rereleased 3.15
which is the same as the actual 3.14 but with a version bump to keep
cmp_version.t happy.

This is the change log 3.15 and 3.14:

3.15 2023-03-20

    - Release for updating bleadperl to avoid cmp_version.t trouble.  No code
      changes.

3.14 2022-05-22

    - Remove broken link in Net::FTP manpage.  [Mike Blackwell]

    - Fix EBCDIC detection.  [Karl Williamson, PR#45]

    - Fix non-deterministic output in libnet.cfg.  [Sergei Trofimovich, PR#44]

    - Fix TLS session reuse for dataconn with TLS 1.3 when using passive mode.
      [Steffen Ullrich, PR#41]

14 months agopod/perldelta.pod - updates for 5.37.10
Yves Orton [Mon, 20 Mar 2023 17:48:48 +0000 (18:48 +0100)]
pod/perldelta.pod - updates for 5.37.10

Also trim some whitespace from perlvar.pod

14 months agoembed.fnc - remove redundant deprecate_xxx() macro declarations
Yves Orton [Sat, 18 Mar 2023 21:40:07 +0000 (22:40 +0100)]
embed.fnc - remove redundant deprecate_xxx() macro declarations

autodoc.pl gets unhappy if you document a macro in place and ALSO list
it in embed.fnc. The warnings it produce tend to get crowded out from a
parallel make, but @iabyn noticed and (rightly) complained.

This removes the redundant definitions.

14 months agoregexec.c - convert UNWIND_PAREN() into an inline static function
Yves Orton [Sat, 18 Mar 2023 12:16:17 +0000 (13:16 +0100)]
regexec.c - convert UNWIND_PAREN() into an inline static function

This makes it easier to debug, and type checks parameters and the
like. It does make it somewhat slower in debug mode, but so what.

14 months agoregexec.c - convert CAPTURE_CLEAR into an inline static function
Yves Orton [Sat, 18 Mar 2023 12:16:17 +0000 (13:16 +0100)]
regexec.c - convert CAPTURE_CLEAR into an inline static function

This makes it easier to debug, and type checks parameters and the
like. It does make it somewhat slower in debug mode, but so what.

14 months agoregen/embed.pl - change _aDEPTH and _pDEPTH to not have a leading underbar
Yves Orton [Sat, 18 Mar 2023 11:22:34 +0000 (12:22 +0100)]
regen/embed.pl - change _aDEPTH and _pDEPTH to not have a leading underbar

The leading underbar is reserved by C.

These defines are debugging only "recursion" depth related counters
injected into the function macro wrappers when a function is marked as
'W', much the same way that aTHX_ and pTHX_ are when building under
threaded builds. The functions are expected to incremented the depth
parameter themselves. Note that "recursion" is quoted above because in
practice currently they are only used by the regex engine when recursing
virtually, and they do not relate to true C stack related recursion.
(But they could be used for tracking C level recursion under debugging
if someone needed it.)