[Vm-dev] Crash on start-up.

Michael van der Gulik mikevdg at gmail.com
Sun Mar 22 20:36:55 UTC 2009


On Sun, Mar 22, 2009 at 11:40 PM, Igor Stasenko <siguctua at gmail.com> wrote:

>
> 2009/3/22 Igor Stasenko <siguctua at gmail.com>:
> > 2009/3/22 Michael van der Gulik <mikevdg at gmail.com>:
> >>
> >>
> >>
> >> On Sun, Mar 22, 2009 at 4:55 PM, Michael van der Gulik <
> mikevdg at gmail.com> wrote:
> >>>
> >>> <snip>
> >>> >>> Hi VM guys.
> >>> >>>
> >>> >>> Does anybody have any insights into the following?:
> >>
> >> <bigger snip>
> >>
> >> I've isolated the bug. To reproduce, do the following in a disposable
> image:
> >>
> >> Sensor primSetInputSemaphore: (Semaphore new).
> >>
> >
> > self
> >        primSetInputSemaphore: (Smalltalk registerExternalObject:
> inputSemaphore).
> >
> That of couse is not excuse for VM crash, when you passing a semaphore
> object intead of valid smallinteger index in external objects table.
> It should check and fail if you do so.
>

Thanks, Igor. I never was good at details.

When I next have time (Tuesday evening?) I'll submit a patch for this:

- rename primSetInputSemaphore: to primSetInputSemaphoreIndex:.
- Add checks in the VM: must be a SmallInteger, must be a valid index in the
external objects table, must point to a Semaphore.
- Add error handling code in the method itself.

Gulik.

-- 
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20090323/01c0f6da/attachment.htm


More information about the Vm-dev mailing list