ports/131609: Crash on import py-xmlrpc in python 2.5

Andriy Pylypenko bamby at sippysoft.com
Thu Feb 12 15:00:16 UTC 2009


>Number:         131609
>Category:       ports
>Synopsis:       Crash on import py-xmlrpc in python 2.5
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 12 15:00:15 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Andriy Pylypenko
>Release:        FreeBSD 6.x, 7.x
>Organization:
Sippysoft Inc
>Environment:
Not machine specific
>Description:
There is a bug in the py-xmlrpc module which leads to crash of the interpreter. In the module the PyObject_NEW()/PyMem_DEL() are used while the PyObject_NEW()/PyObject_DEL() pair must be used. This bug is well known actually and very old. But the project looks to be abandoned so the fix has not been incorporated into the source code yet. Here is this bug report and fix at the project's tracker.

http://sourceforge.net/tracker/index.php?func=detail&aid=1734819&group_id=23992&atid=380301

>How-To-Repeat:
Install the module under Python 2.5 or higher and try to import it.
>Fix:
PyMem_DEL() calls must be replaced with PyObject_DEL() calls.

Patch attached with submission follows:

--- src/rpcBase64.c.orig	2003-04-21 18:39:15.000000000 +0300
+++ src/rpcBase64.c	2008-10-15 10:36:44.000000000 +0300
@@ -239,7 +239,7 @@
 	if (bp->value) {
 		Py_DECREF(bp->value);
 	}
-	PyMem_DEL(bp);
+	PyObject_DEL(bp);
 }
 
 
--- src/rpcClient.c.orig	2003-04-21 18:39:15.000000000 +0300
+++ src/rpcClient.c	2008-10-15 10:36:44.000000000 +0300
@@ -179,7 +179,7 @@
 	cp->url = NULL;
 	Py_DECREF(cp->src);
 	Py_DECREF(cp->disp);
-	PyMem_DEL(cp);
+	PyObject_DEL(cp);
 }
 
 
--- src/rpcDate.c.orig	2003-04-21 18:39:15.000000000 +0300
+++ src/rpcDate.c	2008-10-15 10:36:44.000000000 +0300
@@ -75,7 +75,7 @@
 	if (dp->value) {
 		Py_DECREF(dp->value);
 	}
-	PyMem_DEL(dp);
+	PyObject_DEL(dp);
 }
 
 
--- src/rpcDispatch.c.orig	2003-04-21 18:39:15.000000000 +0300
+++ src/rpcDispatch.c	2008-10-15 10:36:44.000000000 +0300
@@ -68,7 +68,7 @@
 		rpcDispClear(dp);
 		free(dp->srcs);
 	}
-	PyMem_DEL(dp);
+	PyObject_DEL(dp);
 }
 
 
--- src/rpcSource.c.orig	2003-04-21 18:39:15.000000000 +0300
+++ src/rpcSource.c	2008-10-15 10:36:44.000000000 +0300
@@ -61,7 +61,7 @@
 	if (srcp->onErr and srcp->onErrType == ONERR_TYPE_PY) {
 		Py_DECREF((PyObject *)srcp->onErr);
 	}
-	PyMem_DEL(srcp);
+	PyObject_DEL(srcp);
 }
 
 


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list