[Vm-dev] InterpreterProxy->getStackPointer is null

Igor Stasenko siguctua at gmail.com
Wed Aug 3 18:02:26 UTC 2011


On 3 August 2011 19:28, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> 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.
>

Ok. Good to know.
I am using maybe 4 months old VM for NativeBoost. Will check if it
fixed in fresh.

> 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
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list