This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
22 months ago[MERGE] slim down opslot structure.
David Mitchell [Mon, 5 Aug 2019 10:35:08 +0000 (11:35 +0100)]
[MERGE] slim down opslot structure.

When OPs are allocated from a slab (the normal case), what are actually
allocated from the slab are opslot structs, which consist of an OP plus
two pointers.

The branch reduces those two pointers to two U16s, which saves 8 bytes
per op on a 64-bit system.

A further 8 bytes could be saved if those two U16s were included as
extra fields in the OP structure (and the opslot struct disposed of),
but unfortunately too much code does things like Zero(o) or Copy(o1,o2)
which would obliterate the allocation info contained in those two U16s.

22 months agoPerl_opslab_force_free() adjust loop test
David Mitchell [Tue, 16 Jul 2019 15:30:42 +0000 (16:30 +0100)]
Perl_opslab_force_free() adjust loop test

Formerly, slots were allocated within a slab, but leaving the very top
word in the slab as a NULL pointer which appeared as a fake slot so that
a 'while (slot->opslot_next)' loop would stop. Since opslot_next has
been eradicated and the NULL is no longer allocated, the loop condition
for scanning all slots can be simplified slightly (with no change in
functionality).

22 months agoOPSLOT: replace opslot_next with opslot_size
David Mitchell [Tue, 16 Jul 2019 15:14:58 +0000 (16:14 +0100)]
OPSLOT: replace opslot_next with opslot_size

Currently, each allocated opslot has a pointer to the opslot that was
allocated immediately above it. Replace this with a U16 opslot_size field
giving the size of the opslot. The next opslot can then be found by
adding slot->opslot_size * sizeof(void*) to slot.

This saves space.

22 months agostruct opslot: document a field better
David Mitchell [Mon, 15 Jul 2019 10:55:27 +0000 (11:55 +0100)]
struct opslot: document a field better

22 months agoopslabs: change opslab_first to opslab_free_space
David Mitchell [Sat, 13 Jul 2019 19:27:45 +0000 (20:27 +0100)]
opslabs: change opslab_first to opslab_free_space

Currently a OPSLAB maintains a pointer to the lowest allocated OPSLOT
within the slab (slots are allocated downwards). Replace this pointer
with a U16 indicating how many pointer-sized words are free below the
lowest allocated slot.

22 months agoOPSLAB: always have opslab_size field
David Mitchell [Sat, 13 Jul 2019 17:53:08 +0000 (18:53 +0100)]
OPSLAB: always have opslab_size field

Currently this struct only has the opslab_size field on debugging
builds. Change it so that this field is always present. This will make
it easier to not need a fake partial OPSLOT at the end of the slab with
a NULL opslot_next field, which will in turn simplify converting
opslot_next into  U16 size field shortly.

22 months agomake opslot_slab an offset in current slab
David Mitchell [Sat, 13 Jul 2019 17:43:30 +0000 (18:43 +0100)]
make opslot_slab an offset in current slab

Each OPSLOT allocated within an OPSLAB contains a pointer, opslot_slab,
which points back to the first (head) slab of the slab chain (i.e. not
necessarily to the slab which the op is contained in).

This commit changes the pointer to be a 16-bit offset from the start of
the current slab, and adds a pointer at the start of each slab which
points back to the head slab.

The mapping from an op to the head slab is now a two-step process: use
the op's slot's opslot_offset field to find the start of the current
slab, then use that slab's new opslab_head pointer to find the head
slab.

The advantage of this is that it reduces the storage per op.  (It
probably doesn't make any practical difference yet, due to alignment
issues, but that will will be sorted shortly in this branch.)

22 months agoPerl_Slab_Alloc(): rename 'slab' to 'head_slab'
David Mitchell [Sat, 13 Jul 2019 16:52:51 +0000 (17:52 +0100)]
Perl_Slab_Alloc(): rename 'slab' to 'head_slab'

Rename this local var to better identify that it always points to the
first slab in the slab chain, rather than to the current slab.

