Closed 84401114-8e59-4056-83cb-632106c0b648 closed 15 years ago
When a nan or inf is generated in PyFloat_FromString(), a temporary buffer may be left behind. Patch attached. Found using Purify
Does this also apply to 2.6?
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.
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!
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = 'https://github.com/mdickinson' closed_at =
created_at =
labels = ['interpreter-core', 'easy', 'performance']
title = 'memory leak in floatobject.c'
updated_at =
user = 'https://github.com/kristjanvalur'
```
bugs.python.org fields:
```python
activity =
actor = 'mark.dickinson'
assignee = 'mark.dickinson'
closed = True
closed_date =
closer = 'mark.dickinson'
components = ['Interpreter Core']
creation =
creator = 'kristjan.jonsson'
dependencies = []
files = ['10901']
hgrepos = []
issue_num = 3369
keywords = ['patch', 'easy']
message_count = 4.0
messages = ['69721', '69725', '69830', '70126']
nosy_count = 3.0
nosy_names = ['brett.cannon', 'mark.dickinson', 'kristjan.jonsson']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'resource usage'
url = 'https://bugs.python.org/issue3369'
versions = ['Python 3.0']
```