Igor,<div><br></div><div> this was fixed in r2440 of <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/vm/sqVirtualMachine.c">http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/vm/sqVirtualMachine.c</a>, along with marshalling in the Alien plugin for stack-grows-down Stack and Cog VMs.<br>
<br><div class="gmail_quote">On Wed, Aug 3, 2011 at 9:17 AM, Igor Stasenko <span dir="ltr"><<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I just found that a pointer to this function is null.<br>
Means that if you will use<br>
interpreterProxy->getStackPointer()<br>
in plugin, you will crash VM.<br>
<br>
Could it be that it declared twice in sqVirtualMachine.c ?<br>
<br>
...<br>
sqInt getStackPointer(void); /* Newsqueak FFI */<br>
void *startOfAlienData(sqInt);<br>
usqInt sizeOfAlienData(sqInt);<br>
sqInt signalNoResume(sqInt);<br>
<br>
#if VM_PROXY_MINOR > 8<br>
sqInt getStackPointer(void); /* Alien FFI */<br>
...<br>
<br>
(at least this code looks suspicious)<br>
<br>
and why at assignment point it does conversions?<br>
VM->getStackPointer = (sqInt *(*)(void))getStackPointer;<br>
<br>
while rest of functions don't require them?<br>
<br>
In header it declared as:<br>
sqInt *(*getStackPointer)(void);<br>
<br>
<br>
<br>
NBInterpreterProxy majorVersion 1<br>
NBInterpreterProxy minorVersion 12<br>
<br>
(means that it should be there :)<br>
<font color="#888888"><br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>best,<div>Eliot</div><br>
</div>