Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing private field support for the Array object #5138

Open
paintedveil5 opened this issue Apr 20, 2024 · 0 comments
Open

Missing private field support for the Array object #5138

paintedveil5 opened this issue Apr 20, 2024 · 0 comments

Comments

@paintedveil5
Copy link

paintedveil5 commented Apr 20, 2024

JerryScript revision

47bd5d4

Build platform

Ubuntu 22.04.3 LTS (Linux 5.19.17 x86_64)

Build steps

python3 ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --system-allocator=on --stack-limit=20

Test case
class C1 extends Array{
    #test() {
    }
}
new C1();
Output

ICE: Assertion 'ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)' failed at /home/lily/Desktop/12-vul-analysis/lastest-jerryscript/jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_find_named_property):614.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted (core dumped)

Backtrace
Program received signal SIGABRT, Aborted.
0xf7fc4549 in __kernel_vsyscall ()
(gdb) bt
#0  0xf7fc4549 in __kernel_vsyscall ()
#1  0xf7487eb7 in ?? () from /lib32/libc.so.6
#2  0xf74374c5 in raise () from /lib32/libc.so.6
#3  0xf74203ac in abort () from /lib32/libc.so.6
#4  0x56738951 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-port/common/jerry-port-process.c:29
#5  0x56632fe4 in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/jrt/jrt-fatals.c:63
#6  0x56633025 in jerry_assert_fail (assertion=0x5674bae0 "ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)", 
    file=0x5674af60 "/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/base/ecma-helpers.c", function=0x5674c9e0 <__func__.22> "ecma_find_named_property", line=614)
    at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/jrt/jrt-fatals.c:83
#7  0x565b6b77 in ecma_find_named_property (obj_p=0xf4e006a0, name_p=0xf5600510) at/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/base/ecma-helpers.c:614
#8  0x5667a49b in opfunc_private_method_or_accessor_add (class_object_p=0xf4e00820, this_obj_p=0xf4e006a0, static_flag=0)
    at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/opcodes.c:919
#9  0x5667aa46 in opfunc_init_class_fields (class_object_p=0xf4e00820, this_val=4108322467) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/opcodes.c:1002
#10 0x565fade0 in ecma_op_function_construct_constructor (func_obj_p=0xf4e00820, new_target_p=0xf4e00820, arguments_list_p=0xffffcaec, arguments_list_len=0)
    at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1644
#11 0x565fb0ba in ecma_op_function_construct (func_obj_p=0xf4e00820, new_target_p=0xf4e00820, arguments_list_p=0xffffcaec, arguments_list_len=0)
    at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1735
#12 0x566859a9 in opfunc_construct (frame_ctx_p=0xffffcac0) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:840
#13 0x566a48e3 in vm_execute (frame_ctx_p=0xffffcac0) at/home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:5236
#14 0x566a4f0d in vm_run (shared_p=0xffffcbf0, this_binding_value=4110433411, lex_env_p=0xf5600590) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:5312
#15 0x56683480 in vm_run_global (bytecode_p=0xf44019f0, function_object_p=0xf4e008e0) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/vm/vm.c:286
#16 0x5657d5f3 in jerry_run (script=4108323043) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-core/api/jerryscript.c:554
#17 0x567376c3 in jerryx_source_exec_script (path_p=0xffffd14a "test.js") at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-ext/util/sources.c:68
#18 0x56578153 in main (argc=2, argv=0xffffcf24) at /home/ubuntu/Desktop/lastest-jerryscript/jerryscript/jerry-main/main-desktop.c:156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant