Fix parse_print_final_cbc dump when arguments is used (#2400)

Currently the byte code start is incorrectly set when
a non-strict arguments object is present, and a random
memory area is dumped as byte code.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-06-21 01:38:17 +02:00
committed by yichoi
parent 03274c112a
commit 35ac0e0445
2 changed files with 22 additions and 4 deletions
-4
View File
@@ -1228,10 +1228,6 @@ parse_print_final_cbc (ecma_compiled_code_t *compiled_code_p, /**< compiled code
}
byte_code_start_p += (unsigned int) (literal_end - register_end) * sizeof (ecma_value_t);
if (JERRY_UNLIKELY (compiled_code_p->status_flags & CBC_CODE_FLAGS_NON_STRICT_ARGUMENTS_NEEDED))
{
byte_code_start_p += argument_end * sizeof (ecma_value_t);
}
byte_code_end_p = byte_code_start_p + length;
byte_code_p = byte_code_start_p;