22 months agoautodoc.pl: Forget heuristics, we have a flag
Karl Williamson [Wed, 31 Jul 2019 19:35:55 +0000 (13:35 -0600)]
autodoc.pl: Forget heuristics, we have a flag

We know if something is a macro because of the 'm' flag.  Don't use the
fallible heuristics to try to determine this.

22 months agoautodoc.pl: Warn if entry missing d flag but has docs
Karl Williamson [Wed, 31 Jul 2019 19:33:19 +0000 (13:33 -0600)]
autodoc.pl: Warn if entry missing d flag but has docs

If you have documention, you're supposed to say so, so that the tools
will work properly.

22 months agoembed.fnc: Note functions that have documentation
Karl Williamson [Wed, 31 Jul 2019 19:26:13 +0000 (13:26 -0600)]
embed.fnc: Note functions that have documentation

A bunch of functions actually were documented, but this fact was omitted
in embed.fnc.

22 months agonumeric.c: Fix typo in pod
Karl Williamson [Wed, 31 Jul 2019 19:20:51 +0000 (13:20 -0600)]
numeric.c: Fix typo in pod

22 months agoembed.fnc: Fix typo in comment
Karl Williamson [Wed, 31 Jul 2019 19:19:15 +0000 (13:19 -0600)]
embed.fnc: Fix typo in comment

22 months agopad.h: Parameters to many functions are ptrs
Karl Williamson [Wed, 31 Jul 2019 19:16:03 +0000 (13:16 -0600)]
pad.h: Parameters to many functions are ptrs

The apidoc entries for 22 functions forgot that the parameters were
pointers to the type.  Since these are macros, this error wasn't caught
until Devel::PPPort tried to generate a test case for them.

22 months agoautodoc.pl: Fix typo in comment
Karl Williamson [Wed, 31 Jul 2019 19:37:09 +0000 (13:37 -0600)]
autodoc.pl: Fix typo in comment

22 months agoFix typo in STORE_LC_NUMERIC_SET_TO_NEEDED_IN docs
Dagfinn Ilmari Mannsåker [Wed, 31 Jul 2019 15:41:10 +0000 (16:41 +0100)]
Fix typo in STORE_LC_NUMERIC_SET_TO_NEEDED_IN docs

