<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 5:42 AM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Hi all<br>
<br>
(cc vm-dev)<br>
<span class="">On 07.07.2016, at 14:28, David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt; wrote:<br>
<br>
&gt; I think the problem is in the primitive error code checking. The primitive<br>
&gt; is failing with #&#39;bad argument&#39; but the fallback code attempts to handle it<br>
&gt; as #&#39;insufficient object memory&#39;. It then tries to free some memory, fails<br>
&gt; to correct the problem, and raises a &quot;Space is low&quot; notifier.<br>
&gt;<br>
<br>
</span>I noted that when we moved to Spur initially and I tried to fix tests.<br>
The AllocationTest failed, and I changed<br>
<br>
        ec == #&#39;insufficient object memory&#39; ifTrue:<br>
<br>
to<br>
        (ec == #&#39;insufficient object memory&#39; or: [ec == #&#39;bad argument&#39;]) ifTrue:<br>
<br>
in Behavior&gt;&gt;#basicNew:<br>
<br>
Maybe that was an error?<br>
<br>
@Eliot, why does Spur return #&#39;bad argument&#39; instead of #&#39;insufficient object memory&#39; when<br>
too much memory is to be allocated?<br></blockquote><div><br></div><div>It doesn&#39;t.  It answers bad argument for anything other than an integer in the range 0 to 2^32-1 or 0 to 2^64-1.  I think your commit of topa 10/7/2015 20:41 for Behavior&gt;&gt;basicNew: is wrong, and should be reverted.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Best regards<br>
<span class=""><font color="#888888">        -Tobias<br>
</font></span><div class=""><div class="h5"><br>
<br>
&gt; Dave<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Jul 07, 2016 at 09:23:14AM +0200, Levente Uzonyi wrote:<br>
&gt;&gt; Someone seems to have trimmed the versions in the changes file. In Squeak<br>
&gt;&gt; 4.4 Behavior &gt;&gt; #basicNew: had the following body:<br>
&gt;&gt;<br>
&gt;&gt;      &lt;primitive: 71&gt;<br>
&gt;&gt;      self isVariable ifFalse:<br>
&gt;&gt;              [self error: self printString, &#39; cannot have variable sized<br>
&gt;&gt;              instances&#39;].<br>
&gt;&gt;      (sizeRequested isInteger and: [sizeRequested &gt;= 0]) ifTrue:<br>
&gt;&gt;              [&quot;arg okay; space must be low.&quot;<br>
&gt;&gt;              OutOfMemory signal.<br>
&gt;&gt;              ^ self basicNew: sizeRequested  &quot;retry if user proceeds&quot;].<br>
&gt;&gt;      self primitiveFailed<br>
&gt;&gt;<br>
&gt;&gt; So, non-integer and negative arguments were primitive failures.<br>
&gt;&gt;<br>
&gt;&gt; Levente<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Wed, 6 Jul 2016, David T. Lewis wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote:<br>
&gt;&gt;&gt;&gt; Hi, there!<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Is it okay that there is an endless recursion when evaluating &quot;String<br>
&gt;&gt;&gt;&gt; new: -1&quot;?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; No, it is not okay. It should fail with a primitive failure.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Dave<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ...<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;handleFailingFailingBasicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;handleFailingBasicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;basicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;handleFailingFailingBasicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;handleFailingBasicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;basicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;handleFailingFailingBasicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;handleFailingBasicNew:<br>
&gt;&gt;&gt;&gt; ByteString class(Behavior)&gt;&gt;basicNew:<br>
&gt;&gt;&gt;&gt; ...<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I would like to have an error signaled instead. Note that the -1 is just<br>
&gt;&gt;&gt;&gt; an<br>
&gt;&gt;&gt;&gt; example for a bad computation. The error I get is &quot;Space is low&quot; then. :-)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Best,<br>
&gt;&gt;&gt;&gt; Marcel<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; View this message in context:<br>
&gt;&gt;&gt;&gt; <a href="http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html" rel="noreferrer" target="_blank">http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html</a><br>
&gt;&gt;&gt;&gt; Sent from the Squeak - Dev mailing list archive at Nabble.com.<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>