[Python-bugs-list] [Bug #116405] Bug in buffer interface

noreply@sourceforge.net noreply@sourceforge.net
Mon, 9 Oct 2000 05:48:37 -0700


Bug #116405, was updated on 2000-Oct-09 02:25
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Closed
Resolution: Invalid
Bug Group: Not a Bug
Priority: 5
Summary: Bug in buffer interface

Details: Consider the following code:

PyObject *base = PyBuffer_New(100);
PyObject *buffer = PyBuffer_FromObject(base);
Py_DECREF(base);

After this code is executed,
buffer points to deallocated memory (because
buffer does not hold a reference to base anymore).


Follow-Ups:

Date: 2000-Oct-09 05:48
By: gvanrossum

Comment:
Do you know the old joke that begins with "Doctor, it hurts if I do this..." ?

That code is broken.
-------------------------------------------------------

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