22 months ago[perl #134172] perldelta
Hugo van der Sanden [Wed, 31 Jul 2019 12:29:49 +0000 (13:29 +0100)]
[perl #134172] perldelta

22 months ago[perl #134172] Avoid multiple checks of IN_LC(LC_NUMERIC)
Hugo van der Sanden [Mon, 22 Jul 2019 16:08:45 +0000 (17:08 +0100)]
[perl #134172] Avoid multiple checks of IN_LC(LC_NUMERIC)

This adds new API macros STORE_LC_NUMERIC_SET_TO_NEEDED_IN and
WITH_LC_NUMERIC_SET_TO_NEEDED_IN that accept a precalculated value
for the hints checks of IN_LC(LC_NUMERIC).

22 months ago[perl #134172] restrict scope of locale changes during sprintf
Hugo van der Sanden [Mon, 22 Jul 2019 15:29:13 +0000 (16:29 +0100)]
[perl #134172] restrict scope of locale changes during sprintf

In some environments we must hold a mutex for the duration of a temporary
locale change, so we must ensure that mutex is released appropriately.
This means intervening code must not croak, or otherwise bypass the
unlock.

In sv_vcatpvfn_flags(), that requirement was violated when attempting
to avoid multiple temporary locale changes by collapsing them into
a single one. This partially undoes that to fix the problem, while
still attempting to retain some of the benefits by caching the
expensive hints check.

22 months agoperldelta for 8348ac19a3c3
Tony Cook [Wed, 31 Jul 2019 01:14:50 +0000 (11:14 +1000)]
perldelta for 8348ac19a3c3

22 months ago(perl #134310) don't confuse S_no_op()
Tony Cook [Wed, 31 Jul 2019 01:06:20 +0000 (11:06 +1000)]
(perl #134310) don't confuse S_no_op()

This code could previously set PL_bufptr so it points after the
returned s pointer, which S_no_op() asserts on for the test case.

Since setting PL_bufptr here is useful when producing the error
message, just make sure we restore it.

22 months agoRecommend chdir after chroot more strongly
Andrew Hewus Fresh [Thu, 25 Jul 2019 18:00:46 +0000 (11:00 -0700)]
Recommend chdir after chroot more strongly

On Thu, Jul 25, 2019 at 09:35:44AM -0600, Theo de Raadt wrote:
> It is mandatory because otherwise a program-user can arrange for cwd
> to be outside the jail, and utilize that fact to pivot, and in some
> program path utilizations the chroot then becomes not just pointless..
> it is worse than normal, because it creates a dual-namespace view of
> the filesystem, that is a condition that program and libraries are not
> prepared to operate in.

https://marc.info/?l=openbsd-misc&m=156406908805913&w=2

22 months agovms/vms.c: fix unused relational comparison result
Alexandr Savca [Wed, 24 Jul 2019 09:13:05 +0000 (12:13 +0300)]
vms/vms.c: fix unused relational comparison result

Closes [perl #134307].

23 months agoConfigure: reuse "cached" value of "none" for dir
H.Merijn Brand [Thu, 25 Jul 2019 14:09:55 +0000 (16:09 +0200)]
Configure: reuse "cached" value of "none" for dir

When value of a directory (i.e. man1dir) is set to "none" because of:
- '-D' option set on cmdline (i.e. -Dman1dir=none) OR
- because value is reused from previous configure run

And when the prefix is different from the previous configure run(*) then
keep the value of "none". predefined/cached value does not contain the
old prefix so there is no harm in keeping it.

(*): due to another bug this also happens when prefix ends with a
     trailing slash

See https://rt.perl.org/Ticket/Display.html?id=134284

23 months agoRemove trailing '/' from prefix
H.Merijn Brand [Thu, 25 Jul 2019 13:53:40 +0000 (15:53 +0200)]
Remove trailing '/' from prefix

Change how/when the trailing '/' from a prefix is removed.

The original code had two problems:

1) it only stripped the trailing slash when value was predefined
   (either from -Dprefix=/foo/bar/ or from a previous configure run)
2) when it did strip the value then it also caused 'oldprefix' to
   be set. This in turns causes other predefined (/cached) paths to
   be ignored.

See https://rt.perl.org/Public/Bug/Display.html?id=134284

23 months agoembed.fnc: foldEQ has documentation
Karl Williamson [Tue, 23 Jul 2019 17:32:17 +0000 (11:32 -0600)]
embed.fnc: foldEQ has documentation

23 months agoembed.fnc: Certain fcns don't have Perl_ prefix
Karl Williamson [Tue, 23 Jul 2019 17:28:55 +0000 (11:28 -0600)]
embed.fnc: Certain fcns don't have Perl_ prefix

This fixes embed.fnc to match the reality.

23 months agoembed.fnc: Fix wrong comment
Karl Williamson [Sun, 21 Jul 2019 19:12:43 +0000 (13:12 -0600)]
embed.fnc: Fix wrong comment

23 months agoembed.fnc: Clarify wording
Karl Williamson [Sun, 21 Jul 2019 19:00:13 +0000 (13:00 -0600)]
embed.fnc: Clarify wording

An 'A' flagged element is accessible everywhere.  I think that is
clearer than the previous 'Available'

23 months agoDocument my_sprintf as deprecated
Karl Williamson [Tue, 23 Jul 2019 17:05:18 +0000 (11:05 -0600)]
Document my_sprintf as deprecated

It turns out that Devel::PPPort needs a documentation entry for this
function in order to not have to special case it.  So, add a brief
explanation as to why its deprecated.

23 months agohandy.h: Add missing character classification synonym
Karl Williamson [Tue, 23 Jul 2019 16:29:21 +0000 (10:29 -0600)]
handy.h: Add missing character classification synonym

This should complete the set.

23 months agoperldelta for 43e5ab2e34fe
Tony Cook [Tue, 23 Jul 2019 04:42:54 +0000 (14:42 +1000)]
perldelta for 43e5ab2e34fe

I don't think f670c2bb3dd57 needs a perldelta entry.

23 months agoavoid synthesizing locale names with newlines in them
Tony Cook [Tue, 23 Jul 2019 00:45:04 +0000 (10:45 +1000)]
avoid synthesizing locale names with newlines in them

while debugging some strange behaviour on Win32 I tried dumping
locale names in _trylocale() and saw names go past like:

sv_fi.15
          <-- newline added at the end
sv_fi.15
.UTF-8
sv_fi.15
.65001
sv_fi.15
.ACP
sv_fi.15
.OCP
sv_fi.15
.1252

23 months agoWin32: set FOO lists values for all variables starting with FOO
Tony Cook [Mon, 22 Jul 2019 23:55:05 +0000 (09:55 +1000)]
Win32: set FOO lists values for all variables starting with FOO

I'd been testing setting FOOBAR to Unicode values, so this test was
failing due to the extra variable.

23 months agoFix obsolete mention if is_sig in S_pending_ident comment
Dagfinn Ilmari Mannsåker [Mon, 22 Jul 2019 16:33:32 +0000 (17:33 +0100)]
Fix obsolete mention if is_sig in S_pending_ident comment

Commit 49fb862041f1f74fafbc91afa553624c43078261 replaced the parameter
with a pseudo-keyword value KEY_sigvar in PL_in_my, but forgot to
update the comment.

23 months ago[perl #132474] Add function for parsing sub signatures
Paul "LeoNerd" Evans [Thu, 11 Jul 2019 17:34:28 +0000 (18:34 +0100)]
[perl #132474] Add function for parsing sub signatures

This exposes a GRAMSUBSIGNATURE top-level production from perly.y for
toke.c to consume, which parses a subroutine signature, inside the
parens.

This needed a small change to the existing rules, to pull out a rule
that handles all of the insides of the parens but not the parens
themselves.

(h/t to ilmari for the suggestion)

23 months agoperldelta for e3f4f3212908, 33617017c38f, cfb8d85df6eb
Tony Cook [Mon, 22 Jul 2019 06:34:36 +0000 (16:34 +1000)]
perldelta for e3f4f321290833617017c38fcfb8d85df6eb

23 months agobump $File::Find::VERSION
Tony Cook [Mon, 22 Jul 2019 06:24:32 +0000 (16:24 +1000)]
bump $File::Find::VERSION

for the win32 test change

23 months agobump $Devel::PPPort::VERSION
Tony Cook [Mon, 22 Jul 2019 06:24:14 +0000 (16:24 +1000)]
bump $Devel::PPPort::VERSION

for the mktests change

23 months agoFile-Find/t/find.t: reindent after adding a SKIP block origin/tonyc/134295-win32-blocks
Tony Cook [Mon, 22 Jul 2019 05:47:57 +0000 (15:47 +1000)]
File-Find/t/find.t: reindent after adding a SKIP block

23 months agowriting to the root directory requires elevated privileges
Tony Cook [Mon, 22 Jul 2019 05:45:39 +0000 (15:45 +1000)]
writing to the root directory requires elevated privileges

on modern Win32, and testing might be done without such elevation.

I'll re-indent in the next commit

23 months agoensure mktests.PL produces the same output cross-platform
Tony Cook [Mon, 22 Jul 2019 04:52:48 +0000 (14:52 +1000)]
ensure mktests.PL produces the same output cross-platform

With the change to always generate the tests, this was producing
modified files on Win32, with the path in the header and the line
endings changing.

23 months agoperldelta for 85d4e0a35b2d
Tony Cook [Mon, 22 Jul 2019 01:15:06 +0000 (11:15 +1000)]
perldelta for 85d4e0a35b2d

23 months ago(perl #134291) propagate non-PVs in $@ in bare die()
Tony Cook [Wed, 17 Jul 2019 01:32:50 +0000 (11:32 +1000)]
(perl #134291) propagate non-PVs in $@ in bare die()

23 months agoadd perlweb update to RMG
Karen Etheridge [Sun, 21 Jul 2019 17:05:59 +0000 (10:05 -0700)]
add perlweb update to RMG

e.g. as done at https://github.com/perlorg/perlweb/pull/289

23 months agoperldelta for 6b62d97b14ca2894417d0297a435c63e056e31fe
James E Keenan [Sun, 21 Jul 2019 13:34:05 +0000 (09:34 -0400)]
perldelta for 6b62d97b14ca2894417d0297a435c63e056e31fe

23 months agoFix pod formatting
E.Choroba [Thu, 18 Jul 2019 13:02:19 +0000 (15:02 +0200)]
Fix pod formatting

&gt; is an HTML entity, not pod.

Committer: increment $VERSION

For: RT # 134300

23 months agoUpdate next major release number in Porting/todo.pod
Steve Hay [Sun, 21 Jul 2019 11:25:21 +0000 (12:25 +0100)]
Update next major release number in Porting/todo.pod

23 months agoupdate 'say' docs to better represent reality
Dan Book [Sat, 20 Jul 2019 15:40:45 +0000 (11:40 -0400)]
update 'say' docs to better represent reality

23 months agoGet dist/Devel-PPPort/t/uv.t passing
Steve Hay [Sat, 20 Jul 2019 18:23:44 +0000 (19:23 +0100)]
Get dist/Devel-PPPort/t/uv.t passing

23 months agoModule::CoreList 5.20190720 is now on CPAN
Steve Hay [Sat, 20 Jul 2019 18:18:35 +0000 (19:18 +0100)]
Module::CoreList 5.20190720 is now on CPAN

23 months agoUpdate Module::CoreList for 5.31.3
Steve Hay [Sat, 20 Jul 2019 17:42:47 +0000 (18:42 +0100)]
Update Module::CoreList for 5.31.3

23 months agoBump version to 5.31.3
Steve Hay [Sat, 20 Jul 2019 17:34:21 +0000 (18:34 +0100)]
Bump version to 5.31.3

23 months agoCreate new perldelta for 5.31.3
Steve Hay [Sat, 20 Jul 2019 17:24:37 +0000 (18:24 +0100)]
Create new perldelta for 5.31.3

23 months agoTick off 5.31.2
Steve Hay [Sat, 20 Jul 2019 17:23:13 +0000 (18:23 +0100)]
Tick off 5.31.2

23 months agoAdd epigraph for 5.31.2
Steve Hay [Sat, 20 Jul 2019 17:22:58 +0000 (18:22 +0100)]
Add epigraph for 5.31.2

23 months ago5.31.2 today v5.31.2
Steve Hay [Sat, 20 Jul 2019 12:04:34 +0000 (13:04 +0100)]
5.31.2 today

23 months agoFinalize perldelta
Steve Hay [Sat, 20 Jul 2019 12:01:46 +0000 (13:01 +0100)]
Finalize perldelta

23 months agoUpdate Module::CoreList for 5.31.2
Steve Hay [Sat, 20 Jul 2019 11:52:53 +0000 (12:52 +0100)]
Update Module::CoreList for 5.31.2

23 months agoperldelta tidy-ups
Steve Hay [Sat, 20 Jul 2019 11:06:42 +0000 (12:06 +0100)]
perldelta tidy-ups

23 months agoVC6 support is likely to be removed soon
Steve Hay [Sat, 20 Jul 2019 10:55:24 +0000 (11:55 +0100)]
VC6 support is likely to be removed soon

23 months agoperldelta - Document a couple more changes
Steve Hay [Sat, 20 Jul 2019 10:54:44 +0000 (11:54 +0100)]
perldelta - Document a couple more changes

23 months agoNo need to list CUSTOMIZED files for anything but upstream=>CPAN modules
Steve Hay [Sat, 20 Jul 2019 10:36:12 +0000 (11:36 +0100)]
No need to list CUSTOMIZED files for anything but upstream=>CPAN modules

The vast majority of upstream=>BLEAD modules having modifications over the
given CPAN release aren't listed in Maintainers.pl. Net::Ping was the only
anomaly, and was out of date too -- t/001_new.t and t/010_pingecho.t are
also modified but weren't listed.

23 months agoRevert the Module::CoreList part of 7872aa47f6
Steve Hay [Sat, 20 Jul 2019 10:27:11 +0000 (11:27 +0100)]
Revert the Module::CoreList part of 7872aa47f6

5.31.1 contained B::Op_private 5.031001 and Module::CoreList* 5.20190620

23 months agoRevert the Module::CoreList part of e01077d94e
Steve Hay [Sat, 20 Jul 2019 10:20:51 +0000 (11:20 +0100)]
Revert the Module::CoreList part of e01077d94e

5.15.0 contained CGI::Util 3.53
5.21.7 contained File::Spec 3.53
5.31.1 contained Devel::PPPort 3.53

23 months agoperldelta - Remove boilerplate stuff
Steve Hay [Sat, 20 Jul 2019 10:00:32 +0000 (11:00 +0100)]
perldelta - Remove boilerplate stuff

23 months agoperldelta - Documentation and Diagnostics
Steve Hay [Sat, 20 Jul 2019 09:50:51 +0000 (10:50 +0100)]
perldelta - Documentation and Diagnostics

23 months agoperldelta - Modules and Pragmata
Steve Hay [Sat, 20 Jul 2019 09:43:32 +0000 (10:43 +0100)]
perldelta - Modules and Pragmata

23 months agoDocument known problems on Windows
Steve Hay [Fri, 19 Jul 2019 21:08:55 +0000 (22:08 +0100)]
Document known problems on Windows

23 months agoFix upgrade notes in INSTALL
Steve Hay [Fri, 19 Jul 2019 20:06:09 +0000 (21:06 +0100)]
Fix upgrade notes in INSTALL

Each BLEAD release is potentially not binary compatible with the previous
release.

23 months agoRMG - Fix a couple of typos
Steve Hay [Fri, 19 Jul 2019 20:01:03 +0000 (21:01 +0100)]
RMG - Fix a couple of typos

23 months agoConfig::Perl::V is ahead of CPAN
Steve Hay [Fri, 19 Jul 2019 19:55:09 +0000 (20:55 +0100)]
Config::Perl::V is ahead of CPAN

23 months agoCorrect an epigraph link
Steve Hay [Fri, 19 Jul 2019 19:54:25 +0000 (20:54 +0100)]
Correct an epigraph link

23 months agoFill in missing epigraphs links
Steve Hay [Thu, 18 Jul 2019 19:52:48 +0000 (20:52 +0100)]
Fill in missing epigraphs links

23 months ago(perl #134221) MSVC doesn't define O_ACCMODE
Tony Cook [Fri, 19 Jul 2019 00:08:30 +0000 (10:08 +1000)]
(perl #134221) MSVC doesn't define O_ACCMODE

23 months agoperldelta for ae73d7ec2329, 0424723402ef, 74b421cc877e
Tony Cook [Tue, 16 Jul 2019 06:30:58 +0000 (16:30 +1000)]
perldelta for ae73d7ec23290424723402ef74b421cc877e

23 months ago(perl #134221) preserve O_APPEND for open ... undef calls.
Tony Cook [Tue, 16 Jul 2019 05:59:29 +0000 (15:59 +1000)]
(perl #134221) preserve O_APPEND for open ... undef calls.

For most systems this means switching from mkstemp() to mkostemp(),
which Zefram helpfully added an emulation for.

For Win32 the append seems to happen in the POSIX emulation, not in
WriteFile(), so we can simply supply the flags to _open_osfhandle().

After some discussion with Craig Berry, the VMS version of the code
now uses largely the same mkostemp() code, with some special code in
the mkostemp() emulation to allow marking the file to be deleted
automatically when closed.

23 months ago(perl #134221) support O_APPEND for open ..., undef on VMS
Tony Cook [Mon, 15 Jul 2019 01:53:23 +0000 (11:53 +1000)]
(perl #134221) support O_APPEND for open ..., undef on VMS

VMS doesn't allow you to delete an open file like POSIXish systems
do, but you can mark a file to be deleted once it's closed, but
only when you open it.

Since VMS doesn't (yet) have mkostemp() we can add our own flag to
our mkostemp() emulation to pass the necessary magic to open() call
to delete the file on close.

23 months ago(perl #134221) support append mode temp files on Win32 too
Tony Cook [Tue, 2 Jul 2019 05:22:26 +0000 (15:22 +1000)]
(perl #134221) support append mode temp files on Win32 too

23 months ago(perl #134221) support append mode for open .. undef
Tony Cook [Tue, 2 Jul 2019 04:16:35 +0000 (14:16 +1000)]
(perl #134221) support append mode for open .. undef

23 months agoUpdate IPC-Cmd to CPAN version 1.04
Chris 'BinGOs' Williams [Sun, 14 Jul 2019 14:40:03 +0000 (15:40 +0100)]
Update IPC-Cmd to CPAN version 1.04

  [DELTA]

1.04 Sat Jul 13 10:08:08 BST 2019

  Bug fixes:
  - Fixed usage of setsid()

23 months agoSupport Bison version 3.1 through 3.4
Dagfinn Ilmari Mannsåker [Thu, 11 Jul 2019 15:27:29 +0000 (16:27 +0100)]
Support Bison version 3.1 through 3.4

No significant changes in the generated code since 3.0.

23 months agoPerlIO-encoding/t/encoding.t: improve test skip
David Mitchell [Thu, 11 Jul 2019 14:40:03 +0000 (15:40 +0100)]
PerlIO-encoding/t/encoding.t: improve test skip

One test is skipped if $PERL_DESTRUCT_LEVEL is set and its a DEBUGGING
build, as it produces a spurious "Unbalanced string table" warning.

However, this warning is emitted on non-DEBUGGING builds too: It's just
that until a couple of weeks ago, $PERL_DESTRUCT_LEVEL wasn't honoured
on non-DEBUGGING builds, so this was never spotted.

23 months agothreads::shared: fix leak
David Mitchell [Thu, 11 Jul 2019 14:17:48 +0000 (15:17 +0100)]
threads::shared: fix leak

When assigning a shared reference value to a variable containing a
shared string, the PV buffer in the shared space was leaked. For
example:

    my $s :shared = "foo";
    my $t :shared  = shared_clone(\"bar");
    $s = $t; # "foo" in shared space leaked

This was showing up as failed smokes under ASan.

23 months agoCorrect typo in POSIX.pod
James E Keenan [Wed, 10 Jul 2019 02:33:42 +0000 (22:33 -0400)]
Correct typo in POSIX.pod

For RT #134272, as suggested by Paul Townsend.

23 months agoavoid SEGV with uninit warning with multideref
David Mitchell [Wed, 10 Jul 2019 11:59:06 +0000 (12:59 +0100)]
avoid SEGV with uninit warning with multideref

RT #134275

When the 'uninitialized warning' code in S_find_uninit_var() comes
across an OP_MULTIDEREF node, it scans it to see if any part of that op
(e.g. the indices or the returned value) could have been the source of
the uninitialized value which triggered the warning.  Unfortunately when
getting an AV or HV from a GV, it wasn't checking whether gp_av/gp_hv
contained a NULL value. If so, it would SEGV.

The test code is a bit contrived; you have to "pull the rug" from under
the GV at just the right moment with *foo = *bar, then trigger an uninit
warning on an op whose subtree includes an OP_MULTIDEREF.

23 months agoAllow -Uusedtrace / -Dusedtrace=false / -Dusedtrace=no
H.Merijn Brand [Tue, 9 Jul 2019 15:16:04 +0000 (17:16 +0200)]
Allow -Uusedtrace / -Dusedtrace=false / -Dusedtrace=no

23 months agopp_sys.c: fix the position of HAS_SETNETENT definement
Alexandr Savca [Thu, 4 Jul 2019 11:55:38 +0000 (14:55 +0300)]
pp_sys.c: fix the position of HAS_SETNETENT definement

Else, DIE() will bever be executed.

23 months agoperldelta for 2773b4f50f99
Tony Cook [Tue, 9 Jul 2019 04:51:03 +0000 (14:51 +1000)]
perldelta for 2773b4f50f99

23 months agoRevert "postpone perl_parse() exit(0) bugfix"
Tony Cook [Thu, 4 Jul 2019 05:02:46 +0000 (15:02 +1000)]
Revert "postpone perl_parse() exit(0) bugfix"

This reverts commit 857320cbf85e762add18885ae8a197b5e0c21b69,
re-instating the [perl #2754] fix, which was reverted in late
2017 to allow Module::Install based distributions to update or
re-work per [perl #132577].

# Conflicts:
# t/op/blocks.t

23 months agomake apidoc error reporting a little more explicit
Tony Cook [Mon, 8 Jul 2019 05:39:26 +0000 (15:39 +1000)]
make apidoc error reporting a little more explicit

23 months ago(perl #120841) document some errno macros for internal use
Tony Cook [Thu, 4 Jul 2019 01:12:20 +0000 (11:12 +1000)]
(perl #120841) document some errno macros for internal use

23 months ago(perl #120841) document ERRSV and CLEAR_ERRSV()
Tony Cook [Thu, 4 Jul 2019 00:39:19 +0000 (10:39 +1000)]
(perl #120841) document ERRSV and CLEAR_ERRSV()

23 months agoperldelta for fb81daf0179f, 66ff4fb58270
Tony Cook [Mon, 8 Jul 2019 01:56:27 +0000 (11:56 +1000)]
perldelta for fb81daf0179f66ff4fb58270

23 months agouse hex for the call_*()/eval_sv() flag definitions
Tony Cook [Mon, 24 Jun 2019 00:01:42 +0000 (10:01 +1000)]
use hex for the call_*()/eval_sv() flag definitions

while I expect most C programmers have these powers of two engraved
into their brains, using hex makes this more obvious

23 months ago(perl #134177) add G_RETHROW flag to eval_sv()
Tony Cook [Thu, 20 Jun 2019 05:26:22 +0000 (15:26 +1000)]
(perl #134177) add G_RETHROW flag to eval_sv()

and update eval_pv() to use it.

23 months agoCommit df09255f was by new contributor
James E Keenan [Sat, 6 Jul 2019 22:31:35 +0000 (18:31 -0400)]
Commit df09255f was by new contributor

Update AUTHORS to keep make test_porting happy.

23 months agoPVS-Studio: fixed warning in ternary operator.
Svyatoslav [Fri, 5 Oct 2018 14:16:54 +0000 (17:16 +0300)]
PVS-Studio: fixed warning in ternary operator.

(from https://github.com/Perl/perl5/pull/17)

23 months agomake variable names consistent in this example
Karen Etheridge [Fri, 5 Jul 2019 21:02:06 +0000 (14:02 -0700)]
make variable names consistent in this example

..as suggested by Andre Schultz at https://github.com/OpusVL/perldoc.perl.org/issues/57

23 months agoFix "it it" typos
Dagfinn Ilmari Mannsåker [Thu, 4 Jul 2019 10:19:45 +0000 (11:19 +0100)]
Fix "it it" typos

And regen affected files