[Vm-dev] InterpreterProxy->getStackPointer is null

Igor Stasenko siguctua at gmail.com
Wed Aug 3 16:17:59 UTC 2011


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.


More information about the Vm-dev mailing list