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 frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-02-01 15:32:26 +01:00
committed by László Langó
parent 5c1a4f18ea
commit 6b9c924d08
7 changed files with 86 additions and 7 deletions
+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 */