Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue2784] fast builtin sum may leak

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

May 7, 2008, 12:45 PM

Post #1 of 4 (313 views)
Permalink
[issue2784] fast builtin sum may leak

New submission from Jean Brouwers <MrJean1 [at] Gmail>:

The new, fast builtin sum implementation may cause a memory leak in the
float loop. Both lines

PyFPE_START_PROTECT("add", return 0)

should be changed to

PyFPE_START_PROTECT("add", Py_DECREF(item); Py_DECREF(iter); return
0)

The attached file bltinmodule1.c.diff contain a patch to that extent.

/Jean Brouwers

----------
components: Interpreter Core
files: bltinmodule1.c.diff
keywords: patch
messages: 66368
nosy: MrJean1
severity: normal
status: open
title: fast builtin sum may leak
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10209/bltinmodule1.c.diff

__________________________________
Tracker <report [at] bugs>
<http://bugs.python.org/issue2784>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 7, 2008, 1:29 PM

Post #2 of 4 (301 views)
Permalink
[issue2784] fast builtin sum may leak [In reply to]

Jean Brouwers <MrJean1 [at] Gmail> added the comment:

There is one other, similar issue in the Modules/imgfile.c file. Line 327
is

PyFPE_START_PROTECT("readscaled", return 0)

and should probably be

PyFPE_START_PROTECT("readscaled", iclose(image); return 0)

/Jean Brouwers

__________________________________
Tracker <report [at] bugs>
<http://bugs.python.org/issue2784>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 7, 2008, 7:14 PM

Post #3 of 4 (300 views)
Permalink
[issue2784] fast builtin sum may leak [In reply to]

Changes by Raymond Hettinger <rhettinger [at] users>:


----------
assignee: -> rhettinger
nosy: +rhettinger

__________________________________
Tracker <report [at] bugs>
<http://bugs.python.org/issue2784>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2008, 10:54 PM

Post #4 of 4 (290 views)
Permalink
[issue2784] fast builtin sum may leak [In reply to]

Changes by Raymond Hettinger <rhettinger [at] users>:


----------
priority: -> high

__________________________________
Tracker <report [at] bugs>
<http://bugs.python.org/issue2784>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.