[Python-bugs-list] [ python-Bugs-606495 ] malloc called directly
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 08 Sep 2002 16:55:03 -0700
Bugs item #606495, was opened at 2002-09-08 18:55
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=606495&group_id=5470
Category: None
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Ellmore (stevenellmore)
Assigned to: Nobody/Anonymous (nobody)
Summary: malloc called directly
Initial Comment:
At least the following files use malloc directly instead of
PyCore_MALLOC_FUNC (defined in pymem.h):
_sre.c
classobject.c
compile.c
There are many others too, but I'm working from a
stripped down codebase.
The Mac version is the worst offender.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2002-09-08 19:55
Message:
Logged In: YES
user_id=31435
Why do you think this is a bug? There's no rule against
calling malloc(), other than if you do, you must call free()
instead of one of the PyMem or PyObject free functions.
Note that PyCore_MALLOC_FUNC doesn't exist in the
current CVS source -- we purged a lot of unused complexity
in those macro layers for 2.3.
----------------------------------------------------------------------
Comment By: Steven Ellmore (stevenellmore)
Date: 2002-09-08 19:27
Message:
Logged In: YES
user_id=608086
Followup:
Oops...I think the correct solution is to have them use
PyMem_MALLOC and NOT PyCore_MALLOC_FUNC.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=606495&group_id=5470