You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm currently working on the Object.create built-in function and I've found that the following code cause below causes assertion.
The test:
var obj = Object.create(null);
Object.getPrototypeOf (obj);
The assertion:
ICE: Assertion 'object_p != NULL' failed at /home/kristof/work/jerryscript/jerry-core/ecma/base/ecma-helpers-value.cpp(ecma_make_object_value):267.
Error: ERR_FAILED_INTERNAL_ASSERTION
Backtrace:
#0 0x00000000004d9ae5 in syscall_2_asm () at /home/kristof/work/jerryscript/jerry-libc/target/linux/jerry-asm.S:32
#1 0x000000000040099a in syscall_2 (syscall_no=62, arg1=6944, arg2=6) at /home/kristof/work/jerryscript/jerry-libc/target/linux/jerry-libc-target.c:96
#2 0x0000000000400b3b in abort () at /home/kristof/work/jerryscript/jerry-libc/target/linux/jerry-libc-target.c:175
#3 0x000000000045c10b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /home/kristof/work/jerryscript/jerry-core/jrt/jrt-fatals.cpp:70
#4 0x000000000045c15a in jerry_assert_fail (assertion=0x4f2ce7 "object_p != NULL", file=0x4f2c78 "/home/kristof/work/jerryscript/jerry-core/ecma/base/ecma-helpers-value.cpp",
function=0x4dccf0 <_ZZ22ecma_make_object_valuePK13ecma_object_tE8__func__.25845> "ecma_make_object_value", line=267) at /home/kristof/work/jerryscript/jerry-core/jrt/jrt-fatals.cpp:97
#5 0x000000000048a97f in ecma_make_object_value (object_p=0x0) at /home/kristof/work/jerryscript/jerry-core/ecma/base/ecma-helpers-value.cpp:267
#6 0x00000000004223ec in ecma_builtin_object_object_get_prototype_of (this_arg=1807, arg=2855) at /home/kristof/work/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object.cpp:133
...
The text was updated successfully, but these errors were encountered:
Note that, on the current master this isn't reproducible because the only way to create any object with the prototype of null is using the Object.create.
The problem seems to be that the ecma_get_object_prototype return a null pointer and we call the ecma_make_object_value on it. Probably we should check and if such case occurs return a simple null value instead.
Hi, I'm currently working on the Object.create built-in function and I've found that the following code cause below causes assertion.
The test:
The assertion:
Backtrace:
The text was updated successfully, but these errors were encountered: