jerryscript icon indicating copy to clipboard operation
jerryscript copied to clipboard

A loop-call error bug

Open AidPaike opened this issue 2 years ago • 1 comments

Version

Version: 3.0.0 ( 1a2c047 )

Execution steps

/root/.jsvu/jerry Testcase.js

Testcase

var testcase = function() {
    function foo() {
        bar();
    }
    function bar() {
        foo();
    }
    foo();
};
var CallingResult = testcase();
print(CallingResult);

Output

Aborted (core dumped)

Expected behavior

Error: Out of stack space

Description

In my testing of the compiler, I discovered that jerryscript is Aborted (core dumped) when dealing with functions that are being called indefinitely, and other engines are dumping errors like Error: Out of stack space to warn the programmer Hope jerryscript gets better and better Looking forward to your reply :)

AidPaike avatar Feb 01 '23 17:02 AidPaike

It is a feature request: error instead of stack overflow for infinite recursion

Can be reproduced with a simpler example too:

function foo() { foo() }
foo()

ossy-szeged avatar Nov 21 '24 10:11 ossy-szeged