In perl.git, the branch sprout/misc-post-5.16 has been created
<http://perl5.git.perl.org/perl.git/commitdiff/80ded85a6a91783c3b084cdb725cc89db2f8f25e?hp=0000000000000000000000000000000000000000>
at 80ded85a6a91783c3b084cdb725cc89db2f8f25e (commit)
- Log -----------------------------------------------------------------
commit 80ded85a6a91783c3b084cdb725cc89db2f8f25e
Author: Father Chrysostomos <[email protected]>
Date: Tue May 15 12:52:13 2012 -0700
Donât let method-BLOCK read beyond the stack
$ ./perl -Ilib -e 'use B::Deparse; warn for new{}'
Can't call method "new" on an undefined value at -e line 1.
$ ./perl -Ilib -e 'use B::Deparse; warn for "foo", new{}'
Can't call method "new" without a package or object reference at -e line 1.
Now, why did adding "foo" there change the error message? Because
new{} looks one past the end of the stack. Adding "foo" just caused
it to look at the next dropping left behind by B::Deparse, which just
happened to be some non-ref that was not recognised as a package name.
In fact, I can even do this to control what value it picks up:
$ ./perl -Ilib -e '@_ = ("foo"); new{}'
Can't locate object method "new" via package "foo" (perhaps you forgot to
load "foo"?) at -e line 1.
And then it calls a method with literally no arguments in @_:
$ ./perl -Ilib -we 'use B::Deparse; @_ = "B::Deparse"; warn new{}'
Use of uninitialized value $class in bless at lib/B/Deparse.pm line 569.
Explicit blessing to '' (assuming package main) at lib/B/Deparse.pm line
569.
Can't locate object method "init" via package "main" at lib/B/Deparse.pm
line 588.
And the ultimate:
$ ./perl -Ilib -we 'for(1..1000000) {eval " warn +(1)x$_, new{}"}'
Bus error
$ ./perl -Ilib -we 'for(866..1018) { eval { warn +(1)x$_, new{} }}'
Bus error
OK, thatâs enough fun.
With this commit, Iâm making it an error to call a method this way
with no arguments. Iâm using the âwithout a package or object refer-
enceâ error message, as opposed to âon an undefined valueâ, because
there isnât any undefined value; thereâs nothing at all.
M pp_hot.c
M t/op/method.t
commit 888a5b6366c314f56fa58f73c698b525eb05dacf
Author: jkeenan <[email protected]>
Date: Fri May 11 22:32:38 2012 -0700
Document hashref_locked() and hashref_unlocked(). Add tests for them,
include debugging by Father C++.
Make lock_hash_recurse() unlock_hash_recurse() exportable; include them in
SYNOPSIS; write tests for them.
Revise 'carp test' test. In general, tests of error messages should be
written
with like() rather than is(). Why? Because we rarely want to test for the
complete error message if that requires us to exactly calculate strings such
as the line number at which an error occurred.
M ext/Hash-Util/lib/Hash/Util.pm
M ext/Hash-Util/t/Util.t
commit 61e20955efb7beb30e83593e3472cd5672bcc462
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 30 17:07:31 2012 -0700
Correct comment typo in op.h
M op.h
commit 04ff7c39fce5306db7e6d44616c92555ff9c4dae
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 14:33:17 2012 -0700
DosGlob.pm: Fix pod syntax
M lib/File/DosGlob.pm
commit 10871e775a95c8ab0e0da8246e44c7a051d4f4fa
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 13:18:36 2012 -0700
Remove obsolete comment from DosGlob.pm
This comment was added by commit 37248846, without explanation.
DosGlob.pm already had âuse strictâ three days before that, added in
commit b75c8c73, three days earlier.
I can only assume that 37248846 was written before b75c8c73 was
applied, and that simply adding âuse strictâ didnât work, considering
that b75c8c73 changed quite a few things to make things strict-safe.
M lib/File/DosGlob.pm
commit 19a294495d4ce1ca4346e2d4306caf7af42f4044
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 13:18:07 2012 -0700
Increase $File::DosGlob::VERSION to 1.07
M lib/File/DosGlob.pm
commit 500770c61d55ae7728836879da44822b87a27820
Author: Father Chrysostomos <[email protected]>
Date: Wed Apr 25 18:29:12 2012 -0700
Make lvalue subs copy returned PADTMPs in rvalue cx
I was trying to write a JAPH, but did not get what I expected:
$ ./perl -Ilib -e '@UNIVERSAL::ISA = CORE; print "just another "->ucfirst,
"perl hacker,\n"->ucfirst'
Perl hacker,
Perl hacker,
This happened because coresubs use leavesublv, to avoid copying the
return value wastefully.
But since this is exactly the same ucfirst op being called each time
(the one in &CORE::ucfirstâs op tree), and since ucfirst uses TARG, we
end up with the same scalar.
We have the same problem with lvalue subs:
$ ./perl -Ilib -e 'sub UNIVERSAL::ucfirst :lvalue { ucfirst $_[0] } print
"just another "->ucfirst, "perl hacker,\n"->ucfirst'
Perl hacker,
Perl hacker,
(This is not a regression, as 5.14 gave âCan't modify ucfirst in
lvalue subroutine returnâ.)
So âfixingâ coresubs would not be a solution, but a workaround.
The solution therefore is for leavesublv to copy PADTMPs in
rvalue context.
Commit 80422e24c fixed this for potential lvalue list context (i.e.,
for(lvsub()) {...}), but it wasnât sufficient.
M pp_ctl.c
M t/op/coresubs.t
M t/op/sub_lval.t
commit a90b26f19acb7d8d96ecbdcf529c98b528880520
Author: Father Chrysostomos <[email protected]>
Date: Wed Apr 25 14:08:48 2012 -0700
scope.c: Simplify and clarify comment
This comment seems to imply that this code is just working around a
problem in gv.c, which we could simply correct there. Iâve already
tried making the quoted code in gv.c handle *^H without a hash, but it
doesnât actually solve the problem. The real problem is that rv2hv
could also add a hash to *^H, via GvHVn, and that is simply not set up
to deal with autovivifying magic at all, and probably shouldnât be.
Also, quoting a piece of code that occurs elsewhere is just asking for
it to drift apart. By this time, the code in gv.c that is quoted in
scope.c is actually three times the length now, and looks completely
different.
M scope.c
commit 6c3a43856349786cee344e1b6dec7a89b16f9d7f
Author: Dagfinn Ilmari Mannsåker <[email protected]>
Date: Mon Apr 16 01:05:52 2012 +0100
Don't warn about "ambiguous without parens" for ctrl-glob
This fixes the following bogus warning [perl #112456]:
$ perl -e 'undef *^H'
Warning: Use of "undef" without parentheses is ambiguous at -e line 1.
Compare to the non-warning variant:
$ perl -e 'undef *{^H}'
M t/lib/warnings/toke
M toke.c
commit 5d5530dea5b4847668cce8d0b672dd9263db7550
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 18:10:21 2012 -0700
[perl #112418] Fix POD paragraph formatting
There was no empty line before a verbatim paragraph, making it
not verbatim.
M pod/perlfunc.pod
commit f738eb5776cb01fcdc98824cea42a77ddba1a647
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 18:01:50 2012 -0700
Increase $Hash::Util::VERSION to 0.12
M ext/Hash-Util/lib/Hash/Util.pm
commit 96cf6466510ce1e160e0cbc771d163937d8265b5
Author: jkeenan <[email protected]>
Date: Sun Apr 22 20:59:33 2012 -0400
Add subroutines hash_locked() and hashref_locked() to Hash::Util.
Make @EXPORT_OK, synopsis, and list of functions tested with
can_ok() consistent with one another. Rationalize the way
functions are grouped within @EXPORT_OK and the other locations.
Add tests for hash_locked(), hashref_locked(), hash_unlocked() and
hashref_unlocked(). Add descriptions for several unit tests which
lacked them.
For RT #112126.
M ext/Hash-Util/lib/Hash/Util.pm
M ext/Hash-Util/t/Util.t
commit ce90ed3ca53dbd885713905c2e046922fcaeb490
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 17:58:04 2012 -0700
File::Find: typo
M lib/File/Find.pm
commit 0a5c92b6f9fd49014fe481e1d648676ccec01ebf
Author: jkeenan <[email protected]>
Date: Fri Apr 6 20:20:59 2012 -0400
Individual files may appear in list of directories to be searched.
Document that, then demonstrate that with additional tests.
For RT #59750.
M lib/File/Find.pm
commit 75fa9c170a4b710cf8f60f48da1dad67f9349503
Author: jkeenan <[email protected]>
Date: Thu Apr 5 20:41:14 2012 -0400
Individual files may appear in list of directories to be searched.
Document that, then demonstrate that with additional tests.
For RT #59750.
M lib/File/Find/t/find.t
commit f22373a3d16d4e191597f43b4f06cbae3a5c4c2c
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 17:01:00 2012 -0700
Increase $File::Find::VERSION to 1.21
M lib/File/Find.pm
commit c33e26034d0aff6998fa2564098935646014d6b8
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 16:00:36 2012 -0700
[perl #112358] Storable: Donât create RV with no refcnt
Otherwise assigning to it will cause the referent to be freed, because
nothing but Storable knows that it has no reference count.
Storable.xs was creating a new RV without increasing the refe-
rence count on the referent. It was then using it to call the
STORABLE_freeze method on the object. Since Perl passes arguments
by reference, it was possible to unref the reference by assigning to
$_[0] within STORABLE_freeze. That would cause the objectâs reference
count to go down.
M dist/Storable/Storable.xs
M dist/Storable/t/blessed.t
commit 4efc585c275948b67748c9b80e51b97e45230d3c
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 16:00:13 2012 -0700
Increase $Storable::VERSION to 2.35
M dist/Storable/Storable.pm
commit ca71d3b734e62d84ea44821b6e40f996597626da
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 13:48:19 2012 -0700
Remove todo for UTF8 source filters
Source filters donât really make sense on character streams. They are
designed for streams of bytes coming straight from a file. Things
stop making sense if you have âuse utf8â in a UTF-8 scalar (does that
mean double-decode?).
Itâs for this reason that evalbytes respects source filters, while
eval does not. (It doesnât outside the unicode_eval feature, because
it was never really thought about and the implementation didnât take
it into account, resulting in strange behaviour. It doesnât with the
unicode_eval feature, because it was intentionally prohibited.)
M Porting/todo.pod
commit cc42d6e5c20de7827e10a8c08515f4ca2058ac4f
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 13:31:45 2012 -0700
[perl #112184] Handle $^N in Perl_magic_set
$^N is a magical variable, like $1 and $2, with the usual âsvâ
magic. So it is handled by Perl_magic_get and Perl_magic_set. But
Perl_magic_set didnât have a case for it, so it simply ignored it and
did nothing, like a tied variable with an empty STORE method.
Now assigning to $^N has the same affect as assigned to the numbered
variable to which it corresponds. If there is no corresponding cap-
ture from the last match, or in the absence of regexp plugins, it
croaks with âModification of a read-only valueâ.
M mg.c
M t/re/pat.t
commit 113497431792b7f2e4ae722dc13bf490fb2678d4
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 23 23:03:17 2012 -0700
perldata: Consistent spaces after dots
M pod/perldata.pod
commit 0f810321ddcab1f5838faa72cefdf71c68e85642
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 23 20:29:13 2012 -0700
Copy call checker when cloning closure prototype
Otherwise cv_set_call_checker has no effect inside an attribute han-
dler for a closure.
M embed.fnc
M embed.h
M ext/XS-APItest/t/call_checker.t
M mg.c
M mg_raw.h
M mg_vtable.h
M op.c
M pad.c
M pod/perlguts.pod
M proto.h
M regen/mg_vtable.pl
commit ea25676f017c56af6ba7d6dc10b7f85a66f5898d
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:32:09 2012 -0700
[perl #111000] Let hv_store work on hint hashes
Magic attached to hash elements has its key stored differently depend-
ing on how it was supplied to hv_common. hv_store passes a string/
length pair to hv_common, while hv_store_ent passes an SV.
magic_clearhint wasnât able to handle string/length pairs, and only
worked with SVs, resulting in assertion failures or crashes.
This commit fixes magic_clearhint, so that XS code can use hv_store on
hint hashes.
M ext/XS-APItest/t/hash.t
M mg.c
commit 9358e2910035a6a656bd854ac550ce1f7a2f32aa
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:27:50 2012 -0700
mg.c:magic_clearhint: remove redundant PERL_UNUSED_ARG
M mg.c
commit 91f424f793202eb02a8ebfe3996eab14588e8b11
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:06:57 2012 -0700
XS-APItest/t/hash.t: comment typo
M t/op/hash.t
commit 502a6edcb09b10dee9a1703fe34d3ee1e3237857
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:05:24 2012 -0700
Increase $XS::APItest::VERSION to 0.39
M ext/XS-APItest/APItest.pm
commit 1e1cae3ad49894ce5267ef30fdaf29823bdc43cd
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:35:43 2012 -0700
pp_ctl.c:pp_goto: Donât repeat yourself
No need to say DIE three times.
M pp_ctl.c
commit d9a40788ca3144afe4edfbebf1ae608d21630b08
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:34:24 2012 -0700
Produce the right error for goto "\0"
Since we have supported for embedded nulls in strings, we shouldnât
be using if(*label) to see whether label has a non-zero length.
Itâs probably not possible to get a null into a label, but we should
still say âcanât findâ rather than âmust haveâ in that case.
M op.c
M pp_ctl.c
M t/op/goto.t
commit f7073b4bd92a14dcc62e82b97fd73f1a734343bc
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:19:15 2012 -0700
[perl #111794] Make goto "" like goto ${\""}
The logic was written in such a way that goto "" just happened to slip
past all the checks and cause pp_goto to return NULL for the next op,
which means the end of the program.
goto ${\""} dies with âgoto must have labelâ, so goto ""
should as well.
This also adds other tests for that error, which was apparently
untested till now.
M pp_ctl.c
M t/op/goto.t
commit 4cc913856c80f23ea9e803d9fe5446330211d05e
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:00:14 2012 -0700
Teach B::Concise about UTF8 labels
M ext/B/B/Concise.pm
commit d2f81f560a47faa518b4cd590c48f1e097dfa5f6
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 19:58:26 2012 -0700
Increase $B::Concise::VERSION to 0.90
M ext/B/B/Concise.pm
commit 8081398c945d3356240b501db5596dcdecb67d84
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 15:47:38 2012 -0700
Corrections to AUTHORS should go to perlbug
M AUTHORS
commit 75a183c872efc4746f4a442915c56cfdde5b21b4
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 23:28:51 2012 -0700
regen/opcodes: Rmv evalonce comment
This goes all the way back to when perl 5.0 was being polished up.
The idea behind evalonce is that eval "constant string" should be
optimisable by being compiled ahead of time, just like eval { ... }.
But this could never work properly, because BEGIN blocks would only
fire once. Also, eval '$x .. $y' is an easy way to create two separ-
ate flip-flops. There are undoubtedly many other reasons why this
could never work.
So there is no reason to keep this comment any longer, as it is not
(or should not be) a to-do item.
M regen/opcodes
commit 8e84dba53a25386d347f0d84af11fad4280bf0b6
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 23:25:33 2012 -0700
pp_hot.c:pp_entersub: Rmv comment about setting PL_compcv
PL_compcv is meant to point to the currently compiling sub, even dur-
ing an evalâs run time. (See commit 676a678.) Therefore, this com-
mentâs suggestion is incorrect.
M pp_hot.c
commit 4b59ef66e470c5c0af09af413323a04ae117f1d8
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 19 22:30:00 2012 -0700
podcheck.t: Allow usually-skipped files on cmd line
M t/porting/podcheck.t
commit ca665f2da9640c387e52e6da4931b1813c777526
Author: Alan Haggai Alavi <[email protected]>
Date: Tue Feb 28 21:18:58 2012 +0530
Removed a redundant 'once'
M pod/perlhist.pod
-----------------------------------------------------------------------
--
Perl5 Master Repository