Skip to content

Commit c6a2fd5

Browse files
Daniel Ballaakosthekiss
authored andcommitted
Fix an issue while debugging with static snapshots (#2606)
The issue was found when debugging IoT.js with static snapshots turned on, if an error was thrown an assertion failure was caused. The reason is the frame context's bytecode_header_p pointer was not a heap pointer. The jerry_debugger_breakpoint_hit function tries to set a compressed pointer which points to bytecode_header_p with the JMEM_CP_SET_NON_NULL_POINTER macro, which has an assertion that requires the above mentioned bytecode_header_p to be a heap pointer, which is obviously not. Co-authored-by: Robert Fancsik [email protected] JerryScript-DCO-1.0-Signed-off-by: Daniel Balla [email protected]
1 parent 101f62c commit c6a2fd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jerry-core/vm/vm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3240,7 +3240,8 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
32403240
| JERRY_DEBUGGER_VM_EXCEPTION_THROWN);
32413241

32423242
if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
3243-
&& !(frame_ctx_p->bytecode_header_p->status_flags & CBC_CODE_FLAGS_DEBUGGER_IGNORE)
3243+
&& !(frame_ctx_p->bytecode_header_p->status_flags
3244+
& (CBC_CODE_FLAGS_DEBUGGER_IGNORE | CBC_CODE_FLAGS_STATIC_FUNCTION))
32443245
&& !(JERRY_CONTEXT (debugger_flags) & dont_stop))
32453246
{
32463247
/* Save the error to a local value, because the engine enters breakpoint mode after,

0 commit comments

Comments
 (0)