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