[issue730473] Add Py_AtInit() startup hook for extenders

2012-06-16 Thread Patrick Miller

Patrick Miller  added the comment:

Just languishing for lo on these 5 years

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue730473>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue730473] Add Py_AtInit() startup hook for extenders

2009-05-12 Thread Patrick Miller

Patrick Miller  added the comment:

Thanks... I'll submit patches for 2.6, 2.7, and 3.2

On Tue, May 12, 2009 at 2:07 PM, Daniel Diniz  wrote:
>
> Changes by Daniel Diniz :
>
>
> --
> stage:  -> test needed
> versions: +Python 2.7, Python 3.2 -Python 2.6
>
> ___
> Python tracker 
> <http://bugs.python.org/issue730473>
> ___
>

--

___
Python tracker 
<http://bugs.python.org/issue730473>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

New submission from Patrick Miller:

There is a reference counting error in PyFloat_AsDouble.

When the function calls the nb_float conversion, if the method does not return 
an actual float object, an exception is set, but the object is not collected.

--- Objects/floatobject.c   2014-10-08 04:18:15.0 -0400
+++ Objects/floatobject.c.patched   2015-03-05 09:17:15.171455648 -0500
@@ -214,6 +214,7 @@
 if (fo == NULL)
 return -1;
 if (!PyFloat_Check(fo)) {
+Py_DECREF(fo);
 PyErr_SetString(PyExc_TypeError,
 "nb_float should return float object");
 return -1;

--
components: Interpreter Core
files: floatobject.c-patch
messages: 237266
nosy: Patrick Miller
priority: normal
severity: normal
status: open
title: Potential leak in PyFloat_AsDouble.  Refcount error.
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file38342/floatobject.c-patch

___
Python tracker 
<http://bugs.python.org/issue23590>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

Patrick Miller added the comment:

Here's a simple recreator... It returns a 100-meg string instead of a float.  
The memory is leaked each time through the loop

--
Added file: http://bugs.python.org/file38343/recreate.tar

___
Python tracker 
<http://bugs.python.org/issue23590>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

Patrick Miller added the comment:

Shout out to amaury for a much simpler recreator :-)

Checked to see if the int conversion suffered the same problem... it does not 
as it is structured somewhat differently.  Note that it DOES do the proper 
DECREF (missing in PyFloat_AsDouble).


result = nb->nb_int(integral);
if (!result || PyLong_CheckExact(result))
return (PyLongObject *)result;
if (!PyLong_Check(result)) {
PyErr_Format(PyExc_TypeError,
 "__int__ returned non-int (type %.200s)",
 result->ob_type->tp_name);
Py_DECREF(result);
return NULL;
}

--

___
Python tracker 
<http://bugs.python.org/issue23590>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

Patrick Miller added the comment:

This is also in the 2.7.x branch.  Same patch.

--

___
Python tracker 
<http://bugs.python.org/issue23590>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com