On Mon, Jan 10, 2011 at 3:28 AM, mark florisson
<markflorisso...@gmail.com> wrote:
> Hello,
> There is a slight problem with the scope object in closures because it is
> not initialized to NULL in closure frames, it is instead initialized later
> by assigning a function argument to it. For the debugger this is a problem
> when execution of the debuggee is halted before this assignment happens,
> because there is no way to tell whether closed-over variables are valid or
> not. For e.g. the listing of local variables this is not a big issue, as
> this is entirely safe. But for code execution this means the debugger will
> have the debuggee try to put an invalid pointer in a dict in which the code
> will be executed, with a near 100% chance of segfaulting the debuggee.
> So the question is, could we simply initialize the scope objects to NULL?

I think that'd be a fine thing to do. Are there any code paths that
don't initialize this before its actually used (in which case the
initial assignment may get optimized away)?

- Robert
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to