<br><br><div class="gmail_quote">On Sun, Mar 22, 2009 at 11:40 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
2009/3/22 Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;:<br>
<div class="im">&gt; 2009/3/22 Michael van der Gulik &lt;<a href="mailto:mikevdg@gmail.com">mikevdg@gmail.com</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Sun, Mar 22, 2009 at 4:55 PM, Michael van der Gulik &lt;<a href="mailto:mikevdg@gmail.com">mikevdg@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &lt;snip&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Hi VM guys.<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Does anybody have any insights into the following?:<br>
&gt;&gt;<br>
&gt;&gt; &lt;bigger snip&gt;<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve isolated the bug. To reproduce, do the following in a disposable image:<br>
&gt;&gt;<br>
&gt;&gt; Sensor primSetInputSemaphore: (Semaphore new).<br>
&gt;&gt;<br>
&gt;<br>
&gt; self<br>
&gt;        primSetInputSemaphore: (Smalltalk registerExternalObject: inputSemaphore).<br>
&gt;<br>
</div>That of couse is not excuse for VM crash, when you passing a semaphore<br>
object intead of valid smallinteger index in external objects table.<br>
It should check and fail if you do so.<br>
</blockquote></div><br>Thanks, Igor. I never was good at details.<br><br>When I next have time (Tuesday evening?) I&#39;ll submit a patch for this:<br><br>- rename primSetInputSemaphore: to primSetInputSemaphoreIndex:.<br>
- Add checks in the VM: must be a SmallInteger, must be a valid index in the external objects table, must point to a Semaphore.<br>- Add error handling code in the method itself.<br><br>Gulik.<br clear="all"><br>-- <br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a><br>