jerryscript icon indicating copy to clipboard operation
jerryscript copied to clipboard

A problem in String length

Open Georgezxh opened this issue 2 years ago • 0 comments

JerryScript revision

2.4.0

Build platform

ubuntu 20.04

Description

When I run the Test case , I find that jerryscript has no output. But if I set the loop number smaller than 174296, it can output correctly. Is it because that the number has reached to the maximum allowed String length in jerryscript? I wonder why the jerry outputs nothing.

Test case

var a = 'A'; var b = 'B'; for (var i = 0; i < 174296; i++) { a = a + b; } print(a.length);

Output

Expected behavior

174297

Georgezxh avatar Mar 25 '23 13:03 Georgezxh