[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman
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

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman
Changes by Brian Coleman : -- pull_requests: +312 ___ Python tracker <http://bugs.python.org/issue29683> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman
Brian Coleman added the comment: I have now added a Github pull request here: https://github.com/python/cpython/pull/376 -- ___ Python tracker <http://bugs.python.org/issue29

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-02 Thread Brian Coleman
Changes by Brian Coleman : -- pull_requests: +333 ___ Python tracker <http://bugs.python.org/issue29683> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-02 Thread Brian Coleman
Brian Coleman added the comment: I have created a pull request to backport the fix onto 3.6 here: https://github.com/python/cpython/pull/402 -- ___ Python tracker <http://bugs.python.org/issue29