**Version:** `JerryScript 2.4.0`



**Description**:

 When I run the following program, I have an interesting discovery that jerryscript can neither output "`right`" normally, just like hermes; At the same time, it will not report overflow errors like xs. I think it may have some problems.



**Test case**:

```public class Test {
a = [];
a.length = 0xfffff;
a.sort();
print("right");
```



**Output of jerryscript**:

```

```



**Output of hermes**:

```
right
```



**Output of xs**:

```
Error: stack overflow
```



A problem about calling sort function with long array
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : A problem about calling sort function with long array
Issue date:

--- start body ---
**Version:** `JerryScript 2.4.0`



**Description**:

 When I run the following program, I have an interesting discovery that jerryscript can neither output "`right`" normally, just like hermes; At the same time, it will not report overflow errors like xs. I think it may have some problems.



**Test case**:

```public class Test {
a = [];
a.length = 0xfffff;
a.sort();
print("right");
```



**Output of jerryscript**:

```

```



**Output of hermes**:

```
right
```



**Output of xs**:

```
Error: stack overflow
```



--- end body ---

The issue describes a potential problem with the JerryScript engine when handling large arrays in the sort function, which may lead to unexpected behavior or a lack of output. However, this does not indicate a security vulnerability, but rather a functional bug related to array handling and stack management.