Hello community,

here is the log from the commit of package perl-Cpanel-JSON-XS for 
openSUSE:Factory checked in at 2019-03-22 15:08:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Cpanel-JSON-XS"

Fri Mar 22 15:08:40 2019 rev:17 rq:687295 version:4.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS/perl-Cpanel-JSON-XS.changes  
2019-02-19 12:03:11.893051480 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new.25356/perl-Cpanel-JSON-XS.changes
       2019-03-22 15:08:54.185414808 +0100
@@ -1,0 +2,12 @@
+Tue Mar 19 06:07:02 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 4.10
+   see /usr/share/doc/packages/perl-Cpanel-JSON-XS/Changes
+
+  4.10 2019-03-18 (rurban)
+          - Fix incr_text refcounts (#123)
+          - Add incr_rest testcase (#123)
+          - Fix encode_stringify string-overload refcnt problem (#124)
+            "Attempt to free unreferenced scalar" with convert_blessed and 
overload.
+
+-------------------------------------------------------------------

Old:
----
  Cpanel-JSON-XS-4.09.tar.gz

New:
----
  Cpanel-JSON-XS-4.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Cpanel-JSON-XS.spec ++++++
--- /var/tmp/diff_new_pack.gi8jkL/_old  2019-03-22 15:08:56.605412715 +0100
+++ /var/tmp/diff_new_pack.gi8jkL/_new  2019-03-22 15:08:56.609412711 +0100
@@ -17,10 +17,10 @@
 
 
 Name:           perl-Cpanel-JSON-XS
-Version:        4.09
+Version:        4.10
 Release:        0
 %define cpan_name Cpanel-JSON-XS
-Summary:        Cpanel Fork of Json::Xs, Fast and Correct Serializing
+Summary:        CPanel fork of JSON::XS, fast and correct serializing
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
 Url:            https://metacpan.org/release/%{cpan_name}

++++++ Cpanel-JSON-XS-4.09.tar.gz -> Cpanel-JSON-XS-4.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/Changes 
new/Cpanel-JSON-XS-4.10/Changes
--- old/Cpanel-JSON-XS-4.09/Changes     2019-02-15 11:08:46.000000000 +0100
+++ new/Cpanel-JSON-XS-4.10/Changes     2019-03-18 08:47:57.000000000 +0100
@@ -2,6 +2,12 @@
 
 TODO: http://stevehanov.ca/blog/index.php?id=104 compression
 
+4.10 2019-03-18 (rurban)
+        - Fix incr_text refcounts (#123)
+        - Add incr_rest testcase (#123)
+        - Fix encode_stringify string-overload refcnt problem (#124)
+          "Attempt to free unreferenced scalar" with convert_blessed and 
overload.
+
 4.09 2019-02-15 (rurban)
         - Add seperate allow_dupkeys property, in relaxed (#122)
         - Fixed allow_dupkeys for the XS slow path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/META.json 
new/Cpanel-JSON-XS-4.10/META.json
--- old/Cpanel-JSON-XS-4.09/META.json   2019-02-15 11:09:20.000000000 +0100
+++ new/Cpanel-JSON-XS-4.10/META.json   2019-03-18 08:49:05.000000000 +0100
@@ -48,7 +48,7 @@
          "url" : "https://github.com/rurban/Cpanel-JSON-XS";
       }
    },
-   "version" : "4.09",
+   "version" : "4.10",
    "x_contributors" : [
       "Ashley Willis <[email protected]>",
       "Daniel Dragan <[email protected]>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/META.yml 
new/Cpanel-JSON-XS-4.10/META.yml
--- old/Cpanel-JSON-XS-4.09/META.yml    2019-02-15 11:09:20.000000000 +0100
+++ new/Cpanel-JSON-XS-4.10/META.yml    2019-03-18 08:49:05.000000000 +0100
@@ -23,7 +23,7 @@
   bugtracker: https://github.com/rurban/Cpanel-JSON-XS/issues
   license: http://dev.perl.org/licenses/
   repository: https://github.com/rurban/Cpanel-JSON-XS
-version: '4.09'
+version: '4.10'
 x_contributors:
   - 'Ashley Willis <[email protected]>'
   - 'Daniel Dragan <[email protected]>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/SIGNATURE 
new/Cpanel-JSON-XS-4.10/SIGNATURE
--- old/Cpanel-JSON-XS-4.09/SIGNATURE   2019-02-15 11:09:21.000000000 +0100
+++ new/Cpanel-JSON-XS-4.10/SIGNATURE   2019-03-18 08:49:08.000000000 +0100
@@ -17,14 +17,14 @@
 SHA256 0abb585f231403618cae65047cfb3910d018ec83951b2bc14dcef5cbc77d1151 
.appveyor.yml
 SHA256 797abf38891d61e631374ccba78b2a8a707901227012c59372f5a9b2bc867188 
.travis.yml
 SHA256 8de3540a3cd7ecc9a9dcb48975fe852c082fe17d4462f87bb72aa7cc47f083ad COPYING
-SHA256 522decc91c620d5f84df5360910d62b3994245947ce35ba035ef838c666eb4da Changes
+SHA256 d0fb74795b89f0f60cd24c12a94bfbc8e3d2a56fad32d7091b91bce21316ab72 Changes
 SHA256 04d51042e2091c8c1f22252efa7e11322d2f6c4dc60c5145aec77e2969f506c8 
MANIFEST
-SHA256 2ef7507495b63c0b94e5540f04bdb558e6fe69f274b7cc75aa0ebedaf9c1b3d4 
META.json
-SHA256 6ebd91bec619d542fa2e5d4d441e1d9dcb2adafac67fc7426dc08bba90bfab74 
META.yml
+SHA256 27346ea551ba6d65ce3b6d2f740bbc1b18cfc4100ca76d9fefb721d01d1c8e20 
META.json
+SHA256 c5c808a568fa2ff95e873833320b24a9a8c92e7d644482b9b3b3306ab3761326 
META.yml
 SHA256 d718ee16b2c401c39ce7e2aa2262d4950498879764e060506ed8d667d0a4b798 
Makefile.PL
 SHA256 599983808ff085fb2e2ec6021e56bac1ffddf315cefb1450e5d58e7687d793a9 README
-SHA256 8c19dea1751d4d95c7ebea43b748063603d9fcbcf45c7cf5a187016c1febe190 XS.pm
-SHA256 4a992ffcf7f5b39f9fa209ca3f43e02fd4b19ab72a958c99743228c28b4bc0a0 XS.xs
+SHA256 377a81926fccc1a7a9a8a35ee2988cbcd6239b8bab741c45696ab8c981b56a68 XS.pm
+SHA256 ca5cb63280ef9427d62f39511917690389700af4d4524f79513738befbc37135 XS.xs
 SHA256 c95e4b970183cbd6d1ec9c88c37a80f12bd2b66ed6be3c008ffd578d2f622c01 
XS/Boolean.pm
 SHA256 f9a40fece0783df5c1d1d3d6f2586e61689b0445dcf10bba2916553c29d5f490 
XS/Type.pm
 SHA256 2f34a530b7ce981b0df9aacd2b6944ccf74c4a7f8bb49fde57b342663e7feb26 
bin/cpanel_json_xs
@@ -64,7 +64,7 @@
 SHA256 5652b89a3a7545b92669c55949221cb5b8d5a5a9cbe47e32db3996f5a800da87 
t/16_tied.t
 SHA256 a5afaae43c7a21c80f17020b7bfd2d164777499bb940f2482f9167d9a0cf9b54 
t/17_relaxed.t
 SHA256 1585a6aecec5c73b7a6f70982b3bcc1edc1d63ca55467223ab0d6f0956254bc4 
t/18_json_checker.t
-SHA256 41ed4f365dbdf9317f8548e05315194f1006a8a63cdc9374ccd43bc1c1700896 
t/19_incr.t
+SHA256 9f9006c1f925d9ace7d1621e1479c21f9b50459ab57aa0046209fed2b3e66530 
t/19_incr.t
 SHA256 dde73ed3cfc0e28d064f61fc08871accf88b780aee06a3cb0040f59f04c1ff36 
t/20_faihu.t
 SHA256 0028cd6f4b5c98721533a12eed58d0701483fb7639e719427c03fa5cd48a46ee 
t/20_unknown.t
 SHA256 388f8e0f0e41c9921aedc67313f8b89bdd08b95ced0dba242986d3b76d9a1688 
t/21_evans.t
@@ -77,7 +77,7 @@
 SHA256 f31d07044b924b28a1329f9eac213ad903ec4b8bb6eda095a609cb8c87870439 
t/31_bom.t
 SHA256 59c743137453c8c4e9e785a15dcd057b0209d5ce160d683d7ab416dc37a92b6d 
t/52_object.t
 SHA256 3b9ce402e2d0cae8a525df4beca05f2656ba5cf02b074d02fd690fe97773d2d7 
t/53_readonly.t
-SHA256 ffcf7776d107842cf7af2e938865a62e59f0e70e202b74914aa705777e39b4f4 
t/54_stringify.t
+SHA256 949e22de3e54ca7624cea2610a26c0b4697040ea5113fdca3b77564d90f82e24 
t/54_stringify.t
 SHA256 f542b8cfd2bee5ab9ae92dd042e3bbf68a968ae959d0eeada43cd5cd53c8337a 
t/55_modifiable.t
 SHA256 4b9df64d243621ccf44f7abb04067a0a0f268105382e92797089106fa77c84a6 
t/96_interop.t
 SHA256 f720857c5fb03c62aab4765610ab05326e5139505f823400605abaebedffeb32 
t/96_interop_pp.t
@@ -437,12 +437,12 @@
 SHA256 aca6f846869ab2e4881e807739086e1535b1438bd0e23d7a021360742736a6a9 
xt/pod.t
 -----BEGIN PGP SIGNATURE-----
 
-iQEzBAEBCgAdFiEEKJWogdNCcPq/6PdHtPYzOeZdZBQFAlxmj9EACgkQtPYzOeZd
-ZBRqnwf7B5jRgiv04q3+bVuH3MLlfIOf6JOU0/ilSjuZJw/6/xesPq7HdNCxbpRW
-pqBa7fQ0ak/dkFpImIVIVVdJbsTO9Ye5T5jExHZ/PTJHMmnI4GD1yUnbFZrl+enO
-tdhWV91564kpGqMeDM55IKBs4VBVpL0VTF0oNlN/kgBCbDdkwrE7nuIpcqiLEFE9
-rS4vYbTKj6JpoiDnTdKrJCax82cteY7NW1CSvYgbl74KrWsWuAfe2WX1VqmUCUzP
-uCTV7Fr/wZybTbpfH6XFr4G4V7gw25DOyR9FNYUYPWl/irleEYTlDBxb96xDLiD4
-dPwtVrVX9xX6wRXYpjt07MAyrRkMsw==
-=BMPR
+iQEzBAEBCgAdFiEEKJWogdNCcPq/6PdHtPYzOeZdZBQFAlyPTXIACgkQtPYzOeZd
+ZBQ2Awf/ZxPvzIhafA9258hDm/ocKiMtJqrmqOkkVpYCfi5537XYWwj0zgkWHdva
+Pi/ADvePTy8nPRGb/Ko9tiZS/bku6RQ7dQbWuZqjCHYOOO5GC9WZSTFFingxSkRU
+x2HE5GtfKWEqQ7n2PYNr+fFxXxa2Nvu3yAsCdr+1mVu0wu012kmee4wVm8AcrLLU
+8CjV1gEPAlvNVUEeG9FF4MlfyrynETnzVgE2E5a5wUxFubZTL/tQ8qeWaOdmmoRf
+hDR3xgtB3n5k9yZ2QfMz4S/IjjEo+FX9+pehqwcm3jlh6qEplJbrR/xkyyF9SGae
+TatfnmOPFtqvq5bGcGowHVBECOe3Ww==
+=L7NV
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/XS.pm 
new/Cpanel-JSON-XS-4.10/XS.pm
--- old/Cpanel-JSON-XS-4.09/XS.pm       2019-02-15 11:08:46.000000000 +0100
+++ new/Cpanel-JSON-XS-4.10/XS.pm       2019-03-10 12:01:16.000000000 +0100
@@ -1,5 +1,5 @@
 package Cpanel::JSON::XS;
-our $VERSION = '4.09';
+our $VERSION = '4.10';
 our $XS_VERSION = $VERSION;
 # $VERSION = eval $VERSION;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/XS.xs 
new/Cpanel-JSON-XS-4.10/XS.xs
--- old/Cpanel-JSON-XS-4.09/XS.xs       2019-02-15 11:08:46.000000000 +0100
+++ new/Cpanel-JSON-XS-4.10/XS.xs       2019-03-18 08:35:37.000000000 +0100
@@ -1467,10 +1467,7 @@
     if (isref != 1)
       encode_ch (aTHX_ enc, '"');
   }
-  if (pv) SvREFCNT_dec(pv);
-
 #undef MyAMG
-
 }
 
 INLINE int
@@ -4360,28 +4357,31 @@
 
 SV *incr_text (JSON *self)
     ATTRS: lvalue
-    CODE:
+    PPCODE:
 {
+        PERL_UNUSED_VAR(RETVAL);
         if (UNLIKELY(self->incr_pos))
-          croak ("incr_text can not be called when the incremental parser 
already started parsing");
-
-        RETVAL = self->incr_text ? SvREFCNT_inc (self->incr_text) : 
&PL_sv_undef;
+          {
+            /* We might want to return a copy of the rest.
+               But incr_parse already chops the start at the end, so this can
+               only happen on concurrent accesses to incr_parse */
+            croak ("incr_text can not be called when the incremental parser 
already started parsing");
+          }
+        ST(0) = self->incr_text ? self->incr_text : &PL_sv_undef;
+        XSRETURN(1);
 }
-    OUTPUT:
-        RETVAL
 
 #else
 
 SV *incr_text (JSON *self)
-    CODE:
+    PPCODE:
 {
         if (UNLIKELY(self->incr_pos))
           croak ("incr_text can not be called when the incremental parser 
already started parsing");
 
-        RETVAL = self->incr_text ? SvREFCNT_inc (self->incr_text) : 
&PL_sv_undef;
+        ST(0) = self->incr_text ? self->incr_text : &PL_sv_undef;
+        XSRETURN(1);
 }
-       OUTPUT:
-        RETVAL
 
 #endif
 
@@ -4400,8 +4400,11 @@
 void incr_reset (JSON *self)
        CODE:
 {
-       SvREFCNT_dec (self->incr_text);
-        self->incr_text = 0;
+        if (self->incr_text)
+          {
+            SvREFCNT_dec (self->incr_text);
+          }
+        self->incr_text = NULL;
         self->incr_pos  = 0;
         self->incr_nest = 0;
         self->incr_mode = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/t/19_incr.t 
new/Cpanel-JSON-XS-4.10/t/19_incr.t
--- old/Cpanel-JSON-XS-4.09/t/19_incr.t 2018-01-30 14:18:43.000000000 +0100
+++ new/Cpanel-JSON-XS-4.10/t/19_incr.t 2019-03-10 11:51:13.000000000 +0100
@@ -2,7 +2,7 @@
 
 use strict;
 no warnings;
-use Test::More $] < 5.008 ? (tests => 39) : (tests => 697);
+use Test::More $] < 5.008 ? (tests => 39) : (tests => 702);
 
 use Cpanel::JSON::XS;
 
@@ -95,4 +95,18 @@
    is_deeply (eval { $coder->incr_parse("[42]") }, [42], "valid data after 
incr_skip");
 }
 
-
+# GH 123
+{
+   my $text = '[1][5]';
+   my $coder = new Cpanel::JSON::XS;
+   $coder->incr_parse ($text);
+   $coder->incr_text;
+   is ($@, '', 'incr_text allowed after incr_parse init');
+   ok (eval { $coder->incr_parse }, "incr_parse2");
+   # here incr_text might be at incr_pos 3 or chopped
+   $coder->incr_reset;
+   $coder->incr_text;
+   is ($@, '', 'incr_text is allowed after incr_reset');
+   is (encode_json($coder->incr_parse($text)), '[1]', "incr_parse1");
+   is (encode_json($coder->incr_parse), '[5]', "incr_parse2");
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cpanel-JSON-XS-4.09/t/54_stringify.t 
new/Cpanel-JSON-XS-4.10/t/54_stringify.t
--- old/Cpanel-JSON-XS-4.09/t/54_stringify.t    2015-12-02 17:26:16.000000000 
+0100
+++ new/Cpanel-JSON-XS-4.10/t/54_stringify.t    2019-03-18 08:43:45.000000000 
+0100
@@ -13,7 +13,7 @@
   $ENV{PERL_JSON_BACKEND} = 'JSON::PP';
 }
 use Time::Piece;
-plan $] < 5.008 ? (skip_all => "5.6 no AMG yet") : (tests => 17);
+plan $] < 5.008 ? (skip_all => "5.6 no AMG yet") : (tests => 18);
 use JSON ();
 use Cpanel::JSON::XS;
 
@@ -76,3 +76,10 @@
 is( $json->encode( {false => \""} ),     '{"false":null}' );
 is( $json->encode( {false => \!!""} ),   '{"false":null}' );
 
+# GH #124 missing refcnt on stringify result
+package BoolTestOk;
+use overload '""' => sub {"1"};
+package main;
+my $data = {nick => bless({}, 'BoolTestOk')};
+is( $json->convert_blessed->allow_blessed->encode($data), '{"nick":"1"}' );
+


Reply via email to