tag 469010 patch pending
severity 469010 serious
thanks

Hi,

the bug exists, attached is a patch that removes the crashing observed e.g. with python -c "import zopyx.txng3.normalizer ; a = zopyx.txng3.normalizer.Normalizer((('en','en'),)) ; del a"

I have taken the liberty and fixed the dependencies to include actually include the shared libraries linked to.

It will be uploaded during the BSP next weekend or with your OK before that.

Kind regards

T.
--
Thomas Viehmann, http://thomas.viehmann.net/
diff -u zope-textindexng3-3.2.1/debian/changelog 
zope-textindexng3-3.2.1/debian/changelog
--- zope-textindexng3-3.2.1/debian/changelog
+++ zope-textindexng3-3.2.1/debian/changelog
@@ -1,3 +1,11 @@
+zope-textindexng3 (1:3.2.1-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix Python memory handling in C extensions. Closes: #469010
+  * Add missing ${shlibs:Depends} to zope-textindexng3-lib Depends.
+
+ -- Thomas Viehmann <[EMAIL PROTECTED]>  Thu, 05 Mar 2008 23:54:43 +0100
+
 zope-textindexng3 (1:3.2.1-1) unstable; urgency=low
 
   * Upload of TextIndexNG3.
diff -u zope-textindexng3-3.2.1/debian/control 
zope-textindexng3-3.2.1/debian/control
--- zope-textindexng3-3.2.1/debian/control
+++ zope-textindexng3-3.2.1/debian/control
@@ -24,7 +24,7 @@
 
 Package: zope-textindexng3-lib
 Architecture: any
-Depends: ${python:Depends}
+Depends: ${python:Depends}, ${shlibs:Depends}
 XB-Python-Version: ${python:Versions}
 Description: full text index for Zope objects
  TextIndexNG3 is the reimplementation of the well-known TextIndexNG product for
only in patch2:
unchanged:
--- 
zope-textindexng3-3.2.1.orig/extension_modules/zopyx/txng3/splitter/splitter.c
+++ zope-textindexng3-3.2.1/extension_modules/zopyx/txng3/splitter/splitter.c
@@ -149,7 +149,7 @@
 {
     hashtable_destroy(self->cache, 1);
     Py_XDECREF(self->list);
-    PyMem_DEL(self);
+    PyMem_Del(self);
 }
 
 
@@ -547,7 +547,7 @@
         return NULL;
     }
 
-    if (! (self = PyObject_NEW(Splitter, &SplitterType)))
+    if (! (self = PyObject_New(Splitter, &SplitterType)))
         return NULL;
 
     self->max_len            = max_len;
only in patch2:
unchanged:
--- 
zope-textindexng3-3.2.1.orig/extension_modules/zopyx/txng3/normalizer/normalizer.c
+++ 
zope-textindexng3-3.2.1/extension_modules/zopyx/txng3/normalizer/normalizer.c
@@ -21,7 +21,7 @@
 Normalizer_dealloc(Normalizer *self)
 {
     Py_DECREF(self->table);
-    PyMem_DEL(self);
+    PyMem_Del(self);
 }
 
 static PyObject *getTable(Normalizer *self,PyObject *word)
@@ -247,7 +247,7 @@
     if (! 
(PyArg_ParseTupleAndKeywords(args,keywds,"O|s",Normalizer_args,&table,&encoding)))
         return NULL;
 
-    if (! (self = PyObject_NEW(Normalizer, &NormalizerType)))
+    if (! (self = PyObject_New(Normalizer, &NormalizerType)))
         return NULL;
 
    if (! checkList(table))
only in patch2:
unchanged:
--- zope-textindexng3-3.2.1.orig/extension_modules/zopyx/txng3/stemmer/stemmer.c
+++ zope-textindexng3-3.2.1/extension_modules/zopyx/txng3/stemmer/stemmer.c
@@ -25,7 +25,7 @@
 Stemmer_dealloc (Stemmer * self)
 {
   sb_stemmer_delete (self->stemmer);
-  PyMem_DEL (self);
+  PyObject_Del (self);
 }
 
 
@@ -174,7 +174,7 @@
   if (!(PyArg_ParseTuple (args, "s", &language)))
        return NULL;
 
-  if (!(self = PyObject_NEW (Stemmer, &StemmerType)))
+  if (!(self = PyObject_New (Stemmer, &StemmerType)))
        return NULL;
 
   self->stemmer = sb_stemmer_new (language, "UTF_8");

Reply via email to