[perl.git] branch blead, updated. v5.17.3-232-gd787f4a
In perl.git, the branch blead has been updated http://perl5.git.perl.org/perl.git/commitdiff/d787f4a5ba95039e3f0b8f63ebc649cde1011c69?hp=4a7d38e775a8ed02578c490e2e20173b020c5fca - Log - commit d787f4a5ba95039e3f0b8f63ebc649cde1011c69 Author: Nicholas Clark n...@ccl4.org Date: Mon Aug 13 22:00:07 2012 +0200 newXS_len_flags() shouldn't change the line number on PL_curcop when warning. This can actually generate incorrect line numbers in runtime warnings, when XSUBs are redefined from calls made from BEGIN blocks, and the line number from the opening brace of the begin block is mashed with the filename of the current line. For compiletime warnings, PL_curcop == PL_compiling, so the line numbers will be correct whether taken from PL_compiling or PL_parser. This code dates back to perl-5.000, when it was added to newXS(). It appears to be a copy of code present in newSUB() since alpha 2. M op.c M t/lib/warnings/op commit 502e5101caadccb8d4d7ffd810c78d57c81a4cb7 Author: Nicholas Clark n...@ccl4.org Date: Wed Aug 8 22:59:19 2012 +0200 Test that the warning for can be 0, test with defined is for the start. The Perl interpreter is careful to use the line number of the start of the 'Value of %s can be 0; test with defined() warning, but there were no tests for this. M op.c M t/lib/warnings/op commit 2b7cdddeb97baa9e06d2bd4f7931d608e8dde565 Author: Nicholas Clark n...@ccl4.org Date: Wed Aug 8 22:23:29 2012 +0200 Test that the warning for Found = in conditional is for the start line. The Perl interpreter is careful to use the line number of the start of the Found = in conditional, but there were no tests for this. M op.c M t/lib/warnings/op commit 2d4e17002f84f407fd95e491979a0bafccc2a0f8 Author: Nicholas Clark n...@ccl4.org Date: Wed Aug 8 16:24:57 2012 +0200 Test that the line number for a sub redefined warning is for the start. The Perl interpreter is careful to use the line number of the start of a subroutine's redefinition for the warning, but there were no tests for this. M op.c M t/lib/warnings/op --- Summary of changes: op.c | 16 ++-- t/lib/warnings/op | 46 ++ 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/op.c b/op.c index 14ca6fc..7305ab5 100644 --- a/op.c +++ b/op.c @@ -1085,8 +1085,11 @@ S_scalarboolean(pTHX_ OP *o) if (ckWARN(WARN_SYNTAX)) { const line_t oldline = CopLINE(PL_curcop); - if (PL_parser PL_parser-copline != NOLINE) + if (PL_parser PL_parser-copline != NOLINE) { + /* This ensures that warnings are reported at the first line + of the conditional, not the last. */ CopLINE_set(PL_curcop, PL_parser-copline); +} Perl_warner(aTHX_ packWARN(WARN_SYNTAX), Found = in conditional, should be ==); CopLINE_set(PL_curcop, oldline); } @@ -5831,6 +5834,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp) } if (warnop) { const line_t oldline = CopLINE(PL_curcop); +/* This ensures that warnings are reported at the first line + of the construction, not the last. */ CopLINE_set(PL_curcop, PL_parser-copline); Perl_warner(aTHX_ packWARN(WARN_MISC), Value of %s%s can be \0\; test with defined(), @@ -7017,8 +7022,11 @@ Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, #endif ) { const line_t oldline = CopLINE(PL_curcop); - if (PL_parser PL_parser-copline != NOLINE) + if (PL_parser PL_parser-copline != NOLINE) { +/* This ensures that warnings are reported at the first + line of a redefinition, not the last. */ CopLINE_set(PL_curcop, PL_parser-copline); +} report_redefined_cv(cSVOPo-op_sv, cv, const_sv); CopLINE_set(PL_curcop, oldline); #ifdef PERL_MAD @@ -7424,14 +7432,10 @@ Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, /* Redundant check that allows us to avoid creating an SV most of the time: */ if (CvCONST(cv) || ckWARN(WARN_REDEFINE)) { -const line_t oldline = CopLINE(PL_curcop); -if (PL_parser PL_parser-copline != NOLINE) -CopLINE_set(PL_curcop, PL_parser-copline); report_redefined_cv(newSVpvn_flags( name,len,(flagsSVf_UTF8)|SVs_TEMP ),
[perl.git] branch smoke-me/warning-line-numbers, deleted. v5.17.3-218-g8efbe1c
In perl.git, the branch smoke-me/warning-line-numbers has been deleted http://perl5.git.perl.org/perl.git/commitdiff/?hp=8efbe1c3fb15632acb7e3b4f02eaf6117443e1c7 was 8efbe1c3fb15632acb7e3b4f02eaf6117443e1c7 --- 8efbe1c3fb15632acb7e3b4f02eaf6117443e1c7 newXS_len_flags() shouldn't change the line number on PL_curcop when warning. --- -- Perl5 Master Repository
[perl.git] branch blead, updated. v5.17.3-233-g681a49b
In perl.git, the branch blead has been updated http://perl5.git.perl.org/perl.git/commitdiff/681a49bfebe715e645e428b1b7cc1976507eb70f?hp=d787f4a5ba95039e3f0b8f63ebc649cde1011c69 - Log - commit 681a49bfebe715e645e428b1b7cc1976507eb70f Author: Sebastien Aperghis-Tramoni sa...@cpan.org Date: Mon Sep 3 16:36:06 2012 +0200 Upgrade to XSLoader 0.16 --- Summary of changes: Porting/Maintainers.pl |2 +- dist/XSLoader/Makefile.PL| 20 ++-- dist/XSLoader/XSLoader_pm.PL |6 +++--- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 9ab2631..a422184 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -2122,7 +2122,7 @@ use File::Glob qw(:case); 'XSLoader' = { 'MAINTAINER' = 'saper', -'DISTRIBUTION' = 'SAPER/XSLoader-0.15.tar.gz', +'DISTRIBUTION' = 'SAPER/XSLoader-0.16.tar.gz', 'FILES'= q[dist/XSLoader], 'EXCLUDED' = [ qr{^eg/}, diff --git a/dist/XSLoader/Makefile.PL b/dist/XSLoader/Makefile.PL index 111d85a..008f602 100644 --- a/dist/XSLoader/Makefile.PL +++ b/dist/XSLoader/Makefile.PL @@ -34,17 +34,25 @@ my $installdirs = $] 5.011 ? perl : site; WriteMakefile( NAME= $PACKAGE, -($ExtUtils::MakeMaker::VERSION 6.30 ? - (LICENSE = 'perl', - AUTHOR= 'Sebastien Aperghis-Tramoni sebast...@aperghis.net', - ABSTRACT_FROM = 'XSLoader_pm.PL', - ) : ()), +LICENSE = 'perl', +AUTHOR = 'Sebastien Aperghis-Tramoni sebast...@aperghis.net', VERSION_FROM= 'XSLoader_pm.PL', +ABSTRACT_FROM = 'XSLoader_pm.PL', INSTALLDIRS = $installdirs, PL_FILES= { 'XSLoader_pm.PL' = 'XSLoader.pm' }, PM = { 'XSLoader.pm' = '$(INST_ARCHLIB)/XSLoader.pm' }, PREREQ_PM = { -'Test::More' = '0.62', +'Test::More' = '0.47', +}, +META_MERGE = { +resources = { +repository = 'git://perl5.git.perl.org/perl.git', +license = 'http://dev.perl.org/licenses/', +homepage= 'https://metacpan.org/module/Math::BigInt', +irc = 'irc://irc.perl.org/#p5p', +mailinglist = 'http://lists.perl.org/list/perl5-porters.html', +bugtracker = https://rt.perl.org/rt3/Search/Results.html?Query=Queue='perl5' AND Content LIKE 'module=XSLoader' AND (Status='open' OR Status='new' OR Status='stalled'), +}, }, dist= { COMPRESS = 'gzip -9f', SUFFIX = 'gz', }, clean = { FILES = 'XSLoader-* XSLoader.pm' }, diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL index 98a19ea..fb5707c 100644 --- a/dist/XSLoader/XSLoader_pm.PL +++ b/dist/XSLoader/XSLoader_pm.PL @@ -201,7 +201,7 @@ XSLoader - Dynamically load C libraries into Perl code =head1 VERSION -Version 0.15 +Version 0.16 =head1 SYNOPSIS @@ -257,7 +257,7 @@ If no C$VERSION was specified on the Cbootstrap line, the last line becomes XSLoader::load 'YourPackage'; -If the call to Cload is from the YourPackage, then that can be further +If the call to Cload is from CYourPackage, then that can be further simplified to XSLoader::load(); @@ -289,7 +289,7 @@ Cuse XSLoader by Crequire, so the compiler does not know that a function CXSLoader::load() is present. This boilerplate uses the low-overhead CXSLoader if present; if used with -an antic Perl which has no CXSLoader, it falls back to using CDynaLoader. +an antique Perl which has no CXSLoader, it falls back to using CDynaLoader. =head1 Order of initialization: early load() -- Perl5 Master Repository
[perl.git] branch smoke-me/debug_readonly_ops, deleted. v5.17.3-221-gcc1608c
In perl.git, the branch smoke-me/debug_readonly_ops has been deleted http://perl5.git.perl.org/perl.git/commitdiff/?hp=cc1608c8e25aa6bbfe1453fdae1f4454042a8e90 was cc1608c8e25aa6bbfe1453fdae1f4454042a8e90 --- cc1608c8e25aa6bbfe1453fdae1f4454042a8e90 In op.c, change S_Slab_to_rw() from an OP * parameter to an OPSLAB *. --- -- Perl5 Master Repository
[perl.git] branch smoke-me/debug_readonly_ops, created. v5.17.3-232-gd787f4a
In perl.git, the branch smoke-me/debug_readonly_ops has been created http://perl5.git.perl.org/perl.git/commitdiff/d787f4a5ba95039e3f0b8f63ebc649cde1011c69?hp= at d787f4a5ba95039e3f0b8f63ebc649cde1011c69 (commit) - Log - No new revisions added by this update --- -- Perl5 Master Repository
[perl.git] branch smoke-me/debug_readonly_ops, updated. v5.17.3-236-gb19b3d9
In perl.git, the branch smoke-me/debug_readonly_ops has been updated http://perl5.git.perl.org/perl.git/commitdiff/b19b3d9d94c45c0080c8aaccbe057ac1160095d6?hp=d787f4a5ba95039e3f0b8f63ebc649cde1011c69 - Log - commit b19b3d9d94c45c0080c8aaccbe057ac1160095d6 Author: Nicholas Clark n...@ccl4.org Date: Mon Sep 3 16:47:15 2012 +0200 Perl_magic_setdbline() should clear and set read-only OP slabs. The debugger implements breakpoints by setting/clearing OPf_SPECIAL on OP_DBSTATE ops. This means that it is writing to the optree at runtime, and it falls foul of the enforced read-only OP slabs when debugging with -DPERL_DEBUG_READONLY_OPS Avoid this by removing static from Slab_to_rw(), and using it and Slab_to_ro() in Perl_magic_setdbline() to temporarily make the slab re-write whilst changing the breakpoint flag. With this all tests pass with -DPERL_DEBUG_READONLY_OPS (on this system) M embed.fnc M embed.h M mg.c M op.c M proto.h commit ce81123c4d3004d7159670eb72f26251587406e2 Author: Nicholas Clark n...@ccl4.org Date: Tue Aug 14 14:24:34 2012 +0200 In op.c, change S_Slab_to_rw() from an OP * parameter to an OPSLAB *. This makes it consistent with Perl_Slab_to_ro(), which takes an OPSLAB *. M embed.fnc M op.c M proto.h commit 2ad420f463da20c3465f3d09c5c7eea7f0b2c8f2 Author: Nicholas Clark n...@ccl4.org Date: Tue Aug 14 14:10:30 2012 +0200 With -DPERL_DEBUG_READONLY_OPS, changing a slab refcnt shouldn't make it r/w. Perl_op_refcnt_inc() and Perl_op_refcnt_dec() now both take care to leave the slab in the same state as they found it. Previously both would unconditionally make the slab read-write. M op.c commit 65c89bb7fb34243bc5a89b081bf7329e5a60e597 Author: Nicholas Clark n...@ccl4.org Date: Wed Aug 8 12:37:48 2012 +0200 Under -DPERL_DEBUG_READONLY_OPS don't work around glibc 2.2.5 _moddi3 bugs. The work around involves a runtime check and substituting OP pointers based on the result. The substitution fails if the optree is mapped read-only. M pp.c --- Summary of changes: embed.fnc |4 +--- embed.h |6 +- mg.c |6 ++ op.c | 36 pp.c |4 ++-- proto.h | 12 +--- 6 files changed, 39 insertions(+), 29 deletions(-) diff --git a/embed.fnc b/embed.fnc index f547316..ab2cdec 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1797,14 +1797,12 @@ Xp |void |Slab_Free |NN void *op #if defined(PERL_DEBUG_READONLY_OPS) #if defined(PERL_CORE) px |void |Slab_to_ro |NN OPSLAB *slab +px |void |Slab_to_rw |NN OPSLAB *const slab #endif : Used in OpREFCNT_inc() in sv.c poxM |OP * |op_refcnt_inc |NULLOK OP *o : FIXME - can be static. poxM |PADOFFSET |op_refcnt_dec |NN OP *o -#if defined(PERL_IN_OP_C) -s |void |Slab_to_rw |NN void *op -#endif #endif #if defined(PERL_IN_PERL_C) diff --git a/embed.h b/embed.h index ecce321..45291f0 100644 --- a/embed.h +++ b/embed.h @@ -1319,6 +1319,7 @@ #define opslab_free_nopad(a) Perl_opslab_free_nopad(aTHX_ a) #if defined(PERL_DEBUG_READONLY_OPS) #define Slab_to_ro(a) Perl_Slab_to_ro(aTHX_ a) +#define Slab_to_rw(a) Perl_Slab_to_rw(aTHX_ a) #endif # endif # if defined(PERL_CR_FILTER) @@ -1327,11 +1328,6 @@ #define strip_return(a)S_strip_return(aTHX_ a) #endif # endif -# if defined(PERL_DEBUG_READONLY_OPS) -#if defined(PERL_IN_OP_C) -#define Slab_to_rw(a) S_Slab_to_rw(aTHX_ a) -#endif -# endif # if defined(PERL_IN_AV_C) #define get_aux_mg(a) S_get_aux_mg(aTHX_ a) # endif diff --git a/mg.c b/mg.c index 3dea5c2..1f6d062 100644 --- a/mg.c +++ b/mg.c @@ -2020,11 +2020,17 @@ Perl_magic_setdbline(pTHX_ SV *sv, MAGIC *mg) if (svp SvIOKp(*svp)) { OP * const o = INT2PTR(OP*,SvIVX(*svp)); if (o) { +#ifdef PERL_DEBUG_READONLY_OPS + Slab_to_rw(OpSLAB(o)); +#endif /* set or clear breakpoint in the relevant control op */ if (i) o-op_flags |= OPf_SPECIAL; else o-op_flags = ~OPf_SPECIAL; +#ifdef PERL_DEBUG_READONLY_OPS + Slab_to_ro(OpSLAB(o)); +#endif } } return 0; diff --git a/op.c b/op.c index 7305ab5..9ad4499 100644 --- a/op.c +++ b/op.c @@ -261,18 +261,13 @@ Perl_Slab_to_ro(pTHX_ OPSLAB *slab) } } -STATIC void -S_Slab_to_rw(pTHX_ void *op) +void +Perl_Slab_to_rw(pTHX_ OPSLAB *const slab) { -OP * const o = (OP *)op; -OPSLAB *slab; OPSLAB *slab2; PERL_ARGS_ASSERT_SLAB_TO_RW; -if (!o-op_slabbed) return; - -slab = OpSLAB(o); if (!slab-opslab_readonly) return; slab2 = slab;
[perl.git] branch blead, updated. v5.17.3-234-ge52529c
In perl.git, the branch blead has been updated http://perl5.git.perl.org/perl.git/commitdiff/e52529ca2472f8f4697aeab0a74a65c9c5189801?hp=681a49bfebe715e645e428b1b7cc1976507eb70f - Log - commit e52529ca2472f8f4697aeab0a74a65c9c5189801 Author: Rafael Garcia-Suarez r...@consttype.org Date: Mon Sep 3 17:39:41 2012 +0200 Make XSLoader's UPSTREAM as undef The upstream is supposed to be blead, but the CPAN version of XSLoader 0.16 and the one that has shipped with perl 5.17.3 are different (doc changes only). The problem (cmp_version.t failing) should disappear after the next perl release. --- Summary of changes: Porting/Maintainers.pl |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index a422184..a228103 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -2132,7 +2132,8 @@ use File::Glob qw(:case); ), 'XSLoader.pm',# we use XSLoader_pm.PL ], -'UPSTREAM' = 'blead', +# Revert UPSTREAM to 'blead' after 0.17 is released +'UPSTREAM' = undef, }, 's2p' = { -- Perl5 Master Repository
[perl.git] branch sprout/lexsub, deleted. v5.17.3-273-g190b50c
In perl.git, the branch sprout/lexsub has been deleted http://perl5.git.perl.org/perl.git/commitdiff/?hp=190b50c2fb53f3fe12aa17b6a84154b154b3bb6b was 190b50c2fb53f3fe12aa17b6a84154b154b3bb6b --- 190b50c2fb53f3fe12aa17b6a84154b154b3bb6b Use the right outside for my subs defined in inner subs --- -- Perl5 Master Repository
[perl.git] branch sprout/lexsub, created. v5.17.3-274-gc28fcee
In perl.git, the branch sprout/lexsub has been created http://perl5.git.perl.org/perl.git/commitdiff/c28fcee8c7fba883ec3e47f4247ea873e83f6946?hp= at c28fcee8c7fba883ec3e47f4247ea873e83f6946 (commit) - Log - commit c28fcee8c7fba883ec3e47f4247ea873e83f6946 Author: Father Chrysostomos spr...@cpan.org Date: Mon Sep 3 21:26:37 2012 -0700 CvOUTSIDE should be strong for lexsub declared in inner pack sub PadnameOUTER (SvFAKE) entries in pads of clonable subs contain the offset in the parent pad where the closed-over entry is to be found. The pad itself does not reference the outer lexical until the sub is cloned at run time. newMYSUB had to account for that by following CvOUTSIDE for PadnameOUTER entries, to account for cases like this: my sub foo; my sub bar { sub foo {} } The sub foo{} definition would have to find the my sub foo declaration from outside and store the sub there. That code was not accounting for named package subs, which close over variables at compile time, so they donât need (and donât) store a par- ent offset. So outcv would point to bar in this case: my sub foo; sub bar { sub foo {} } If outcv matched CvOUTSIDE(foo), then CvOUTSIDE was made weak. That does not help in cases like this: undef *bar; { my sub foo; sub bar { sub foo {} } } If foo has a weak CvOUTSIDE pointer, then it will still point to bar after bar is freed, which does not help when the sub is cloned and tries to look at CvROOT(CvOUTSIDE). If the pad name is marked PadnameOUTER, even if it has no parent pad index, newMYSUB needs to leave the CvOUTSIDE pointer strongc. Also, pad_fixup_inner_anons did not account for subs with strong CvOUTSIDE pointers whose CvOUTSIDE point to the sub whose pad is being iterated through. M op.c M pad.c M t/cmd/lexsub.t commit ce134adc21cdc53144fcb8febf8d3e9e0356974d Author: Father Chrysostomos spr...@cpan.org Date: Tue Aug 14 18:10:40 2012 -0700 Use the right outside for my subs defined in inner subs In this example, { my sub foo; sub bar { sub foo { } } } the foo sub is cloned when the scope containing the âmy subâ declara- tion is entered, but fooâs CvOUTSIDE pointer points to something other than the active sub. cv_clone assumes that the currently-running sub is the right sub to close over (at least for subs; formats are another matter). That was true in the absence of my subs. This commit changes it to account. I had to tweak the test, which was wrong, because sub foo was closing over a stale var. M pad.c M t/cmd/lexsub.t commit 7b99d801ef40ffe03160ebba7884b4527f4eacdd Author: Father Chrysostomos spr...@cpan.org Date: Tue Aug 14 12:24:43 2012 -0700 Fix Peek.t M ext/Devel-Peek/t/Peek.t commit 8b82a76c0956e16191a82c03b5139b0f3cccbe4c Author: Father Chrysostomos spr...@cpan.org Date: Mon Aug 13 22:56:05 2012 -0700 Preserve outside pointers of my subs with string eval The CvHASEVAL flag lets cv_clone know that the clone needs to have its CvOUTSIDE pointer set, for the sake of string evalsâ being able to look up variables. It was only being set on anonymous subs. It should be set for all clonable subs. It doesnât actually hurt to set it on all types of subs, whether clonable or not, since it has no effect on non-clon- able subs. M pad.c M t/cmd/lexsub.t commit fb092070dcc29f82b9dbe2e401a86b1b7b746bca Author: Father Chrysostomos spr...@cpan.org Date: Sun Aug 12 17:57:35 2012 -0700 Fix up outside pointers for my subs I had not yet fixed Perl_pad_fixup_inner_anons to account for the fact that my sub prototype CVs are stored in magic attached to the SV slot in the pad, rather than directly in the pad. It also did not like entries that close over subs defined in outer or inner subs (âmy sub foo; sub bar; sub bar { foo } }â and âsub bar; sub bar { my sub foo; sub { sub foo { } } }â respectively). This was resulting in assertion failures, unsurprisingly. Some of the tests I added, which were causing assertion failures, are now failing for other reasons, and are marked as to-do. M pad.c M t/cmd/lexsub.t commit bda9e61ed2c7d15e7f74b008c08174bc877ffc15 Author: Father Chrysostomos spr...@cpan.org Date: Fri Aug 3 18:01:06 2012 -0700 perly.y: Remove MYSUB This token is not used any more. M perly.act M perly.h M perly.tab M perly.y M toke.c commit 854a0634b6e4df9decc16682f59ecf66b259e1e7 Author: Father Chrysostomos