Add recursion limit for VM (#2737)

This patch adds posibility to supervise the VM call stack to avoid aborts/crashes due to the recursion calls.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
This commit is contained in:
Robert Fancsik authored and László Langó committed 2019-02-01 15:32:26 +01:00
1 parent 5c1a4f18ea
commit 6b9c924d08
7 files changed
+86 -7

No files matched your search

+4
View File
@@ -136,6 +136,10 @@ struct jerry_context_t
* ECMAScript execution should be stopped */
#endif /* JERRY_VM_EXEC_STOP */
#ifdef VM_RECURSION_LIMIT
uint32_t vm_recursion_counter; /**< VM recursion counter */
#endif /* VM_RECURSION_LIMIT */
#ifdef JERRY_DEBUGGER
uint8_t debugger_send_buffer[JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE]; /**< buffer for sending messages */
uint8_t debugger_receive_buffer[JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE]; /**< buffer for receiving messages */