Hello community,

here is the log from the commit of package python-python-rapidjson for 
openSUSE:Factory checked in at 2019-07-22 17:20:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-rapidjson (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-rapidjson.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-rapidjson"

Mon Jul 22 17:20:08 2019 rev:3 rq:717592 version:0.7.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-rapidjson/python-python-rapidjson.changes
  2019-06-21 09:58:35.824680998 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-rapidjson.new.4126/python-python-rapidjson.changes
        2019-07-22 17:20:11.137897830 +0200
@@ -1,0 +2,6 @@
+Mon Jul 22 13:14:40 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.7.2:
+  * Hopefully fix the memory leak when loading from a stream (issue #117)
+
+-------------------------------------------------------------------

Old:
----
  python-rapidjson-0.7.1.tar.gz

New:
----
  python-rapidjson-0.7.2.tar.gz

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

Other differences:
------------------
++++++ python-python-rapidjson.spec ++++++
--- /var/tmp/diff_new_pack.BbV4RE/_old  2019-07-22 17:20:11.877897629 +0200
+++ /var/tmp/diff_new_pack.BbV4RE/_new  2019-07-22 17:20:11.881897627 +0200
@@ -19,7 +19,7 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-python-rapidjson
-Version:        0.7.1
+Version:        0.7.2
 Release:        0
 Summary:        Python wrapper around rapidjson
 License:        MIT
@@ -55,7 +55,7 @@
 
 %check
 export LANG=en_US.UTF-8
-%python_expand PYTHONPATH=%{buildroot}%{python_sitearch} 
py.test-%{$python_bin_suffix} -v tests
+%pytest_arch tests
 
 %files %{python_files}
 %doc CHANGE* README*

++++++ python-rapidjson-0.7.1.tar.gz -> python-rapidjson-0.7.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rapidjson-0.7.1/CHANGES.rst 
new/python-rapidjson-0.7.2/CHANGES.rst
--- old/python-rapidjson-0.7.1/CHANGES.rst      2019-05-11 09:49:10.000000000 
+0200
+++ new/python-rapidjson-0.7.2/CHANGES.rst      2019-06-09 11:15:04.000000000 
+0200
@@ -1,6 +1,14 @@
 Changes
 -------
 
+0.7.2 (2019-06-09)
+~~~~~~~~~~~~~~~~~~
+
+* Hopefully fix the memory leak when loading from a stream (`issue #117`__)
+
+  __ https://github.com/python-rapidjson/python-rapidjson/issues/117
+
+
 0.7.1 (2019-05-11)
 ~~~~~~~~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rapidjson-0.7.1/rapidjson.cpp 
new/python-rapidjson-0.7.2/rapidjson.cpp
--- old/python-rapidjson-0.7.1/rapidjson.cpp    2019-05-11 09:49:10.000000000 
+0200
+++ new/python-rapidjson-0.7.2/rapidjson.cpp    2019-06-09 11:15:04.000000000 
+0200
@@ -641,13 +641,24 @@
     bool Key(const char* str, SizeType length, bool copy) {
         HandlerContext& current = stack.back();
 
+        // This happens when operating in stream mode and kParseInsituFlag is 
not set: we
+        // must copy the incoming string in the context, and destroy the 
duplicate when
+        // the context gets reused for the next dictionary key
+
+        if (current.key && current.copiedKey) {
+            free((void*) current.key);
+            current.key = NULL;
+        }
+
         if (copy) {
             char* copied_str = (char*) malloc(length+1);
             if (copied_str == NULL)
                 return false;
             memcpy(copied_str, str, length+1);
             str = copied_str;
+            assert(!current.key);
         }
+
         current.key = str;
         current.keyLength = length;
         current.copiedKey = copy;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rapidjson-0.7.1/version.txt 
new/python-rapidjson-0.7.2/version.txt
--- old/python-rapidjson-0.7.1/version.txt      2019-05-11 09:49:10.000000000 
+0200
+++ new/python-rapidjson-0.7.2/version.txt      2019-06-09 11:15:04.000000000 
+0200
@@ -1 +1 @@
-0.7.1
\ No newline at end of file
+0.7.2
\ No newline at end of file


Reply via email to