[Python-bugs-list] [Bug #110638] Invalid use of PyMem_DEL (PR#295)

noreply@sourceforge.net noreply@sourceforge.net
Wed, 16 Aug 2000 17:25:01 -0700


Bug #110638, was updated on 2000-Jul-31 21:09
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 6
Summary: Invalid use of PyMem_DEL (PR#295)

Details: Jitterbug-Id: 295
Submitted-By: niels@endea.demon.nl
Date: Thu, 13 Apr 2000 14:16:25 -0400 (EDT)
Version: 1.5.2 and 1.6.a2
OS: Win95 and Linux



Hi,

I ran into a bug while running a regrtest on 1.6a2 with debugging on.
This produced a reference checking problem, which I now see is the same as
reported in #113. I have tracked this down to the use of PyMem_DEL on an
object created by PyObject_NEW in PyPcre_compile. When the compile fails,
the new object is deallocated, but not removed from the reference chain.
This also happens in 1.5.2.

With a little grepping, I tracked down a few instances of this
problem:
 pcremodule.c:PyPcre_compile
 unicodeobject.c:_PyUnicode_New
 socketmodule.c:newSSLObject
 threadmodule.c:newlockobject

In each case a partially constructed, but already registered object is
simply deleted without calling _Py_ForgetReference.



====================================================================
Audit trail:
Tue Jul 11 08:29:17 2000	guido	moved from incoming to open

Follow-Ups:

Date: 2000-Aug-17 00:25
By: akuchling

Comment:
Fixed in revision 2.16 of Modules/pypcre.c .
The other reported bugs also seem to be fixed in the CVS tree at this time.  

Thanks for your bug report!
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110638&group_id=5470