Skip to content

[3.7] bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276)#12331

Merged
vstinner merged 1 commit intopython:3.7from
vstinner:dtoa_goto_bfree37
Mar 14, 2019
Merged

[3.7] bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276)#12331
vstinner merged 1 commit intopython:3.7from
vstinner:dtoa_goto_bfree37

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Mar 14, 2019

Fix an unlikely memory leak on conversion from string to float in the
function _Py_dg_strtod() used by float(str), complex(str),
pickle.load(), marshal.load(), etc.

Fix an unlikely memory leak in _Py_dg_strtod() on "undfl:" label:
rewrite memory management in this function to always release all
memory before exiting the function. Initialize variables to NULL, and
set them to NULL after calling Bfree() at the "cont:" label.

Note: Bfree(NULL) is well defined: it does nothing.
(cherry picked from commit 9776b06)

https://bugs.python.org/issue36262

Fix an unlikely memory leak on conversion from string to float in the
function _Py_dg_strtod() used by float(str), complex(str),
pickle.load(), marshal.load(), etc.

Fix an unlikely memory leak in _Py_dg_strtod() on "undfl:" label:
rewrite memory management in this function to always release all
memory before exiting the function. Initialize variables to NULL, and
set them to NULL after calling Bfree() at the "cont:" label.

Note: Bfree(NULL) is well defined: it does nothing.
(cherry picked from commit 9776b06)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants