Skip to content

Limit the call stack size for native/builtin functions as well#2935

Merged
rerobika merged 1 commit intojerryscript-project:masterfrom
rerobika:call_stack_limit
Jul 5, 2019
Merged

Limit the call stack size for native/builtin functions as well#2935
rerobika merged 1 commit intojerryscript-project:masterfrom
rerobika:call_stack_limit

Conversation

@rerobika
Copy link
Copy Markdown
Member

VM_RECURSION_LIMIT only prevented the recursion of interpreted codeblocks but
non-interpeted codeblocks can also create stack overflow due to the too deep recursion.

This patch fixes #2905.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu

VM_RECURSION_LIMIT only prevented the recursion of interpreted codeblocks but
native/builtin function calls can also create stack overflow due to the too deep recursion.

This patch fixes jerryscript-project#2905.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
@rerobika rerobika added the ecma core Related to core ECMA functionality label Jun 28, 2019
@rerobika
Copy link
Copy Markdown
Member Author

Note: The basics of this PR are the same, only the name changed and the check positions have been extended.

Copy link
Copy Markdown
Member

@dbatyai dbatyai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rerobika rerobika merged commit e902b87 into jerryscript-project:master Jul 5, 2019
@rerobika rerobika deleted the call_stack_limit branch June 16, 2020 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecma core Related to core ECMA functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The try-catch block is unable to catch the exception?

3 participants