Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2009 14:56:19 GMT
From:      Andriy Pylypenko <bamby@sippysoft.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/131609: Crash on import py-xmlrpc in python 2.5
Message-ID:  <200902121456.n1CEuJ3F032071@www.freebsd.org>
Resent-Message-ID: <200902121500.n1CF0Ggf055948@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902121456.n1CEuJ3F032071>