Hello community,
here is the log from the commit of package perl-Variable-Magic for
openSUSE:Factory checked in at 2017-02-16 17:05:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Variable-Magic (Old)
and /work/SRC/openSUSE:Factory/.perl-Variable-Magic.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Variable-Magic"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Variable-Magic/perl-Variable-Magic.changes
2016-09-08 17:39:05.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Variable-Magic.new/perl-Variable-Magic.changes
2017-02-16 17:05:07.367237498 +0100
@@ -1,0 +2,17 @@
+Tue Feb 14 07:57:29 UTC 2017 - [email protected]
+
+- updated to 0.61
+ see /usr/share/doc/packages/perl-Variable-Magic/Changes
+
+ 0.61 2017-01-24 15:30 UTC
+ + Fix : [RT #115792] : Latest blead stack unwind work causes infloop
+ in a test.
+ A change in how the core frees temporary values after eval
+ interacted badly with Variable::Magic and caused infinite
loops
+ when a free callback was attached to a wizard. This change
was
+ temporarily reverted, but is going to be reinstated, and
+ Variable::Magic is now able to play nicely when this happens.
+ Thanks Peter Rabbitson for reporting and David Mitchell for
+ providing a fix.
+
+-------------------------------------------------------------------
Old:
----
Variable-Magic-0.60.tar.gz
New:
----
Variable-Magic-0.61.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Variable-Magic.spec ++++++
--- /var/tmp/diff_new_pack.zis6yD/_old 2017-02-16 17:05:07.879165065 +0100
+++ /var/tmp/diff_new_pack.zis6yD/_new 2017-02-16 17:05:07.879165065 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Variable-Magic
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
Name: perl-Variable-Magic
-Version: 0.60
+Version: 0.61
Release: 0
%define cpan_name Variable-Magic
Summary: Associate user-defined magic to variables from Perl
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Variable-Magic/
-Source0:
http://www.cpan.org/authors/id/V/VP/VPIT/%{cpan_name}-%{version}.tar.gz
+Source0:
https://cpan.metacpan.org/authors/id/V/VP/VPIT/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
++++++ Variable-Magic-0.60.tar.gz -> Variable-Magic-0.61.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Variable-Magic-0.60/Changes
new/Variable-Magic-0.61/Changes
--- old/Variable-Magic-0.60/Changes 2016-09-06 23:40:40.000000000 +0200
+++ new/Variable-Magic-0.61/Changes 2017-01-24 16:05:05.000000000 +0100
@@ -1,5 +1,17 @@
Revision history for Variable-Magic
+0.61 2017-01-24 15:30 UTC
+ + Fix : [RT #115792] : Latest blead stack unwind work causes infloop
+ in a test.
+ A change in how the core frees temporary values after eval
+ interacted badly with Variable::Magic and caused infinite loops
+ when a free callback was attached to a wizard. This change was
+ temporarily reverted, but is going to be reinstated, and
+ Variable::Magic is now able to play nicely when this happens.
+ Thanks Peter Rabbitson for reporting and David Mitchell for
+ providing a fix.
+
+
0.60 2016-09-06 22:30 UTC
+ Chg : A large chunk of boilerplate XS code, which is also used in
other XS modules, has been factored out of the main .xs file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Variable-Magic-0.60/META.json
new/Variable-Magic-0.61/META.json
--- old/Variable-Magic-0.60/META.json 2016-09-06 23:41:21.000000000 +0200
+++ new/Variable-Magic-0.61/META.json 2017-01-24 16:06:59.000000000 +0100
@@ -66,6 +66,6 @@
"url" :
"http://git.profvince.com/?p=perl%2Fmodules%2FVariable-Magic.git"
}
},
- "version" : "0.60",
+ "version" : "0.61",
"x_serialization_backend" : "JSON::PP version 2.27400"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Variable-Magic-0.60/META.yml
new/Variable-Magic-0.61/META.yml
--- old/Variable-Magic-0.60/META.yml 2016-09-06 23:41:21.000000000 +0200
+++ new/Variable-Magic-0.61/META.yml 2017-01-24 16:06:59.000000000 +0100
@@ -41,5 +41,5 @@
homepage: http://search.cpan.org/dist/Variable-Magic/
license: http://dev.perl.org/licenses/
repository: http://git.profvince.com/?p=perl%2Fmodules%2FVariable-Magic.git
-version: '0.60'
+version: '0.61'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Variable-Magic-0.60/Magic.xs
new/Variable-Magic-0.61/Magic.xs
--- old/Variable-Magic-0.60/Magic.xs 2016-07-18 18:25:08.000000000 +0200
+++ new/Variable-Magic-0.61/Magic.xs 2016-12-07 02:05:25.000000000 +0100
@@ -155,6 +155,10 @@
# define SvREFCNT_inc_simple_void(sv) ((void) SvREFCNT_inc(sv))
#endif
+#ifndef SvREFCNT_dec_NN
+# define SvREFCNT_dec_NN(sv) ((void) SvREFCNT_dec(sv))
+#endif
+
#ifndef mPUSHu
# define mPUSHu(U) PUSHs(sv_2mortal(newSVuv(U)))
#endif
@@ -183,6 +187,8 @@
# define OP_CLASS(O) (PL_opargs[(O)->op_type] & OA_CLASS_MASK)
#endif
+#define VMG_CAREFUL_SELF_DESTRUCTION XSH_HAS_PERL(5, 25, 3)
+
/* ... Bug-free mg_magical ................................................. */
/* See the discussion at
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00036.html */
@@ -1416,6 +1422,9 @@
typedef struct {
SV *sv;
+#if VMG_CAREFUL_SELF_DESTRUCTION
+ SV *rsv; /* The ref to the sv currently being freed, pushed on the stack */
+#endif
int in_eval;
I32 base;
} vmg_svt_free_cleanup_ud;
@@ -1460,6 +1469,17 @@
SV *sv = ud->sv;
MAGIC *mg;
+#if VMG_CAREFUL_SELF_DESTRUCTION
+ /* Silently undo the ref - don't trigger destruction in the referent
+ * for a second time */
+ if (SvROK(ud->rsv) && SvRV(ud->rsv) == sv) {
+ SvRV_set(ud->rsv, NULL);
+ SvROK_off(ud->rsv);
+ --SvREFCNT(sv); /* Silent */
+ }
+ SvREFCNT_dec_NN(ud->rsv);
+#endif
+
/* We are about to croak() while sv is being destroyed. Try to clean up
* things a bit. */
mg = SvMAGIC(sv);
@@ -1467,7 +1487,7 @@
vmg_mg_del(sv, NULL, mg, mg->mg_moremagic);
mg_magical(sv);
}
- SvREFCNT_dec(sv);
+ SvREFCNT_dec(sv); /* Re-trigger destruction */
vmg_dispell_guard_oncroak(aTHX_ NULL);
@@ -1517,7 +1537,13 @@
PUSHMARK(SP);
EXTEND(SP, 2);
+ /* This will bump the refcount of sv from 0 to 1 */
+#if VMG_CAREFUL_SELF_DESTRUCTION
+ ud.rsv = newRV_inc(sv);
+ PUSHs(ud.rsv);
+#else
PUSHs(sv_2mortal(newRV_inc(sv)));
+#endif
PUSHs(mg->mg_obj ? mg->mg_obj : &PL_sv_undef);
if (w->opinfo)
XPUSHs(vmg_op_info(w->opinfo));
@@ -1544,6 +1570,17 @@
POPSTACK;
+#if VMG_CAREFUL_SELF_DESTRUCTION
+ /* Silently undo the ref - don't trigger destruction in the referent
+ * for a second time */
+ if (SvROK(ud.rsv) && SvRV(ud.rsv) == sv) {
+ SvRV_set(ud.rsv, NULL);
+ SvROK_off(ud.rsv);
+ --SvREFCNT(sv); /* Silent */
+ }
+ SvREFCNT_dec_NN(ud.rsv);
+#endif
+
FREETMPS;
LEAVE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Variable-Magic-0.60/README
new/Variable-Magic-0.61/README
--- old/Variable-Magic-0.60/README 2016-09-06 23:41:21.000000000 +0200
+++ new/Variable-Magic-0.61/README 2017-01-24 16:06:59.000000000 +0100
@@ -2,7 +2,7 @@
Variable::Magic - Associate user-defined magic to variables from Perl.
VERSION
- Version 0.60
+ Version 0.61
SYNOPSIS
use Variable::Magic qw<wizard cast VMG_OP_INFO_NAME>;
@@ -645,8 +645,8 @@
perldoc Variable::Magic
COPYRIGHT & LICENSE
- Copyright 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Vincent Pit,
- all rights reserved.
+ Copyright 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 Vincent
+ Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Variable-Magic-0.60/lib/Variable/Magic.pm
new/Variable-Magic-0.61/lib/Variable/Magic.pm
--- old/Variable-Magic-0.60/lib/Variable/Magic.pm 2016-09-06
23:37:28.000000000 +0200
+++ new/Variable-Magic-0.61/lib/Variable/Magic.pm 2017-01-24
15:56:41.000000000 +0100
@@ -11,13 +11,13 @@
=head1 VERSION
-Version 0.60
+Version 0.61
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.60';
+ $VERSION = '0.61';
}
=head1 SYNOPSIS
@@ -751,7 +751,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Vincent Pit, all
rights reserved.
+Copyright 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 Vincent Pit,
all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Variable-Magic-0.60/t/15-self.t
new/Variable-Magic-0.61/t/15-self.t
--- old/Variable-Magic-0.60/t/15-self.t 2016-07-04 00:57:50.000000000 +0200
+++ new/Variable-Magic-0.61/t/15-self.t 2017-01-24 15:53:47.000000000 +0100
@@ -6,7 +6,7 @@
use Test::More;
my $tests;
-BEGIN { $tests = 17 }
+BEGIN { $tests = 18 }
plan tests => $tests;
@@ -183,6 +183,23 @@
}
}
+SKIP: {
+ skip "Called twice starting from perl 5.24" => 1 if "$]" >= 5.024;
+
+ my $recasted = 0;
+
+ my $wiz2 = wizard;
+ my $wiz1 = wizard free => sub { ++$recasted; &cast($_[0], $wiz2); die 'xxx' };
+
+ local $@;
+ my $res = eval {
+ my $v = do { my $val = 123; \$val };
+ &cast($v, $wiz1);
+ };
+
+ is $recasted, 1, 'recasting free callback called only once';
+}
+
eval q[
use lib 't/lib';
BEGIN { require Variable::Magic::TestDestroyRequired; }