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

noreply@sourceforge.net noreply@sourceforge.net
Sun, 13 Aug 2000 21:13:43 -0700


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

Project: Python
Category: Core
Status: Open
Resolution: None
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

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