On Sun, Oct 19, 2008 at 5:02 PM, via RT Klaas-Jan Stol
<[EMAIL PROTECTED]> wrote:
> # New Ticket Created by  Klaas-Jan Stol
> # Please include the string:  [perl #60000]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60000 >
>
>
> when running code as this:
> .sub main :immediate
>  load_bytecode "foo.pir"
> .end
>
> (assuming you have a file 'foo.pir'), IMCC can't handle this.
>
> This is because in pbc.c, a global structure called 'globals' is used to
> allow the different functions to share access to some data (in particular,
> the code segment stuff).
>
> As documented by a warning in imcc's sources, a load_bytecode will trigger a
> (nested) compilation phase, which will overwrite this data.
>
> Parrot won't output anything (windows) , possibly segfaulting.
>
> The fix would be to store this 'globals' structure in the imcc_info
> structure (I think).

Or at the very least, store a local copy of it in the function that
creates the nested compilation phase. After the nested phase is over,
return the local value to the global store. This way should solve the
problem relatively quickly, we really need to do a lot more work on
IMCC to kill globals and make it more reentrant all the way around

--Andrew Whitworth

Reply via email to