[perl.git] branch blead, updated. v5.25.4-90-g5b549d1

2016-09-05 Thread Tony Cook
In perl.git, the branch blead has been updated



- Log -
commit 5b549d1d2267bb0d85424c02f9b4c895ebbcf404
Author: Tony Cook 
Date:   Mon Aug 15 10:39:22 2016 +1000

(perl #128095) check pack_sockaddr_un()'s return value

pack_sockaddr_un() silently truncates the supplied path if it won't
fit into the sun_path member of sockaddr_un.

This may change in the future, but for now check the path in the
sockaddr matches the desired path, and skip if it doesn't.
---

Summary of changes:
 dist/IO/t/cachepropagate-unix.t | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/dist/IO/t/cachepropagate-unix.t b/dist/IO/t/cachepropagate-unix.t
index e3e438e..20c70dd 100644
--- a/dist/IO/t/cachepropagate-unix.t
+++ b/dist/IO/t/cachepropagate-unix.t
@@ -14,10 +14,21 @@ use Test::More;
 plan skip_all => "UNIX domain sockets not implemented on $^O"
   if ($^O =~ m/^(?:qnx|nto|vos|MSWin32|VMS)$/);
 
-plan tests => 15;
-
 my $socketpath = catfile(tempdir( CLEANUP => 1 ), 'testsock');
 
+# check the socketpath fits in sun_path.
+#
+# pack_sockaddr_un() just truncates the path, this may change, but how
+# it will handle such a condition is undetermined (and we might need
+# to work with older versions of Socket outside of a perl build)
+# https://rt.cpan.org/Ticket/Display.html?id=116819
+
+my $name = eval { pack_sockaddr_un($socketpath) };
+defined $name && (unpack_sockaddr_un($name))[0] eq $socketpath
+  or plan skip_all => "socketpath too long for sockaddr_un";
+
+plan tests => 15;
+
 # start testing stream sockets:
 my $listener = IO::Socket::UNIX->new(Type => SOCK_STREAM,
 Listen => 1,

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-89-g05bda26

2016-09-05 Thread Father Chrysostomos
In perl.git, the branch blead has been updated



- Log -
commit 05bda26ce45ab1f7024d0e8a656a251a181f0275
Author: Father Chrysostomos 
Date:   Mon Sep 5 10:14:29 2016 -0700

Fix up B::Concise tests following op flag change

M   ext/B/t/optree_specials.t

commit 1de22db27a9aaa5fec9e9b93ec06a1d6c6f05c31
Author: Father Chrysostomos 
Date:   Mon Sep 5 09:31:31 2016 -0700

[perl #47047] Fix erroneous AUTOLOAD warning

If there was a stub present in the package into which the invocant had
been blessed, then AUTOLOADing via a *method* call would warn with ‘Use
of inherited AUTOLOAD for non-method’ even if it is a method.

A recent commit stopped OPf_REF from being set on OP_ENTERSUB, so this
commit uses that flag to indicate a method call, to allow a fast run-
time check to see whether to pass the method flag to gv_autoload.

M   op.c
M   pp_hot.c

commit 9493dad184630fd01d49f6b613821550566a587c
Author: Rick Delaney 
Date:   Mon Sep 5 09:25:59 2016 -0700

Test for perl #47047

M   t/lib/warnings/gv

commit 63433e93928eda511e2444d6caea6da9a03a256c
Author: Father Chrysostomos 
Date:   Sun Sep 4 23:27:42 2016 -0700

No need to skip t/op/dump.t on darwin

M   t/op/dump.t

commit f441d7d224a86a59913b23e5e17431baf03db56e
Author: Father Chrysostomos 
Date:   Sun Sep 4 23:14:21 2016 -0700

Stop setting OPf_REF on OP_ENTERSUB

It isn’t doing anything really here, and I need it for
another purpose.

M   op.c
---

Summary of changes:
 ext/B/t/optree_specials.t | 36 ++--
 op.c  |  6 --
 pp_hot.c  |  5 -
 t/lib/warnings/gv |  2 ++
 t/op/dump.t   |  2 +-
 5 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t
index d7200db..83ea44e 100644
--- a/ext/B/t/optree_specials.t
+++ b/ext/B/t/optree_specials.t
@@ -48,7 +48,7 @@ checkOptree ( name=> 'BEGIN',
 # -<;> ex-nextstate(B::Concise -837 Concise.pm:366) v:*,&,{,x*,x&,x$,$ 
->4
 # -<@> lineseq K ->-
 # 4   <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$ 
->5
-# 9   <1> entersub[t1] KS*/TARG,STRICT ->a
+# 9   <1> entersub[t1] KRS*/TARG,STRICT ->a
 # 5  <0> pushmark s ->6
 # 6  <$> const[PV "strict"] sM ->7
 # 7  <$> const[PV "refs"] sM ->8
@@ -62,7 +62,7 @@ checkOptree ( name=> 'BEGIN',
 # -<;> ex-nextstate(B::Concise -812 Concise.pm:386) v:*,&,x*,x&,x$,$ 
->e
 # -<@> lineseq K ->-
 # e   <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$ ->f
-# j   <1> entersub[t1] KS*/TARG,STRICT ->k
+# j   <1> entersub[t1] KRS*/TARG,STRICT ->k
 # f  <0> pushmark s ->g
 # g  <$> const[PV "strict"] sM ->h
 # h  <$> const[PV "refs"] sM ->i
@@ -76,7 +76,7 @@ checkOptree ( name=> 'BEGIN',
 # -<;> ex-nextstate(B::Concise -798 Concise.pm:406) v:*,&,{,x*,x&,x$,$ 
->o
 # -<@> lineseq K ->-
 # o   <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$ 
->p
-# t   <1> entersub[t1] KS*/TARG,STRICT ->u
+# t   <1> entersub[t1] KRS*/TARG,STRICT ->u
 # p  <0> pushmark s ->q
 # q  <$> const[PV "warnings"] sM ->r
 # r  <$> const[PV "qw"] sM ->s
@@ -98,7 +98,7 @@ EOT_EOT
 # -<;> ex-nextstate(B::Concise -837 Concise.pm:366) v:*,&,{,x*,x&,x$,$ 
->4
 # -<@> lineseq K ->-
 # 4   <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$ 
->5
-# 9   <1> entersub[t1] KS*/TARG,STRICT ->a
+# 9   <1> entersub[t1] KRS*/TARG,STRICT ->a
 # 5  <0> pushmark s ->6
 # 6  <$> const(PV "strict") sM ->7
 # 7  <$> const(PV "refs") sM ->8
@@ -112,7 +112,7 @@ EOT_EOT
 # -<;> ex-nextstate(B::Concise -812 Concise.pm:386) v:*,&,x*,x&,x$,$ 
->e
 # -<@> lineseq K ->-
 # e   <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$ ->f
-# j   <1> entersub[t1] KS*/TARG,STRICT ->k
+# j   <1> entersub[t1] KRS*/TARG,STRICT ->k
 # f  <0> pushmark s ->g
 # g  <$> const(PV "strict") sM ->h
 # h  <$> const(PV "refs") sM ->i
@@ -126,7 +126,7 @@ EOT_EOT
 # -<;> ex-nextstate(B::Concise -798 Concise.pm:406) v:*,&,{,x*,x&,x$,$ 
->o
 # -<@> lineseq K ->-
 # o   <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$ 
->p
-# t   <1> entersub[t1] KS*/TARG,STRICT ->u
+# t   <1> entersub[t1] 

[perl.git] branch blead, updated. v5.25.4-84-g0af40c7

2016-09-05 Thread Dave Mitchell
In perl.git, the branch blead has been updated



- Log -
commit 0af40c757f083cc12988effb46da5313cd042f00
Author: David Mitchell 
Date:   Mon Sep 5 15:49:28 2016 +0100

toke.c: fix mswin32 builds

9bde56224 added this as part of macro:

-   PL_last_lop_op = f; \
+   PL_last_lop_op = f < 0 ? -f : f; \

which broke win32 builds due to this

UNIBRACK(-OP_ENTEREVAL)

expanding to

PL_last_lop_op = -345 < 0 ? --345 : -345

and the -- being seen as a pre-dec op.

Diagnosed by Dagfinn Ilmari Mannsåker.
---

Summary of changes:
 toke.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toke.c b/toke.c
index 2350703..a1cdda8 100644
--- a/toke.c
+++ b/toke.c
@@ -241,7 +241,7 @@ static const char* const lex_state_names[] = {
if (have_x) PL_expect = x; \
PL_bufptr = s; \
PL_last_uni = PL_oldbufptr; \
-   PL_last_lop_op = f < 0 ? -f : f; \
+   PL_last_lop_op = (f) < 0 ? -(f) : (f); \
if (*s == '(') \
return REPORT( (int)FUNC1 ); \
s = skipspace(s); \

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-83-g097f20e

2016-09-05 Thread Craig A. Berry
In perl.git, the branch blead has been updated



- Log -
commit 097f20eca6789e9416aedff17ae062386d3c2d98
Author: Craig A. Berry 
Date:   Sun Sep 4 21:13:28 2016 -0500

Make the "where install" directories Unix-format on VMS.

These paths will get converted to Unix format for loading into
@INC anyway, but since 483efd0abe3 they really need to start out
that way.  Otherwise, when running under a Unix shell, the path
delimiter will be ':' and the absolute VMS specs will get split
in half in S_incpush_use_sep(), which kicks in before the
conversion to Unix format.

M   configure.com

commit 83269cedf6d56458a3fbea611ea3c56c444bde50
Author: Craig A. Berry 
Date:   Sun Sep 4 21:10:06 2016 -0500

Tainted dirs on VMS when not under DCL.

Since 483efd0abe3 the path delimiter is a ':' instead of '|' on
VMS when running under a Unix shell.  So use that as a guide
to whether we should use a colon or a slash to detect relative
directories that should be tainted.

M   mg.c
---

Summary of changes:
 configure.com | 63 +--
 mg.c  | 11 +++
 2 files changed, 38 insertions(+), 36 deletions(-)

diff --git a/configure.com b/configure.com
index 1d11fe1..a886f6f 100644
--- a/configure.com
+++ b/configure.com
@@ -2498,7 +2498,7 @@ $ EOD
 $   ENDIF
 $   IF F$TYPE(privlib) .NES. ""
 $   THEN dflt = privlib
-$   ELSE dflt = "''vms_prefix':[lib]"
+$   ELSE dflt = "/''vms_prefix'/lib"
 $   ENDIF
 $   rp = "Pathname where the private library files will reside? " 
 $   rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
@@ -2567,7 +2567,7 @@ $ EOD
 $   ENDIF
 $   IF F$TYPE(archlib) .NES. ""
 $   THEN dflt = archlib
-$   ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
+$   ELSE dflt = privlib + "/" + archname + "/" + version
 $   ENDIF
 $   rp = "Where do you want to put the public architecture-dependent 
libraries? "
 $   rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
@@ -2596,7 +2596,7 @@ $ EOD
 $   ENDIF
 $   IF F$TYPE(sitelib) .NES. ""
 $   THEN dflt = sitelib
-$   ELSE dflt = privlib - "]" + ".SITE_PERL]"
+$   ELSE dflt = privlib + "/site_perl"
 $   ENDIF
 $   rp = "Pathname for the site-specific library files? "
 $   rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
@@ -2614,7 +2614,7 @@ $ EOD
 $   ENDIF
 $   IF F$TYPE(sitearch) .NES. ""
 $   THEN dflt = sitearch
-$   ELSE dflt = sitelib - "]" + "." + archname + "]"
+$   ELSE dflt = sitelib + "/" + archname
 $   ENDIF
 $   rp = "Pathname for the site-specific architecture-dependent library files? 
"
 $   rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
@@ -2626,7 +2626,6 @@ $!
 $!: determine where public executables go
 $   IF F$TYPE(bin) .NES. ""
 $   THEN dflt = bin
-$!   ELSE dflt = prefix - ".]" + ".BIN]"
 $   ELSE dflt = "/''vms_prefix'"
 $   ENDIF
 $   rp = "Pathname where the public executables will reside? "
@@ -2637,7 +2636,7 @@ $!
 $!: determine where add-on public executables go
 $   IF F$TYPE(sitebin) .NES. ""
 $   THEN dflt = sitebin
-$   ELSE dflt = "''vms_prefix':[bin.''archname']"
+$   ELSE dflt = "/''vms_prefix'/bin/''archname'"
 $   ENDIF
 $   rp = "Pathname where the add-on public executables should be installed? "
 $   rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
@@ -2653,58 +2652,58 @@ $!: see what memory models we can support
 $!
 $ ELSE ! skipping "where install" questions, we must set some symbols
 $   IF F$TYPE(archlib).EQS."" THEN -
-  archlib="''vms_prefix':[lib.''archname'.''version']"
+  archlib="/''vms_prefix'/lib/''archname'/''version'"
 $   IF F$TYPE(bin) .EQS. "" THEN -
   bin="/''vms_prefix'"
 $   IF F$TYPE(privlib) .EQS. "" THEN -
-  privlib ="''vms_prefix':[lib]"
+  privlib ="/''vms_prefix'/lib"
 $   IF F$TYPE(sitearch) .EQS. "" THEN -
-  sitearch="''vms_prefix':[lib.site_perl.''archname']"
+  sitearch="/''vms_prefix'/lib/site_perl/''archname'"
 $   IF F$TYPE(sitelib) .EQS. "" THEN -
-  sitelib ="''vms_prefix':[lib.site_perl]"
+  sitelib ="/''vms_prefix'/lib/site_perl"
 $   IF F$TYPE(sitebin) .EQS. "" THEN -
-  sitebin="''vms_prefix':[bin.''archname']"
+  sitebin="/''vms_prefix'/bin/''archname'"
 $ ENDIF !%Config-I-VMS, skip "where install" questions
 $!
 $! These derived locations can be set whether we've opted to
 $! skip the where install questions or not.
 $!
 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
-archlibexp="''vms_prefix':[lib.''archname'.''version']"
+archlibexp="/''vms_prefix'/lib/''archname'/''version'"
 $ IF F$TYPE(binexp) .EQS. "" THEN -
-binexp ="''vms_prefix':[00]"
+binexp ="/''vms_prefix'"
 $ IF F$TYPE(builddir) .EQS. "" THEN -
-

[perl.git] branch blead, updated. v5.25.4-81-g4ad0d3b

2016-09-05 Thread Dave Mitchell
In perl.git, the branch blead has been updated



- Log -
commit 4ad0d3b9f11b33230f285a6e28f55f54490d90d8
Author: David Mitchell 
Date:   Mon Sep 5 12:50:37 2016 +0100

newATTRSUB_x(): document what the cv var is for

M   op.c

commit fd0ee382835b026ca650231794fffd52b6bf06f5
Author: David Mitchell 
Date:   Mon Sep 5 12:46:02 2016 +0100

make S_already_defined() in op.c return void

Currently it returns a boolean value, but after the removal of the MAD
code, this value is just equivalent to its 'block' arg; so instead just
make its callers test 'block' instead. This makes the calling code in
newATTRSUB_x and newMYSUB easier to follow.

Also, put the block condition on a single line (whitespace change)

M   op.c

commit fc3b7ad1386606b102614ccb712d6c8c7a9fed4d
Author: David Mitchell 
Date:   Mon Sep 5 12:37:55 2016 +0100

reindent and reformat newMYSUB and newATTRSUB_x

This commit only contains whitespace changes.

As a follow-on from the previous commit, reindent a  couple of block of
code; but also do a general re-indenting and partial refomatting of these
two similar functions, which were a bit of mess and hard to follow:

* replace weird mixtures of indents with standard 4-indents;
* split if (X) Y  into two lines;
* separate out blocks with a blank line;
* outdent labels by exactly 2 spaces

M   op.c

commit f6df9a2399f253aa91ac088837b425205fe9e6b7
Author: David Mitchell 
Date:   Mon Sep 5 12:08:56 2016 +0100

newMYSUB/Perl_newATTRSUB_x remove a goto

In both these functions there is code like:

if (!block)
   goto attrs;
...
  attrs:

Change them to

if (block) {
...
}
  attrs:

Lets not use gotos if there's a better way.

Will re-indent in next commit.

M   op.c

commit d1da3640384b1f8221ffa322a0ce6f7ff663a34c
Author: David Mitchell 
Date:   Mon Sep 5 11:52:23 2016 +0100

avoid using freed ops on BEGIN :attr {}

If a BEGIN sub has a code attribute applied (no idea why you would want to
do such a thing, but it's not illegal) then part of applying the attribute
is to do 'use attributes', which compiles

BEGIN { require "attributes"; attributes->import(AAA) }

so we end up compiling a BEGIN while in the middle of compiling a BEGIN.
The part of Perl_newATTRSUB_x() that under some circumstances copies
the body of the newly-compiled CV to the old CV which occupies the name
slot, kicks in here.

Since the ops that make up the AAA above were allocated from the old
BEGIN's op slabs, they get prematurely freed when the old BEGIN's
ops are discarded by the SvREFCNT_dec(PL_compcv).

The simplest fix is to just avoid the copy if we're compiling a BEGIN.

M   op.c
M   t/op/attrs.t

commit 27604593363c36604b7213ec7d405d21ef58f37b
Author: David Mitchell 
Date:   Mon Sep 5 11:15:49 2016 +0100

do_sv_dump(): handle CvSTART() as slab address

If a CV is CvSLABBED(), then CvSTART() points to the op slab rather than a
start op. Make Perl_do_sv_dump() display this more informatively.

M   dump.c

commit 68d1ee858a9172f8fd376b2e4aca1cf5b1ecfaeb
Author: David Mitchell 
Date:   Sat Aug 27 14:28:24 2016 +0100

assert op not freed in finalize_op() and rpeep()

This should never happen.

M   op.c
---

Summary of changes:
 dump.c   |   7 +-
 op.c | 244 ++-
 t/op/attrs.t |  21 +
 3 files changed, 166 insertions(+), 106 deletions(-)

diff --git a/dump.c b/dump.c
index fd3d7cc..e69421b 100644
--- a/dump.c
+++ b/dump.c
@@ -1936,7 +1936,12 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, 
I32 nest, I32 maxnest, bo
do_hv_dump(level, file, "  COMP_STASH", CvSTASH(sv));
if (!CvISXSUB(sv)) {
if (CvSTART(sv)) {
-   Perl_dump_indent(aTHX_ level, file,
+if (CvSLABBED(sv))
+Perl_dump_indent(aTHX_ level, file,
+"  SLAB = 0x%"UVxf"\n",
+PTR2UV(CvSTART(sv)));
+else
+Perl_dump_indent(aTHX_ level, file,
 "  START = 0x%"UVxf" ===> %"IVdf"\n",
 PTR2UV(CvSTART(sv)),
 (IV)sequence_num(CvSTART(sv)));
diff --git a/op.c b/op.c
index cedc5e8..30b5024 100644
--- a/op.c
+++ b/op.c
@@ -2501,6 +2501,7