Commit d8dbd760 authored by Stefan Behnel's avatar Stefan Behnel

Fix a crash regression in 0.29.8 due to missing error handling when creating code objects fails.

parent d81d4326
......@@ -2,6 +2,15 @@
Cython Changelog
================
0.29.9 (2019-05-29)
===================
Bugs fixed
----------
* Fix a crash regression in 0.29.8 when creating code objects fails.
0.29.8 (2019-05-28)
===================
......
# cython.* namespace for pure mode.
from __future__ import absolute_import
__version__ = "0.29.8"
__version__ = "0.29.9"
try:
from __builtin__ import basestring
......
......@@ -296,12 +296,15 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha
#if PY_MAJOR_VERSION >= 3
py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
// make CPython use a fresh dict for "f_locals" at need (see GH #1836)
if (likely(py_code)) {
py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
}
#else
py_funcname = PyString_FromString(funcname);
if (unlikely(!py_funcname)) goto bad;
py_srcfile = PyString_FromString(srcfile);
if (unlikely(!py_srcfile)) goto bad;
py_code = PyCode_New(
0, /*int argcount,*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment