# New Ticket Created by pancake # Please include the string: [perl #56694] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56694 >
If you try to run: $ echo 'print "foo"' | ./parrot languages/lua/lua.pbc Segmentation fault (or just run any LUA code inside the prompt instead of interpreting a file) the parrot gets a segfault because of an unhandled null pointer in src/pmc/closure.pmc I have managed to fix the problem returning 'next' when outer_sub is null. Currently I dont know much about parrot internals, so maybe this is not the correct way to fix this. $ svn diff src/pmc/closure.pmc Index: src/pmc/closure.pmc =================================================================== --- src/pmc/closure.pmc (revision 29147) +++ src/pmc/closure.pmc (working copy) @@ -91,6 +91,9 @@ opcode_t *next = SUPER(in_next); PMC *outer_sub = sub->outer_sub; + if (outer_sub == NULL) + return next; + if (sub->ctx->caller_ctx->current_sub == outer_sub) { /* Being called from outer sub, in which case our outer is its * context. */ --------------------------------------- --pancake