[squeak-dev] Fwd: Quick way to run out of memory
Chris Cunningham
cunningham.cb at gmail.com
Wed Feb 1 22:26:38 UTC 2017
Forwarded to the list I wanted to send to.
---------- Forwarded message ----------
Date: Fri, Jan 27, 2017 at 9:08 AM
do:
String new: -1
Yes, it doesn't really run out of memory, it's just a bug in
ByteString>>basicNew:
(ec == #'insufficient object memory' or: [ec == #'bad argument']) ifTrue:
[^self handleFailingBasicNew: sizeRequested].
The VM gives us a nice error code telling us the arguement is bad, and then
our code proceeds to assume it is out of memory instead.
Bug verified in latest Trunk (as of now), and raw 5.1 image.
A proposed fix is in the inbox:
http://source.squeak.org/inbox/Kernel-cbc.1054.mcz
<http://source.squeak.org/inbox/Kernel-maga.1054.mcz>
This fix uses the old " self error: " pattern. If you'd prefer a new error
for invalid argument, I would be happy to post a variant for that.
Thanks,
-cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170201/0819aee3/attachment.html>
More information about the Squeak-dev
mailing list
|