[issue11660] closure with too few cells segfaults

2011-03-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Then the checking should be in your function. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue11660] closure with too few cells segfaults

2011-03-24 Thread Eric Snow
Eric Snow added the comment: It's a C function that for now I have in an extension module. If it turns out to be useful I am going to try to get it put into the builtins, but I don't want to get ahead of myself. -- Added file: http://bugs.python.org/file21380/unnamed _

[issue11660] closure with too few cells segfaults

2011-03-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/3/24 Eric Snow : > > Eric Snow added the comment: > > I'm hoping to "release" it this week.  Nick helped be a bunch with it during > pycon sprints.  I basically took call_function in ceval.c and got it working > for arbitrary code blocks and exposed it

[issue11660] closure with too few cells segfaults

2011-03-24 Thread Eric Snow
Eric Snow added the comment: I'm hoping to "release" it this week. Nick helped be a bunch with it during pycon sprints. I basically took call_function in ceval.c and got it working for arbitrary code blocks and exposed it as exec_closure to look like exec. On Thu, Mar 24, 2011 at 3:38 PM, Ben

[issue11660] closure with too few cells segfaults

2011-03-24 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue11660] closure with too few cells segfaults

2011-03-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: And the source of exec_closure is what exactly? -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue11660] closure with too few cells segfaults

2011-03-24 Thread Eric Snow
New submission from Eric Snow : While perhaps esoteric, it looks like exec'ing a code object that has freevars, using a closure that has too few cells causes a segfault. I believe the problem is around line 3276 of ceval.c at the PyTuple_GET_ITEM call: if (PyTuple_GET_SIZE(co->co_freevars