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 <rep...@bugs.python.org>
<http://bugs.python.org/issue29683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to