[FIX] Behavior>>basicNew: infinite failure loop

Andres Valloud avalloud at exobox.com
Wed Jul 26 02:10:15 UTC 2000


Hi.

If you try something like

	Array new: 347862478627862786278278

then Squeak enters an infinite failure loop. The problem is in
Behavior>>basicNew:. After the primitive fails, Squeak is told to signal
the low space alarm and, if the user proceeds, the operation is tried
again. But there's plenty of memory, so the alert doesn't come up and
the operation is tried again. And again. And again. And again...

This is solved by assuming, as in the comment of Behavior>>basicNew:,
that if the primitive fails and the argument is an integer >= 0, then
the problem is that the memory is low. The new assumption is that if
even after trying to get more memory the primitive still fails, the
problem is that the argument is too large, so the primitive should fail.
A new method, basicBasicNew:, handles this.

We also noticed that #primitiveFailed was present in Object but not in
ProtoObject. It turns out that under some questionable circumstances,
ProtoObject might send #primitiveFailed to itself. We moved this method
to ProtoObject.

Andres & Luciano.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqR-BasicNewRecursionFix.2.cs.gz
Type: application/x-gzip
Size: 852 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000725/ad42b41d/SqR-BasicNewRecursionFix.2.cs.bin


More information about the Squeak-dev mailing list