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

Mailing List Archive: Python: Bugs

[issue14761] Memleak in import.c load_source_module()

 

 

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


report at bugs

May 9, 2012, 1:45 AM

Post #1 of 6 (111 views)
Permalink
[issue14761] Memleak in import.c load_source_module()

New submission from Damien Cassou <damien.cassou [at] gmail>:

In load_source_module() function from import.c, it looks like Py_DECREF is not called where it should be. Please find attached a patch that fixes the leak.

This bug has been found using Coccinelle (http://coccinelle.lip6.fr/) using a semantic patch (similar to https://gist.github.com/2634899).

----------
components: Interpreter Core
files: fix_load_source_module_leak.patch
keywords: patch
messages: 160262
nosy: benjamin.peterson, cassou, lemburg, tim_one
priority: normal
severity: normal
status: open
title: Memleak in import.c load_source_module()
versions: Python 2.7
Added file: http://bugs.python.org/file25507/fix_load_source_module_leak.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14761>
_______________________________________
_______________________________________________
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 9, 2012, 1:47 AM

Post #2 of 6 (108 views)
Permalink
[issue14761] Memleak in import.c load_source_module() [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Is it 2.7-only?

----------
nosy: +brett.cannon, ncoghlan, pitrou
stage: -> patch review
type: -> resource usage

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14761>
_______________________________________
_______________________________________________
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 9, 2012, 1:51 AM

Post #3 of 6 (108 views)
Permalink
[issue14761] Memleak in import.c load_source_module() [In reply to]

Damien Cassou <damien.cassou [at] gmail> added the comment:

@pitrou I just checked Python-2.7.3 and the tip of the mercurial repository. It's not in the latter at least.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14761>
_______________________________________
_______________________________________________
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 9, 2012, 4:27 AM

Post #4 of 6 (102 views)
Permalink
[issue14761] Memleak in import.c load_source_module() [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset a775fc27f469 by Antoine Pitrou in branch '2.7':
Issue #14761: Fix potential leak on an error case in the import machinery.
http://hg.python.org/cpython/rev/a775fc27f469

----------
nosy: +python-dev

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14761>
_______________________________________
_______________________________________________
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 9, 2012, 4:30 AM

Post #5 of 6 (120 views)
Permalink
[issue14761] Memleak in import.c load_source_module() [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 9de4d85e4197 by Antoine Pitrou in branch '3.2':
Issue #14761: Fix potential leak on an error case in the import machinery.
http://hg.python.org/cpython/rev/9de4d85e4197

New changeset 840cb46d0395 by Antoine Pitrou in branch 'default':
Null merge for issue #14761.
http://hg.python.org/cpython/rev/840cb46d0395

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14761>
_______________________________________
_______________________________________________
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 9, 2012, 4:31 AM

Post #6 of 6 (102 views)
Permalink
[issue14761] Memleak in import.c load_source_module() [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Fixed, thank you!

----------
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.2

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14761>
_______________________________________
_______________________________________________
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.