Previously, the function might free invalid pointer, as array->start is
not always points to the beginning of allocated memory block.
This closes #540 issue on Github.
/* GC: release value. */
- njs_mp_free(vm->mem_pool, array->start);
+ njs_mp_free(vm->mem_pool, array->data);
array->start = NULL;
return NJS_OK;
"a.shift(); a"),
njs_str("2,3") },
+ { njs_str("var arr = [1,2];"
+ "arr.shift();"
+ "arr[2**20] = 3;"
+ "arr[2**20]"),
+ njs_str("3") },
+
{ njs_str("var a = []; a.splice()"),
njs_str("") },