Closed Bug 1830931 Opened 1 year ago Closed 1 year ago

InternalError: allocation size overflow in SpiderMonkey

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: best6653, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

85 bytes, text/javascript
Details
Attached file poc.js

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Steps to reproduce:

Version : JavaScript-C113.0a1

Platform : Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64)

Build :
./configure --disable-jemalloc --enable-debug --enable-optimize --enable-address-sanitizer

Actual results:

$ js poc.js
poc.js:3:5 InternalError: allocation size overflow
Stack:
@poc.js:3:5

Expected results:

Internal errors should not occur.
I think.. need to add check logic for range errors.

Unfortunately, there is a limit to what is worth doing when reality comes back and fight with our ideal representation of computers.

In this case we are able to make a memory efficient representation of concatenation of the same string over and over, but when it comes to reading the content we remove this optimization in favor of a memory representation which favor seeking capabilities. While this could be optimized, we would probably not do it unless all the internet starts relying on such patterns.

Sorry.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX

(oops; accidentally posted a comment here)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: