This one's pretty simple. The functions we expose to embedders don't set the stacktop pointer, which causes Much Difficulty to folks embedding parrot as it'll segfault or lose track of PMCs. This is... bad. As you might expect.
What needs to be done is pretty simple. There's code in src/embed.c in Parrot_runcode to set the lo_var_ptr value if it's NULL. (Code which needs a bit of refactoring now that I look at it) What we need to do is wrap the same "check if lo_var_ptr is NULL and temporarily set it to a spot in the current stack frame" code around any and all functions in extend.c which can call into the interpreter.
Not particularly sexy, but definitely necessary. I'd certainly be just fine with a macro or preprocessor solution, since I think we're going to have to do this for every extension function...
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk