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 vstinner
Recipients vstinner
Date 2008-07-06.14:20:41
SpamBayes Score 0.0012112613
Marked as misclassified No
Message-id <1215354044.0.0.987178228996.issue3299@psf.upfronthosting.co.za>
In-reply-to
Content
"import re: re.finditer("a", {})" crash on Python 2.x (tested with svn 
trunk) because of an invalid use of PyObject_NEW/PyObject_DEL. The 
error is in pattern_scanner(), in block "if (!string) { ... }".
 - scanner_dealloc() calls Py_DECREF(self->pattern); whereas pattern 
attribute is not initialized
 - scanner_dealloc() calls PyObject_DEL(self); whereas 
scanner_dealloc() is already the destructor of self object!

I wrote a patch to fix these errors. Please review my patch, I don't 
know C API very well.

I also patched _compile(): replace PyObject_DEL() by Py_DECREF(). Is 
it really needed?
History
Date User Action Args
2008-07-06 14:20:44vstinnersetspambayes_score: 0.00121126 -> 0.0012112613
recipients: + vstinner
2008-07-06 14:20:44vstinnersetspambayes_score: 0.00121126 -> 0.00121126
messageid: <1215354044.0.0.987178228996.issue3299@psf.upfronthosting.co.za>
2008-07-06 14:20:42vstinnerlinkissue3299 messages
2008-07-06 14:20:42vstinnercreate