[Cuis-dev] A bug in Context Part>>contextEnsure:
Juan Vuletich
juan at cuis.st
Tue Jan 24 10:59:22 PST 2023
On 1/24/2023 1:01 PM, Jaromir Matas via Cuis-dev wrote:
>
> Hi Juan,
>
> Here’s a fix of a nasty bug in Context Part>>contextEnsure:
>
> It shows while debugging or stepping; try this sequence that would get
> you right before the bug:
>
> p _ [ContextPart contextEnsure: [42]] newProcess.
>
> [p suspendedContext selectorToSendOrSelf = #jump] whileFalse: [p step].
>
> [p suspendedContext selectorToSendOrSelf = #privSender:] whileFalse:
> [p step].
>
> 3 timesRepeat: [p stepToCallee].
>
> p step.
>
> p suspendedContext explore.
>
> p suspendedContext method inspect.
>
> Please notice that the suspendedContext only has stackp=2 and hence
> the next instruction will fail in the next step:
>
> p step
>
> The root cause is contextEnsure: mistakenly treats ctxt as a top
> context (i.e. one that has a return value already at the top of the
> stack); the fix is trivial: add a fake return value – see enclosed.
>
> Best,
>
> --
>
> *Jaromír Matas*
>
> mail at jaromir.net
>
Hi Jaromir,
Just pushed this to GitHub.
Thanks!
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230124/bd6065c2/attachment.htm>
More information about the Cuis-dev
mailing list