This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dominic.lavoie
Recipients dominic.lavoie
Date 2008-07-09.16:48:49
SpamBayes Score 0.01304663
Marked as misclassified No
Message-id <1215622132.38.0.408050175684.issue3328@psf.upfronthosting.co.za>
In-reply-to
Content
This issue is similar to issue 1229429. In the called Python method, a 
regular expression fails to compile & PyEval_CallMethod() returns 0. 
However, the reference count is incremented by 1 which prevents the 
object from being destroyed.

Could the problem be in classobject.c, in instancemethod_call() ?

		if (newarg == NULL)
			return NULL;
		Py_INCREF(self);
		PyTuple_SET_ITEM(newarg, 0, self);
		for (i = 0; i < argcount; i++) {
			PyObject *v = PyTuple_GET_ITEM(arg, i);
			Py_XINCREF(v);
			PyTuple_SET_ITEM(newarg, i+1, v);
		}
		arg = newarg;
	}
	result = PyObject_Call((PyObject *)func, arg, kw);
	Py_DECREF(arg);
	return result;
}

If result is null, should Py_DECREF(self) be called in the case where 
self was non-null ?
History
Date User Action Args
2008-07-09 16:48:52dominic.lavoiesetspambayes_score: 0.0130466 -> 0.01304663
recipients: + dominic.lavoie
2008-07-09 16:48:52dominic.lavoiesetspambayes_score: 0.0130466 -> 0.0130466
messageid: <1215622132.38.0.408050175684.issue3328@psf.upfronthosting.co.za>
2008-07-09 16:48:51dominic.lavoielinkissue3328 messages
2008-07-09 16:48:49dominic.lavoiecreate