[Vm-dev] Re: [Pharo-fuel] [Pharo-dev] Corrupt BlockClosure

Max Leske maxleske at gmail.com
Sun Jun 9 19:38:59 UTC 2013

I still can't tell you how the closure become corrupted but I now know how to get rid of it. I'm also pretty sure that closures work fine (as you say) and that I probably mistook the same corrupt instance for different instances.


> How does that happen?  It doesn't happen in normal use.  I can see how Fuel
> does it.  I can't see how non-Fuel use would do it (other than deliberate
> construction).  A closure is created by evaluating the push-closure
> bytecode in a specific method, and when this closure is created, it refers,
> through its outer context to the method object containing the evaluated
> push-closure bytecode.  Since the closure's startpc is derived from the pc
> of the push-closure bytecode, there is always a match.
> However, when Fuel serializes (IIRC) it serializes a *reference* to a
> method in the form of a class-name,selector pair, and this approach can
> obviously yield an invalid method.
> therefore I think it much more likely that what you;re seeing is a result
> of a bug in Fuel than some systemic problem with closures.

More information about the Vm-dev mailing list