[squeak-dev] Re: [BUG] in VM perform primitive

Igor Stasenko siguctua at gmail.com
Tue May 18 21:50:53 UTC 2010


Here's a fix, which now allows to run

any of PerformTest new doPerformXX
without failure.

On 19 May 2010 00:30, Igor Stasenko <siguctua at gmail.com> wrote:
> Hello,
>
> i just discovered a serious bug,  which prevents from performing a
> methods which having many args
> (but not too many for compiler and run normally).
>
> The problem is, that VM tries to using the currently active context to push
> all of the arguments on it, and then just do normal send.
> But a sender context may be not big enough (small frame) to accomodate
> all pushed values.
>
> In the attachment you can find that running any of
>
> PerformTest new doPerformXX
>
> leads to primitive failure.
>
>
> I think that we could fix that at the image side,
> by telling the compiler to always use a big stack frame for following method:
>
> Object>>perform: selector withArguments: argArray
>        "Send the selector, aSymbol, to the receiver with arguments in argArray.
>        Fail if the number of arguments expected by the selector
>        does not match the size of argArray.
>        Primitive. Optional. See Object documentation whatIsAPrimitive."
>
>        <primitive: 84>
>        ^ self perform: selector withArguments: argArray inSuperclass: self class
>
>
> so, when prim 84 fails, it will activate this method
> and then, there should be enough space to push all method's arguments.
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>



-- 
Best regards,
Igor Stasenko AKA sig.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perform-framesize.1.cs
Type: application/octet-stream
Size: 865 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100519/4bc309c6/perform-framesize.1.obj


More information about the Squeak-dev mailing list