[Python-modules-team] Bug#468975: patch attached, will NMU during the BSP

Thomas Viehmann tv at beamnet.de
Thu Mar 6 10:32:13 UTC 2008


tag 468975 patch pending
thanks

Hi Bernd,

attached is a patch that removes the crashing, observed by
   python -c "import ll.xist.sgmlop ; a =  
ll.xist.sgmlop.Element(None,'x') ; del a"
and similar.

It will be uploaded during the BSP next weekend or, with your OK,  
earlier.

Kind regards

T.
-- 
Thomas Viehmann, http://thomas.viehmann.net/
-------------- next part --------------
diff -u ll-xist-2.15.5/debian/changelog ll-xist-2.15.5/debian/changelog
--- ll-xist-2.15.5/debian/changelog
+++ ll-xist-2.15.5/debian/changelog
@@ -1,3 +1,12 @@
+ll-xist (2.15.5-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix python memory handling. Closes: #468975
+  * Move Homepage in debian/control.
+  * Bump standards to 3.7.3. (No changes)
+
+ -- Thomas Viehmann <tv at beamnet.de>  Thu, 05 Mar 2008 23:55:48 +0100
+
 ll-xist (2.15.5-1) unstable; urgency=low
 
   * Initial release (Closes: #336685)
diff -u ll-xist-2.15.5/debian/patches/00list ll-xist-2.15.5/debian/patches/00list
--- ll-xist-2.15.5/debian/patches/00list
+++ ll-xist-2.15.5/debian/patches/00list
@@ -2,0 +3 @@
+fix-sgmlop-memory-handling
diff -u ll-xist-2.15.5/debian/control ll-xist-2.15.5/debian/control
--- ll-xist-2.15.5/debian/control
+++ ll-xist-2.15.5/debian/control
@@ -5,9 +5,10 @@
 Uploaders: Bernd Zeimetz <bernd at bzed.de>
 Build-Depends: cdbs (>= 0.4.45), debhelper (>= 5), python-all-dev (>= 2.4.4-3),
  python-support (>= 0.6.4), docbook-to-man, dpatch
-Standards-Version: 3.7.2
+Standards-Version: 3.7.3
 XS-Vcs-Svn: svn://svn.debian.org/python-modules/packages/ll-xist/trunk/
 XS-Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/ll-xist/?op=log
+Homepage: http://www.livinglogic.de/Python/xist/index.html
 
 Package: python-ll-xist
 Architecture: any
@@ -37,2 +37,0 @@
- .
-  Homepage: http://www.livinglogic.de/Python/xist/index.html
only in patch2:
unchanged:
--- ll-xist-2.15.5.orig/debian/patches/fix-sgmlop-memory-handling.dpatch
+++ ll-xist-2.15.5/debian/patches/fix-sgmlop-memory-handling.dpatch
@@ -0,0 +1,64 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-sgmlop-memory-handling.dpatch by Thomas Viehmann <tv at beamnet.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fixes PyObject vs. PyMem memory handling
+
+ at DPATCH@
+
+--- ll-xist-2.15.5/src/ll/xist/sgmlop.c.orig
++++ ll-xist-2.15.5/src/ll/xist/sgmlop.c
+@@ -171,7 +171,7 @@
+ {
+     FastSGMLParserObject* self;
+ 
+-    self = PyObject_NEW(FastSGMLParserObject, &FastSGMLParser_Type);
++    self = PyObject_New(FastSGMLParserObject, &FastSGMLParser_Type);
+     if (self == NULL)
+         return NULL;
+ 
+@@ -243,7 +243,7 @@
+     Py_XDECREF(self->handle_data);
+     Py_XDECREF(self->handle_cdata);
+     Py_XDECREF(self->handle_comment);
+-    PyObject_DEL(self);
++    PyObject_Del(self);
+ }
+ 
+ #define GETCB(member, name)\
+@@ -466,7 +466,7 @@
+         return NULL;
+     }
+ 
+-    self = PyObject_NEW(ElementObject, &Element_Type);
++    self = PyObject_New(ElementObject, &Element_Type);
+     if (self == NULL)
+         return NULL;
+ 
+@@ -520,7 +520,7 @@
+ 
+     RELEASE(sizeof(ElementObject), "destroy element");
+ 
+-    PyMem_DEL(self);
++    PyObject_Del(self);
+ }
+ 
+ /* -------------------------------------------------------------------- */
+@@ -779,7 +779,7 @@
+     if (!PyArg_NoArgs(args))
+         return NULL;
+ 
+-    self = PyObject_NEW(TreeBuilderObject, &TreeBuilder_Type);
++    self = PyObject_New(TreeBuilderObject, &TreeBuilder_Type);
+     if (self == NULL)
+         return NULL;
+ 
+@@ -800,7 +800,7 @@
+     Py_XDECREF(self->last);
+     Py_XDECREF(self->this);
+     Py_DECREF(self->root);
+-    PyMem_DEL(self);
++    PyObject_Del(self);
+ }
+ 
+ /* -------------------------------------------------------------------- */


More information about the Python-modules-team mailing list