Issue 10246: uu.encode fd leak if arguments are filenames (original) (raw)

Created on 2010-10-30 12:43 by bbrazil, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
uu_fd_leak.patch bbrazil,2010-10-30 12:43
uu_fd_leak_v2.patch bbrazil,2010-10-30 12:51
Messages (7)
msg119975 - (view) Author: Brian Brazil (bbrazil) * Date: 2010-10-30 12:43
Please see attached patch, I'm not sure if this is the cleanest way to fix this. This also fixes the resource warnings in the test.
msg119976 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-30 12:46
I think there should be a try..finally block so that those files get closed even when there's an error in-between.
msg119977 - (view) Author: Brian Brazil (bbrazil) * Date: 2010-10-30 12:51
How does v2 look?
msg119979 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-30 13:00
> How does v2 look? Nice, thank you!
msg119982 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-30 13:04
Committed in r85975 (3.2). I guess we'll do a big svnmerge to other branches later.
msg120072 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-10-31 17:56
On Sat, Oct 30, 2010 at 06:04, Antoine Pitrou <report@bugs.python.org> wrote: > > Antoine Pitrou <pitrou@free.fr> added the comment: > > Committed in r85975 (3.2). I guess we'll do a big svnmerge to other branches later. Or not at all. I honestly have not been worrying about backporting since these are minor changes that are more stylistic cleanup than fixes that have to get in. While it's good to be doing this for 3.2, I don't view it as critical enough to worry about backporting (although I have no issue if people do a backport).
msg120074 - (view) Author: Brian Brazil (bbrazil) * Date: 2010-10-31 18:02
The garbage collector should take care of the vast majority of these, it's only bugs in the C like issue 10253 that I'd worry about.
History
Date User Action Args
2022-04-11 14:57:08 admin set github: 54455
2010-10-31 18:02:09 bbrazil set messages: +
2010-10-31 17:56:37 brett.cannon set messages: +
2010-10-30 13:04:39 pitrou set status: open -> closedversions: + Python 3.2, - Python 3.3messages: + resolution: fixedstage: resolved
2010-10-30 13:00:40 pitrou set messages: +
2010-10-30 12:51:51 bbrazil set files: + uu_fd_leak_v2.patchmessages: +
2010-10-30 12:46:56 pitrou set nosy: + pitroumessages: +
2010-10-30 12:43:58 bbrazil create