From: Dag Sverre Seljebotn Date: Wed, 3 Sep 2008 14:51:34 +0000 (+0200) Subject: Buffers: Fix a segfault (would only occur under exceptional circumstances) X-Git-Tag: 0.9.9.2.beta~95^2~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e871646101da1dcf20fa09cd21cb614edc27f88;p=cython.git Buffers: Fix a segfault (would only occur under exceptional circumstances) --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 7eb3ede8..b1d53b8c 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -913,6 +913,8 @@ class FuncDefNode(StatNode, BlockNode): for entry in lenv.var_entries: if entry.type.is_pyobject and entry.init_to_none and entry.used: code.put_init_var_to_py_none(entry) + # ----- Initialise local buffer auxiliary variables + for entry in lenv.var_entries + lenv.arg_entries: if entry.type.is_buffer and entry.buffer_aux.buffer_info_var.used: code.putln("%s.buf = NULL;" % entry.buffer_aux.buffer_info_var.cname) # ----- Check and convert arguments