<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"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></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 <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
<br>
> I think the problem is in the primitive error code checking. The primitive<br>
> is failing with #'bad argument' but the fallback code attempts to handle it<br>
> as #'insufficient object memory'. It then tries to free some memory, fails<br>
> to correct the problem, and raises a "Space is low" notifier.<br>
><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 == #'insufficient object memory' ifTrue:<br>
<br>
to<br>
(ec == #'insufficient object memory' or: [ec == #'bad argument']) ifTrue:<br>
<br>
in Behavior>>#basicNew:<br>
<br>
Maybe that was an error?<br>
<br>
@Eliot, why does Spur return #'bad argument' instead of #'insufficient object memory' when<br>
too much memory is to be allocated?<br></blockquote><div><br></div><div>It doesn'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>>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>
> Dave<br>
><br>
><br>
> On Thu, Jul 07, 2016 at 09:23:14AM +0200, Levente Uzonyi wrote:<br>
>> Someone seems to have trimmed the versions in the changes file. In Squeak<br>
>> 4.4 Behavior >> #basicNew: had the following body:<br>
>><br>
>> <primitive: 71><br>
>> self isVariable ifFalse:<br>
>> [self error: self printString, ' cannot have variable sized<br>
>> instances'].<br>
>> (sizeRequested isInteger and: [sizeRequested >= 0]) ifTrue:<br>
>> ["arg okay; space must be low."<br>
>> OutOfMemory signal.<br>
>> ^ self basicNew: sizeRequested "retry if user proceeds"].<br>
>> self primitiveFailed<br>
>><br>
>> So, non-integer and negative arguments were primitive failures.<br>
>><br>
>> Levente<br>
>><br>
>><br>
>> On Wed, 6 Jul 2016, David T. Lewis wrote:<br>
>><br>
>>> On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote:<br>
>>>> Hi, there!<br>
>>>><br>
>>>> Is it okay that there is an endless recursion when evaluating "String<br>
>>>> new: -1"?<br>
>>><br>
>>> No, it is not okay. It should fail with a primitive failure.<br>
>>><br>
>>> Dave<br>
>>><br>
>>><br>
>>>><br>
>>>> ...<br>
>>>> ByteString class(Behavior)>>handleFailingFailingBasicNew:<br>
>>>> ByteString class(Behavior)>>handleFailingBasicNew:<br>
>>>> ByteString class(Behavior)>>basicNew:<br>
>>>> ByteString class(Behavior)>>handleFailingFailingBasicNew:<br>
>>>> ByteString class(Behavior)>>handleFailingBasicNew:<br>
>>>> ByteString class(Behavior)>>basicNew:<br>
>>>> ByteString class(Behavior)>>handleFailingFailingBasicNew:<br>
>>>> ByteString class(Behavior)>>handleFailingBasicNew:<br>
>>>> ByteString class(Behavior)>>basicNew:<br>
>>>> ...<br>
>>>><br>
>>>> I would like to have an error signaled instead. Note that the -1 is just<br>
>>>> an<br>
>>>> example for a bad computation. The error I get is "Space is low" then. :-)<br>
>>>><br>
>>>><br>
>>>> Best,<br>
>>>> Marcel<br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> View this message in context:<br>
>>>> <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>
>>>> 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>