Fix rare crash caused by get method of proxy object (#5129)

This fixes #5101
In rare cases the proxy object could get used after
being incorrectly removed by the gc

Add stack checks to the start of all function calls

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
This commit is contained in:
Máté Tokodi
2024-03-13 12:08:41 +01:00
committed by GitHub
parent bac7ee3acd
commit cefd391772
4 changed files with 44 additions and 2 deletions
@@ -1170,7 +1170,9 @@ ecma_proxy_object_get (ecma_object_t *obj_p, /**< proxy object */
ecma_value_t args[] = { proxy_obj_p->target, prop_value, receiver };
/* 9. */
ecma_ref_object (obj_p);
ecma_value_t trap_result = ecma_op_function_call (func_obj_p, handler, args, 3);
ecma_deref_object (obj_p);
ecma_deref_object (func_obj_p);