[New-bugs-announce] [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

Brian Coleman report at bugs.python.org
Wed Mar 1 03:52:12 EST 2017


New submission from Brian Coleman:

On PyMem_Malloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0.
On PyMem_Realloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0.
On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in co_extra->ce_extras to NULL.

I will add a GitHub PR for this shortly.

----------
components: Interpreter Core
messages: 288745
nosy: brianfcoleman
priority: normal
severity: normal
status: open
title: _PyCode_SetExtra behaviour wrong on allocation failure and after realloc
type: resource usage
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29683>
_______________________________________


More information about the New-bugs-announce mailing list