Issue 2784: fast builtin sum may leak (original) (raw)

Created on 2008-05-07 19:45 by MrJean1, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bltinmodule1.c.diff MrJean1,2008-05-07 19:45
Messages (3)
msg66368 - (view) Author: Jean Brouwers (MrJean1) Date: 2008-05-07 19:45
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
msg66374 - (view) Author: Jean Brouwers (MrJean1) Date: 2008-05-07 20:29
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
msg67521 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-05-30 06:37
Fixed in r63805.
History
Date User Action Args
2022-04-11 14:56:34 admin set github: 47033
2008-05-30 06:37:49 rhettinger set status: open -> closedresolution: fixedmessages: +
2008-05-09 05:54:12 rhettinger set priority: high
2008-05-08 02:14:28 rhettinger set assignee: rhettingernosy: + rhettinger
2008-05-07 20:29:07 MrJean1 set messages: +
2008-05-07 19:45:38 MrJean1 create