This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: memory leak in floatobject.c
Type: resource usage Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mark.dickinson Nosy List: brett.cannon, kristjan.jonsson, mark.dickinson
Priority: normal Keywords: easy, patch

Created on 2008-07-15 21:42 by kristjan.jonsson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tmp4.patch kristjan.jonsson, 2008-07-15 21:42 patch for issue
Messages (4)
msg69721 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2008-07-15 21:42
When a nan or inf is generated in PyFloat_FromString(), a temporary 
buffer may be left behind.
Patch attached.
Found using Purify
msg69725 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-07-15 22:38
Does this also apply to 2.6?
msg69830 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-07-16 20:53
> Does this also apply to 2.6?

Looks like it doesn't.  :-).

The patch needs to touch the newly arrived
comparison with "infinity", as well as the
"inf" and "nan" comparisons.
msg70126 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-07-21 22:52
Fixed in r65179.  I modified the patch slightly to include the "infinity" 
check, and to change "if(s_buffer)" to the slightly more explicit "if 
(s_buffer != NULL)".

Thanks!
History
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47619
2008-07-21 22:52:21mark.dickinsonsetstatus: open -> closed
resolution: fixed
messages: + msg70126
keywords: patch, patch, easy
2008-07-17 16:30:42mark.dickinsonsetkeywords: patch, patch, easy
assignee: mark.dickinson
2008-07-16 20:53:23mark.dickinsonsetkeywords: patch, patch, easy
messages: + msg69830
2008-07-15 22:38:38mark.dickinsonsetkeywords: patch, patch, easy
nosy: + mark.dickinson
messages: + msg69725
2008-07-15 22:33:43brett.cannonsetpriority: normal
keywords: patch, patch, easy
2008-07-15 22:25:57brett.cannonsetkeywords: patch, patch, easy
nosy: + brett.cannon
2008-07-15 21:42:37kristjan.jonssonsetkeywords: patch, patch, easy
type: resource usage
2008-07-15 21:42:25kristjan.jonssoncreate