When expecting a positive integer...

Dmitry Lomov dslomov at google.com
Tue Apr 9 07:26:57 PDT 2013


Current spec places no limits (other than being a number) on typed
array/array buffer length


On Tue, Apr 9, 2013 at 4:01 PM, Kevin Gadd <kevin.gadd at gmail.com> wrote:

> I previously had a discussion with someone about Typed Array sizes in
> particular - at present it seems like no existing implementation of Typed
> Arrays will allow you to allocate one larger than 2GB, regardless of the
> actual numeric types being used. But when I did a quick scan of the Safari,
> Chrome and Spidermonkey implementations, I found some uses of ToInt32 and
> equivalent operations instead of ToUInt32 - which would imply being limited
> to a maximum index that fits into a positive 32-bit integer.
>
> Being able to allocate a 4GB typed array on a 64-bit machine, if not one
> even bigger than that, would certainly be welcome.
>
>
> On Tue, Apr 9, 2013 at 6:58 AM, Brendan Eich <brendan at mozilla.com> wrote:
>
>> Dmitry Lomov wrote:
>>
>>> If people agree this is generally a thing to be avoided, I am happy to
>>> collect a systematic list of these issues and suggest fixes - but maybe I
>>> am missing something and that has some deep motivation?
>>>
>>
>> No, please collect and file at bugs.ecmascript.org -- these are indeed
>> errors in the draft. We need to throw on negative length. We must *not*
>> spec clamping negative indexes to 0 at runtime. Other deviations from
>> Khronos and implementation need to be considered carefully in light of
>> performance and safety (which are not always at odds).
>>
>> Thanks to you and Domenic for flagging.
>>
>> /be
>>
>> ______________________________**_________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>>
>
>
>
> --
> -kg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130409/cf1da350/attachment-0001.html>


More information about the es-discuss mailing list