[Vm-dev] InterpreterProxy->getStackPointer is null
Eliot Miranda
eliot.miranda at gmail.com
Wed Aug 3 17:28:47 UTC 2011
Igor,
this was fixed in r2440 of
http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/vm/sqVirtualMachine.c,
along with marshalling in the Alien plugin for stack-grows-down Stack and
Cog VMs.
On Wed, Aug 3, 2011 at 9:17 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>
> I just found that a pointer to this function is null.
> Means that if you will use
> interpreterProxy->getStackPointer()
> in plugin, you will crash VM.
>
> Could it be that it declared twice in sqVirtualMachine.c ?
>
> ...
> sqInt getStackPointer(void); /* Newsqueak FFI */
> void *startOfAlienData(sqInt);
> usqInt sizeOfAlienData(sqInt);
> sqInt signalNoResume(sqInt);
>
> #if VM_PROXY_MINOR > 8
> sqInt getStackPointer(void); /* Alien FFI */
> ...
>
> (at least this code looks suspicious)
>
> and why at assignment point it does conversions?
> VM->getStackPointer = (sqInt *(*)(void))getStackPointer;
>
> while rest of functions don't require them?
>
> In header it declared as:
> sqInt *(*getStackPointer)(void);
>
>
>
> NBInterpreterProxy majorVersion 1
> NBInterpreterProxy minorVersion 12
>
> (means that it should be there :)
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
--
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110803/1fc91a24/attachment.htm
More information about the Vm-dev
mailing list