issue_owner_repo
sequencelengths
2
2
issue_body
stringlengths
0
261k
issue_title
stringlengths
1
925
issue_comments_url
stringlengths
56
81
issue_comments_count
int64
0
2.5k
issue_created_at
stringlengths
20
20
issue_updated_at
stringlengths
20
20
issue_html_url
stringlengths
37
62
issue_github_id
int64
387k
2.46B
issue_number
int64
1
127k
[ "jerryscript-project", "jerryscript" ]
###### Revision 1088273 ###### Build ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ``` ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arr = [1]; var t = arr.find(function(a) { return Symbol.for(null); }); ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at /jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_symbol_list):46. Error: ERR_FAILED_INTERNAL_ASSERTION (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7823452 in raise () from /lib32/libc.so.6 #2 0xf7824871 in abort () from /lib32/libc.so.6 #3 0x5657ae47 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56617934 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56617975 in jerry_assert_fail (assertion=0x566b8bc0 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", file=0x566b8b60 "/jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x5667a300 <__func__.5128.lto_priv.49> "ecma_free_symbol_list", line=46) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5666c9bc in ecma_free_symbol_list (symbol_list_cp=4124051248) at /jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:46 #7 0x5666cd32 in ecma_finalize_lit_storage () at /jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:119 #8 0x5666b979 in ecma_finalize () at /jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:64 #9 0x56640889 in jerry_cleanup () at /jerryscript/jerry-core/api/jerry.c:216 #10 0x5663e896 in main (argc=3, argv=0xffffd3d4) at /jerryscript/jerry-main/main-unix.c:941 ```
Assertion ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3058/comments
2
2019-09-04T18:50:32Z
2019-09-05T07:50:38Z
https://github.com/jerryscript-project/jerryscript/issues/3058
489,332,758
3,058
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1088273b ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var b = [""]; function dConstr ( ) { } dConstr.prototype = b; var d = new dConstr; for (var $ in d); ``` ###### Output ```text ICE: Assertion 'uint_ptr % JMEM_ALIGNMENT == 0' failed at jerryscript/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):222. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ae47 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56617934 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56617975 in jerry_assert_fail (assertion=0x566ab760 "uint_ptr % JMEM_ALIGNMENT == 0", file=0x566ab640 "jerryscript/jerry-core/jmem/jmem-allocator.c", function=0x5667ef80 <__func__.4606.lto_priv.506> "jmem_decompress_pointer", line=222) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56616ade in jmem_decompress_pointer (compressed_pointer=4126148881) at jerryscript/jerry-core/jmem/jmem-allocator.c:222 #7 0x56607c91 in ecma_op_object_get_property_names (obj_p=0xf5d005f0, opts=6) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1829 #8 0x565757e4 in opfunc_for_in (left_value=4124050931, result_obj_p=0xffffc680) at jerryscript/jerry-core/vm/opcodes.c:248 #9 0x565f4c00 in vm_loop (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:2840 #10 0x565f9958 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3616 #11 0x565fa2bc in vm_run (bytecode_header_p=0xf51031d0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #12 0x565e7a1c in vm_run_global (bytecode_p=0xf51031d0) at jerryscript/jerry-core/vm/vm.c:282 #13 0x5664170c in jerry_run (func_val=4126148451) at jerryscript/jerry-core/api/jerry.c:570 #14 0x5663e070 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion uint_ptr % JMEM_ALIGNMENT == 0 in jmem_decompress_pointer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3057/comments
2
2019-09-04T18:21:42Z
2019-09-05T07:51:09Z
https://github.com/jerryscript-project/jerryscript/issues/3057
489,318,768
3,057
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1088273b ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var src = '(function () {' for (var i = 0; i < 550; i++) { src += 'var a' + i + ' = 5; ' } src += '})()' eval(src) ``` ###### Output ```text ICE: Assertion 'literal_index < register_end' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):1950. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ae47 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56617934 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56617975 in jerry_assert_fail (assertion=0x566a6d00 "literal_index < register_end", file=0x566a5ee0 "jerryscript/jerry-core/vm/vm.c", function=0x566862c0 <__func__.5931.lto_priv.427> "vm_loop", line=1950) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565efe6e in vm_loop (frame_ctx_p=0xffffbdb0) at jerryscript/jerry-core/vm/vm.c:1950 #7 0x565f9958 in vm_execute (frame_ctx_p=0xffffbdb0, arg_p=0xffffc004, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3616 #8 0x565fa2bc in vm_run (bytecode_header_p=0xf5733080, this_binding_value=4126149459, lex_env_p=0xf5d07b70, parse_opts=0, arg_list_p=0xffffc004, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #9 0x56633d9d in ecma_op_function_call (func_obj_p=0xf5f13750, this_arg_value=72, arguments_list_p=0xffffc004, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #10 0x565e8785 in opfunc_call (frame_ctx_p=0xffffc070) at jerryscript/jerry-core/vm/vm.c:581 #11 0x565f99b8 in vm_execute (frame_ctx_p=0xffffc070, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3622 #12 0x565fa2bc in vm_run (bytecode_header_p=0xf5f13780, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=66, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #13 0x565e7c04 in vm_run_eval (bytecode_data_p=0xf5f13780, parse_opts=66) at jerryscript/jerry-core/vm/vm.c:346 #14 0x56631964 in ecma_op_eval_chars_buffer (code_p=0xf256410c "(function () {var a0 = 5; var a1 = 5; var a2 = 5; var a3 = 5; var a4 = 5; var a5 = 5; var a6 = 5; var a7 = 5; var a8 = 5; var a9 = 5; var a10 = 5; var a11 = 5; var a12 = 5; var a13 = 5; var a14 = 5; v"..., code_buffer_size=7608, parse_opts=66) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:116 #15 0x56631637 in ecma_op_eval (code_p=0xf2564100, parse_opts=2) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #16 0x565bb1e8 in ecma_builtin_global_object_eval (x=4065739009) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:111 #17 0x565be9ab in ecma_builtin_global_dispatch_routine (builtin_routine_id=73, this_arg=72, arguments_list_p=0xffffc4d0, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:1164 #18 0x56621477 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_GLOBAL, builtin_routine_id=73, this_arg_value=72, arguments_list_p=0xffffc4d0, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #19 0x566216d8 in ecma_builtin_dispatch_call (obj_p=0xf5f036d0, this_arg_value=72, arguments_list_p=0xffffc764, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #20 0x56633a3c in ecma_op_function_call (func_obj_p=0xf5f036d0, this_arg_value=72, arguments_list_p=0xffffc764, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #21 0x565e8785 in opfunc_call (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:581 #22 0x565f99b8 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3622 #23 0x565fa2bc in vm_run (bytecode_header_p=0xf5103ec0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #24 0x565e7a1c in vm_run_global (bytecode_p=0xf5103ec0) at jerryscript/jerry-core/vm/vm.c:282 #25 0x5664170c in jerry_run (func_val=4126148691) at jerryscript/jerry-core/api/jerry.c:570 #26 0x5663e070 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion literal_index < register_end in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3055/comments
0
2019-09-04T14:49:55Z
2019-09-07T10:23:50Z
https://github.com/jerryscript-project/jerryscript/issues/3055
489,209,795
3,055
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1088273b ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var b = [$] function dConstr () { } dConstr.prototype = b var d = new dConstr() for (var $ in d); ``` ###### Output ```text ASAN:DEADLYSIGNAL ================================================================= ==16447==ERROR: AddressSanitizer: SEGV on unknown address 0x00000014 (pc 0x566367af bp 0xfffb3ba8 sp 0xfffb3a50 T0) ==16447==The signal is caused by a READ memory access. ==16447==Hint: address points to the zero page. #0 0x566367ae in ecma_op_object_get_property_names jerryscript/jerry-core/ecma/operations/ecma-objects.c:1826 #1 0x565a4623 in opfunc_for_in jerryscript/jerry-core/vm/opcodes.c:244 #2 0x5662378a in vm_loop jerryscript/jerry-core/vm/vm.c:2836 #3 0x566284e2 in vm_execute jerryscript/jerry-core/vm/vm.c:3612 #4 0x56628e46 in vm_run jerryscript/jerry-core/vm/vm.c:3738 #5 0x56616637 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #6 0x5666fe25 in jerry_run jerryscript/jerry-core/api/jerry.c:570 #7 0x5666c789 in main jerryscript/jerry-main/main-unix.c:743 #8 0xf7748e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #9 0x5659a5a0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x165a0) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV jerryscript/jerry-core/ecma/operations/ecma-objects.c:1826 in ecma_op_object_get_property_names ==16447==ABORTING ``` ###### Backtrace ```text bt #0 0x566077af in ecma_op_object_get_property_names (obj_p=0xf5d00650, opts=6) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1826 #1 0x56575624 in opfunc_for_in (left_value=4124051027, result_obj_p=0xffffc680) at jerryscript/jerry-core/vm/opcodes.c:244 #2 0x565f478b in vm_loop (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:2836 #3 0x565f94e3 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3612 #4 0x565f9e47 in vm_run (bytecode_header_p=0xf5302bc0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3738 #5 0x565e7638 in vm_run_global (bytecode_p=0xf5302bc0) at jerryscript/jerry-core/vm/vm.c:282 #6 0x56640e26 in jerry_run (func_val=4126148595) at jerryscript/jerry-core/api/jerry.c:570 #7 0x5663d78a in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
SEGV in ecma_op_object_get_property_names
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3050/comments
0
2019-09-04T10:57:53Z
2019-09-05T07:49:57Z
https://github.com/jerryscript-project/jerryscript/issues/3050
489,089,098
3,050
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1088273b ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var func = function (a, b) { return a + b }; ['A'].findIndex(func) ``` ###### Output ```text ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):106. Error: ERR_FAILED_INTERNAL_ASSERTION ================================================================= ==9950==ERROR: LeakSanitizer: detected memory leaks Direct leak of 14 byte(s) in 1 object(s) allocated from: #0 0xf7a2b1cf in __interceptor_malloc (/usr/lib32/libasan.so.5+0x1121cf) #1 0x56688520 in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x5668858c in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x56688619 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x566b69ca in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x56639c4b in ecma_new_ecma_string_from_utf8_buffer jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:293 #6 0x56639c4b in ecma_append_chars_to_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:720 #7 0x5663a6f3 in ecma_concat_ecma_strings jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:783 #8 0x56713515 in opfunc_addition jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c:170 #9 0x566ae504 in vm_loop jerryscript/jerry-core/vm/vm.c:2263 #10 0x566b5eb5 in vm_execute jerryscript/jerry-core/vm/vm.c:3616 #11 0x566b67b9 in vm_run jerryscript/jerry-core/vm/vm.c:3742 #12 0x5666d452 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #13 0x566bfe39 in ecma_builtin_array_prototype_object_find jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:1987 #14 0x566c0675 in ecma_builtin_array_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2259 #15 0x5665ac41 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #16 0x5665ae9f in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #17 0x5666d0f1 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #18 0x566a4f33 in opfunc_call jerryscript/jerry-core/vm/vm.c:581 #19 0x566b5f15 in vm_execute jerryscript/jerry-core/vm/vm.c:3622 #20 0x566b67b9 in vm_run jerryscript/jerry-core/vm/vm.c:3742 #21 0x566a4238 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #22 0x56622212 in jerry_run jerryscript/jerry-core/api/jerry.c:570 #23 0x5661ee56 in main jerryscript/jerry-main/main-unix.c:743 #24 0xf7739750 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1e750) SUMMARY: AddressSanitizer: 14 byte(s) leaked in 1 allocation(s). ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac87 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566173a1 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566173e2 in jerry_assert_fail (assertion=0x566aa680 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566aa620 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5667e1c0 <__func__.4608.lto_priv.111> "jmem_heap_finalize", line=106) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566165df in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:106 #7 0x56616405 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x566401be in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:231 #9 0x5663dfb0 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:941 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3049/comments
0
2019-09-04T10:15:48Z
2019-09-04T23:42:17Z
https://github.com/jerryscript-project/jerryscript/issues/3049
489,070,066
3,049
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1088273b ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript this[delete $]; ``` ###### Output ```text ICE: Assertion 'PARSER_ARGS_EQ (opcode, CBC_HAS_LITERAL_ARG)' failed at jerryscript/jerry-core/parser/js/js-parser-util.c(parser_emit_cbc_literal):266. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac87 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566173a1 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566173e2 in jerry_assert_fail (assertion=0x5668d780 "PARSER_ARGS_EQ (opcode, CBC_HAS_LITERAL_ARG)", file=0x5668d4c0 "jerryscript/jerry-core/parser/js/js-parser-util.c", function=0x5668fa60 <__func__.3819> "parser_emit_cbc_literal", line=266) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565713ce in parser_emit_cbc_literal (context_p=0xffffc5d0, opcode=153, literal_index=10) at jerryscript/jerry-core/parser/js/js-parser-util.c:266 #7 0x5659b4a0 in parser_emit_unary_lvalue_opcode (context_p=0xffffc5d0, opcode=CBC_DELETE_PUSH_RESULT) at jerryscript/jerry-core/parser/js/js-parser-expr.c:171 #8 0x565a18fd in parser_process_unary_expression (context_p=0xffffc5d0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1864 #9 0x565a483d in parser_parse_expression (context_p=0xffffc5d0, options=0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2254 #10 0x565a0921 in parser_process_unary_expression (context_p=0xffffc5d0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1598 #11 0x565a483d in parser_parse_expression (context_p=0xffffc5d0, options=5) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2254 #12 0x565abec1 in parser_parse_var_statement.lto_priv.190 (context_p=0xffffc5d0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:386 #13 0x5656e14b in parser_parse_statements (context_p=0xffffc5d0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2366 #14 0x565db85c in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566e5680 <buffer.lto_priv> "var c = 0 ; \nvar id_0 = this [ c ++ ] ; \nprint ( id_1 === undefined ) ; \nprint ( c === 1 ) ; \nvar id_2 = this [ c -- ] ; \nprint ( id_3 === undefined ) ; \nprint ( c === 0 ) ; \nvar id_4 = this [ delete "..., source_size=345, parse_opts=0, error_location_p=0xffffc7c0) at jerryscript/jerry-core/parser/js/js-parser.c:2477 #15 0x565de591 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566e5680 <buffer.lto_priv> "var c = 0 ; \nvar id_0 = this [ c ++ ] ; \nprint ( id_1 === undefined ) ; \nprint ( c === 1 ) ; \nvar id_2 = this [ c -- ] ; \nprint ( id_3 === undefined ) ; \nprint ( c === 0 ) ; \nvar id_4 = this [ delete "..., source_size=345, parse_opts=0, bytecode_data_p=0xffffc880) at jerryscript/jerry-core/parser/js/js-parser.c:2936 #16 0x566407ec in jerry_parse (resource_name_p=0xffffce8b "/home/reni/.fuzzinator_32283//jerryscript/picireny/14052654147194631846405044687624856458.js", resource_name_length=92, source_p=0x566e5680 <buffer.lto_priv> "var c = 0 ; \nvar id_0 = this [ c ++ ] ; \nprint ( id_1 === undefined ) ; \nprint ( c === 1 ) ; \nvar id_2 = this [ c -- ] ; \nprint ( id_3 === undefined ) ; \nprint ( c === 0 ) ; \nvar id_4 = this [ delete "..., source_size=345, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #17 0x5663d741 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion PARSER_ARGS_EQ (opcode, CBC_HAS_LITERAL_ARG) in parser_emit_cbc_literal
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3048/comments
0
2019-09-04T10:12:11Z
2019-09-05T07:52:59Z
https://github.com/jerryscript-project/jerryscript/issues/3048
489,068,307
3,048
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision e79059c9 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var map = new Map() map.set([ 1.5 ]) ``` ###### Output ```text ICE: Assertion 'uint_ptr % JMEM_ALIGNMENT == 0' failed at jerryscript/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):222. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac87 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566173a1 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566173e2 in jerry_assert_fail (assertion=0x566aa580 "uint_ptr % JMEM_ALIGNMENT == 0", file=0x566aa460 "jerryscript/jerry-core/jmem/jmem-allocator.c", function=0x5667e180 <__func__.4606.lto_priv.499> "jmem_decompress_pointer", line=222) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5661654b in jmem_decompress_pointer (compressed_pointer=4124051090) at jerryscript/jerry-core/jmem/jmem-allocator.c:222 #7 0x5666e0b4 in ecma_property_hashmap_find (hashmap_p=0xf5f006a0, name_p=0x27cd, property_real_name_cp=0xffffc030) at jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c:422 #8 0x56667a7b in ecma_find_named_property (obj_p=0xf5f006d0, name_p=0x27cd) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:554 #9 0x5658aea9 in ecma_op_container_to_key (key_arg=4126148307) at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:247 #10 0x5658b431 in ecma_op_container_set (this_arg=4126148595, key_arg=4126148307, value_arg=72, lit_id=LIT_MAGIC_STRING_MAP_UL) at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:395 #11 0x565c20e8 in ecma_builtin_map_prototype_object_set (this_arg=4126148595, key_arg=4126148307, value_arg=72) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c:132 #12 0x565c1f97 in ecma_builtin_map_prototype_dispatch_routine (builtin_routine_id=76, this_arg_value=4126148595, arguments_list=0xffffc1f0, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.inc.h:46 #13 0x56620ee4 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_MAP_PROTOTYPE, builtin_routine_id=76, this_arg_value=4126148595, arguments_list_p=0xffffc1f0, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #14 0x56621145 in ecma_builtin_dispatch_call (obj_p=0xf5f00760, this_arg_value=4126148595, arguments_list_p=0xffffc498, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #15 0x566331de in ecma_op_function_call (func_obj_p=0xf5f00760, this_arg_value=4126148595, arguments_list_p=0xffffc498, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #16 0x565e83a1 in opfunc_call (frame_ctx_p=0xffffc510) at jerryscript/jerry-core/vm/vm.c:581 #17 0x565f9543 in vm_execute (frame_ctx_p=0xffffc510, arg_p=0xffffc764, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3618 #18 0x565f9e47 in vm_run (bytecode_header_p=0xf5101ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0xffffc764, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3738 #19 0x5663353f in ecma_op_function_call (func_obj_p=0xf5f008b0, this_arg_value=72, arguments_list_p=0xffffc764, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #20 0x565e83a1 in opfunc_call (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:581 #21 0x565f9543 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3618 #22 0x565f9e47 in vm_run (bytecode_header_p=0xf4f00f50, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3738 #23 0x565e7638 in vm_run_global (bytecode_p=0xf4f00f50) at jerryscript/jerry-core/vm/vm.c:282 #24 0x56640e26 in jerry_run (func_val=4126148835) at jerryscript/jerry-core/api/jerry.c:570 #25 0x5663d78a in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion uint_ptr % JMEM_ALIGNMENT == 0 in jmem_decompress_pointer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3046/comments
1
2019-09-03T16:44:24Z
2019-09-04T08:41:30Z
https://github.com/jerryscript-project/jerryscript/issues/3046
488,712,540
3,046
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 29758101 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var set = new Set() set.add() set.has([ 1 ]) ``` ###### Output ```text ASAN:DEADLYSIGNAL ================================================================= ==42448==ERROR: AddressSanitizer: SEGV on unknown address 0x00000014 (pc 0x566f1cfe bp 0xffc645b8 sp 0xffc644f0 T0) ==42448==The signal is caused by a READ memory access. ==42448==Hint: address points to the zero page. #0 0x566f1cfd in ecma_find_named_property jerryscript/jerry-core/ecma/base/ecma-helpers.c:586 #1 0x56614ea8 in ecma_op_container_to_key jerryscript/jerry-core/ecma/operations/ecma-container-object.c:247 #2 0x566152fa in ecma_op_container_has jerryscript/jerry-core/ecma/operations/ecma-container-object.c:364 #3 0x56657a51 in ecma_builtin_set_prototype_object_has jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c:115 #4 0x56657923 in ecma_builtin_set_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.inc.h:45 #5 0x566aaee3 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #6 0x566ab144 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #7 0x566bd1dd in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #8 0x566723a0 in opfunc_call jerryscript/jerry-core/vm/vm.c:581 #9 0x56683542 in vm_execute jerryscript/jerry-core/vm/vm.c:3618 #10 0x56683e46 in vm_run jerryscript/jerry-core/vm/vm.c:3738 #11 0x56671637 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #12 0x566cae25 in jerry_run jerryscript/jerry-core/api/jerry.c:570 #13 0x566c7789 in main jerryscript/jerry-main/main-unix.c:743 #14 0xf7774e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #15 0x565f55a0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x165a0) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV jerryscript/jerry-core/ecma/base/ecma-helpers.c:586 in ecma_find_named_property ==42448==ABORTING ``` ###### Backtrace ```text bt #0 0x56667cfe in ecma_find_named_property (obj_p=0xf5f00460, name_p=0x27cd) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:586 #1 0x5658aea9 in ecma_op_container_to_key (key_arg=4126147683) at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:247 #2 0x5658b2fb in ecma_op_container_has (this_arg=4126148403, key_arg=4126147683, lit_id=LIT_MAGIC_STRING_SET_UL) at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:364 #3 0x565cda52 in ecma_builtin_set_prototype_object_has (this_arg=4126148403, value_arg=4126147683) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c:115 #4 0x565cd924 in ecma_builtin_set_prototype_dispatch_routine (builtin_routine_id=75, this_arg_value=4126148403, arguments_list=0xffffc4d0, arguments_number=2) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.inc.h:45 #5 0x56620ee4 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_SET_PROTOTYPE, builtin_routine_id=75, this_arg_value=4126148403, arguments_list_p=0xffffc4d0, arguments_list_len=2) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #6 0x56621145 in ecma_builtin_dispatch_call (obj_p=0xf5f00670, this_arg_value=4126148403, arguments_list_p=0xffffc770, arguments_list_len=2) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #7 0x566331de in ecma_op_function_call (func_obj_p=0xf5f00670, this_arg_value=4126148403, arguments_list_p=0xffffc770, arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #8 0x565e83a1 in opfunc_call (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:581 #9 0x565f9543 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3618 #10 0x565f9e47 in vm_run (bytecode_header_p=0xf4f03c00, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3738 #11 0x565e7638 in vm_run_global (bytecode_p=0xf4f03c00) at jerryscript/jerry-core/vm/vm.c:282 #12 0x56640e26 in jerry_run (func_val=4126148787) at jerryscript/jerry-core/api/jerry.c:570 #13 0x5663d78a in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
SEGV in ecma_find_named_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3045/comments
1
2019-09-03T15:57:19Z
2019-09-04T08:41:30Z
https://github.com/jerryscript-project/jerryscript/issues/3045
488,690,376
3,045
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 29758101 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript [0, 5.5, 0].length = { valueOf: function () { return 1 } } ``` ###### Output ```text ================================================================= ==29245==ERROR: AddressSanitizer: heap-use-after-free on address 0xf5200650 at pc 0x56638243 bp 0xfffdc4b8 sp 0xfffdc4a8 READ of size 4 at 0xf5200650 thread T0 #0 0x56638242 in jmem_pools_collect_empty jerryscript/jerry-core/jmem/jmem-poolman.c:165 #1 0x56637dc2 in jmem_pools_finalize jerryscript/jerry-core/jmem/jmem-poolman.c:44 #2 0x566373ff in jmem_finalize jerryscript/jerry-core/jmem/jmem-allocator.c:161 #3 0x566611bd in jerry_cleanup jerryscript/jerry-core/api/jerry.c:231 #4 0x5665efaf in main jerryscript/jerry-main/main-unix.c:941 #5 0xf777ae80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #6 0x5658c5a0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x165a0) 0xf5200650 is located 0 bytes inside of 8-byte region [0xf5200650,0xf5200658) freed by thread T0 here: #0 0xf7a40b74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x56637a5d in jmem_heap_free_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:481 #2 0x56638257 in jmem_pools_collect_empty jerryscript/jerry-core/jmem/jmem-poolman.c:168 #3 0x56637dc2 in jmem_pools_finalize jerryscript/jerry-core/jmem/jmem-poolman.c:44 #4 0x566373ff in jmem_finalize jerryscript/jerry-core/jmem/jmem-allocator.c:161 #5 0x566611bd in jerry_cleanup jerryscript/jerry-core/api/jerry.c:231 #6 0x5665efaf in main jerryscript/jerry-main/main-unix.c:941 #7 0xf777ae80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf7a40f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x56637715 in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x566377f3 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x56637863 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:312 #4 0x56637f4c in jmem_pools_alloc jerryscript/jerry-core/jmem/jmem-poolman.c:85 #5 0x5661aee9 in ecma_alloc_number jerryscript/jerry-core/ecma/base/ecma-alloc.c:57 #6 0x566839b4 in ecma_create_float_number jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:455 #7 0x56684d39 in ecma_copy_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:860 #8 0x56684fb6 in ecma_fast_copy_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:903 #9 0x5660c05c in vm_loop jerryscript/jerry-core/vm/vm.c:1121 #10 0x5661a4e2 in vm_execute jerryscript/jerry-core/vm/vm.c:3612 #11 0x5661ae46 in vm_run jerryscript/jerry-core/vm/vm.c:3738 #12 0x56608637 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #13 0x56661e25 in jerry_run jerryscript/jerry-core/api/jerry.c:570 #14 0x5665e789 in main jerryscript/jerry-main/main-unix.c:743 #15 0xf777ae80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/jmem/jmem-poolman.c:165 in jmem_pools_collect_empty Shadow bytes around the buggy address: 0x3ea40070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea40080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea40090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea400a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea400b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ea400c0: fa fa 00 00 fa fa fd fa fa fa[fd]fa fa fa fd fa 0x3ea400d0: fa fa fd fa fa fa 00 00 fa fa fd fa fa fa fd fa 0x3ea400e0: fa fa fd fa fa fa 00 00 fa fa fd fa fa fa 00 00 0x3ea400f0: fa fa fd fd fa fa 00 00 fa fa fa fa fa fa fa fa 0x3ea40100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea40110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==29245==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-use-after-free in jmem_pools_collect_empty
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3044/comments
1
2019-09-03T15:51:14Z
2019-09-03T16:30:52Z
https://github.com/jerryscript-project/jerryscript/issues/3044
488,687,083
3,044
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 29758101 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var map = new Map() map.set([0]) ``` ###### Output ```text ICE: Assertion 'ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT || ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT_STRING' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_free_value):1080. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac87 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566173a1 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566173e2 in jerry_assert_fail (assertion=0x566b6d00 "ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT || ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT_STRING", file=0x566b65e0 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x56678ae0 <__func__.3788.lto_priv.690> "ecma_free_value", line=1080) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56664e2e in ecma_free_value (value=3200171710) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1079 #7 0x56664e8f in ecma_free_value_if_not_object (value=3200171710) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1114 #8 0x5664b14e in ecma_free_fast_access_array (object_p=0xf5f00760) at jerryscript/jerry-core/ecma/base/ecma-gc.c:588 #9 0x5664b3b6 in ecma_gc_free_object (object_p=0xf5f00760) at jerryscript/jerry-core/ecma/base/ecma-gc.c:621 #10 0x5664cd56 in ecma_gc_run () at jerryscript/jerry-core/ecma/base/ecma-gc.c:1066 #11 0x5666abf7 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:63 #12 0x5663ffa3 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:216 #13 0x5663dfb0 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:941 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT || ecma_get_value_type_field (value) == ECMA_TYPE_DIRECT_STRING in ecma_free_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3043/comments
0
2019-09-03T14:55:18Z
2019-09-04T08:41:30Z
https://github.com/jerryscript-project/jerryscript/issues/3043
488,655,613
3,043
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 29758101 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript function createMap () { var map = new Map() for (var i = Array(); ; $) { map.set(i) } } createMap() ``` ###### Output ```text ICE: Assertion 'size > 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_free_block_internal):460. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac87 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566173a1 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566173e2 in jerry_assert_fail (assertion=0x566aa6e0 "size > 0", file=0x566aa620 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5667e200 <__func__.4639.lto_priv.109> "jmem_heap_free_block_internal", line=460) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566168ff in jmem_heap_free_block_internal (ptr=0xf5f00670, size=0) at jerryscript/jerry-core/jmem/jmem-heap.c:460 #7 0x56616d92 in jmem_heap_free_block (ptr=0xf5f00670, size=0) at jerryscript/jerry-core/jmem/jmem-heap.c:676 #8 0x5664b16f in ecma_free_fast_access_array (object_p=0xf5f007f0) at jerryscript/jerry-core/ecma/base/ecma-gc.c:591 #9 0x5664b3b6 in ecma_gc_free_object (object_p=0xf5f007f0) at jerryscript/jerry-core/ecma/base/ecma-gc.c:621 #10 0x5664cd56 in ecma_gc_run () at jerryscript/jerry-core/ecma/base/ecma-gc.c:1066 #11 0x5666abf7 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:63 #12 0x5663ffa3 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:216 #13 0x5663dfb0 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:941 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion size > 0 in jmem_heap_free_block_internal
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3040/comments
0
2019-09-03T13:38:01Z
2019-09-03T17:43:42Z
https://github.com/jerryscript-project/jerryscript/issues/3040
488,611,700
3,040
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 29758101 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset --builddir=build_gcc_asan_es2015 ``` ###### Test case ```javascript var a = [ ]; for (var i = 0; i < 200; ++i) a[ i ] = 0; a.length = 1; for (var i = 0; ; ++i) a[ i ] = 0; ``` ###### Output ```text ICE: Assertion 'ecma_is_value_array_hole (values_p[index])' failed at jerryscript/jerry-core/ecma/operations/ecma-array-object.c(ecma_fast_array_set_property):275. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac87 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566173a1 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566173e2 in jerry_assert_fail (assertion=0x566add80 "ecma_is_value_array_hole (values_p[index])", file=0x566adb40 "jerryscript/jerry-core/ecma/operations/ecma-array-object.c", function=0x5667bce0 <__func__.4070.lto_priv.139> "ecma_fast_array_set_property", line=275) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56628bae in ecma_fast_array_set_property (object_p=0xf5f008b0, property_name_p=0x35, value=80) at jerryscript/jerry-core/ecma/operations/ecma-array-object.c:275 #7 0x56605416 in ecma_op_object_put (object_p=0xf5f008b0, property_name_p=0x35, value=80, is_throw=false) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1003 #8 0x565e7570 in vm_op_set_value (object=4126148787, property=16, value=80, is_strict=false) at jerryscript/jerry-core/vm/vm.c:212 #9 0x565f7b77 in vm_loop (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:3345 #10 0x565f94e3 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3612 #11 0x565f9e47 in vm_run (bytecode_header_p=0xf51035a0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3738 #12 0x565e7638 in vm_run_global (bytecode_p=0xf51035a0) at jerryscript/jerry-core/vm/vm.c:282 #13 0x56640e26 in jerry_run (func_val=4126149027) at jerryscript/jerry-core/api/jerry.c:570 #14 0x5663d78a in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_is_value_array_hole (values_p[index]) in ecma_fast_array_set_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3039/comments
0
2019-09-03T12:57:09Z
2019-09-03T15:47:46Z
https://github.com/jerryscript-project/jerryscript/issues/3039
488,590,139
3,039
[ "jerryscript-project", "jerryscript" ]
Hi, I have some builtin modules such as `gpio`, `i2c`, `spi`, etc and I want to know how to support ES6's `import from` like below: ```js import {I2C} from 'i2c' ``` I had read https://jerryscript.net/ext-reference-module/ and tried `JERRYX_NATIVE_MODULE ` like below: ```c static jerry_value_t i2c_module_on_resolve (void) { return ...; } JERRYX_NATIVE_MODULE (i2c, i2c_module_on_resolve) void main() { ... i2c_register(); ... } ``` But `SyntaxError: Requested module not found. [<anonymous>:1:19]` error returned when try to use `import {I2C} from 'i2c'`. Actually I already have my own module loader `require()`, so when user try to use `import` I want to call `require()` internally. Any examples, advices or suggestions? Thanks in advance.
How to support builtin modules for ES6 import
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3034/comments
11
2019-09-02T04:28:20Z
2019-10-02T10:20:44Z
https://github.com/jerryscript-project/jerryscript/issues/3034
487,989,032
3,034
[ "jerryscript-project", "jerryscript" ]
Hello, Is there a way to get error position (row, column) in code? For example: ``` jerry_value t parsed_code = ...; jerry_value_t result = jerry_run(parsed_code); if (jerry_value_is_error(result)) { // want to know the position where the error was originally raised } ``` I'm developing JavaScript IDE to support JerryScript. In here, I want to show error position in the Code Editor directly. Moreover, I'm using Babel and Webpack to support users can use latest ECMAScript standard and use `import`, `require()` for import third-party modules. The transpiled and bundled code is executed by JerryScript. If there was an error, I need to show the error position in the original code (not transpiled/bundled) using `source-map`. P.S.) Here is the project I'm working: https://kameleon.io Thanks,
How to get error position (row, column) in code?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3011/comments
11
2019-08-09T06:56:03Z
2021-12-06T20:46:07Z
https://github.com/jerryscript-project/jerryscript/issues/3011
478,828,107
3,011
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision b6fc4e1 ###### Build platform (Linux 3.10.0-957.12.1.el7.x86_64 x86_64) ###### Test case ``` var Func = function() { var reg = /[\0-\1]/; //jerry throw syntax error. // var reg = /[\0-\0]/; //jerry no errors. // var reg = /[\0]/; //jerry no errors. // var reg = /[\0\1]/; //jerry no errors. var str = 'hello world\1'; print(str.search(reg)); }; Func(); ``` ###### Excepted behavior Outputs '11' . ###### Backtrace Script Error: SyntaxError: Invalid regular expression. [line: 2, column: 15] ###### Description When executing the above testcase, the expected output should be '11'. However, jerry throws a SyntaxError while other JS engines such as V8, SpiderMonkey, JavaScriptCore output “11”. I suspect that it’s a bug of jerry.
A suspected bug of jerry regex engine
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3001/comments
0
2019-08-01T09:36:36Z
2019-10-03T07:28:00Z
https://github.com/jerryscript-project/jerryscript/issues/3001
475,578,343
3,001
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c64ee882 ###### Build platform Linux-5.0.0-20-generic-x86_64-with-debian-buster-sid ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript throw new SyntaxError ( "𐐀" ) ; ``` ###### Output ```text jerry: jerryscript/jerry-main/main-unix.c:155: print_unhandled_exception: Assertion `string_end == err_str_size' failed. ``` ###### Backtrace ```text bt #0 0xf7fd3939 in __kernel_vsyscall () #1 0xf77bf182 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77a92b6 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0xf77a91c1 in ?? () from /lib/i386-linux-gnu/libc.so.6 #4 0xf77b6fd9 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6 #5 0x5656a855 in print_unhandled_exception (error_value=4113565971) at jerryscript/jerry-main/main-unix.c:155 #6 0x5656d117 in main (argc=2, argv=0xffffcf14) at jerryscript/jerry-main/main-unix.c:923 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion string_end == err_str_size in print_unhandled_exception
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2993/comments
0
2019-07-29T09:30:31Z
2019-07-30T17:48:57Z
https://github.com/jerryscript-project/jerryscript/issues/2993
473,947,138
2,993
[ "jerryscript-project", "jerryscript" ]
em as follow, `super.getid.call(this, a)` error: ```js class A { constructor() { this.id = 10; } getid(a) { if (typeof a === 'number') { this.id += a; } return this.id; } } class B extends A { constructor() { super(); this.id = 100; } getid(a) { // 1. error return super.getid.call(this, a); // 2. ok return super.getid.call(this); // 3. ok var fn = super.getid.bind(this); return fn(a); } } var s = new B(); console.log(s.getid(1)); ```
BUG of super call with argument.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2990/comments
1
2019-07-26T10:05:59Z
2019-07-31T13:13:07Z
https://github.com/jerryscript-project/jerryscript/issues/2990
473,281,551
2,990
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 75728980 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var eval = eval.bind() eval('import { c } from "tests/jerry/es2015/module-export-01.js";') ``` ###### Output ```text Script Error: SyntaxError: Unexported or circular import request. ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fd832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fecc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a232 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5660bd75 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5660bdb6 in jerry_assert_fail (assertion=0x566a53c0 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566a5360 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5667a500 <__func__.4561.lto_priv.505> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5660b339 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143 #7 0x5660af64 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x56642abe in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:231 #9 0x566408cb in main (argc=3, argv=0xffffcc34) at jerryscript/jerry-main/main-unix.c:941 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2975/comments
0
2019-07-16T08:02:04Z
2019-07-17T12:11:14Z
https://github.com/jerryscript-project/jerryscript/issues/2975
468,506,355
2,975
[ "jerryscript-project", "jerryscript" ]
Jerry version: ``` Checked revision: c304b9a3 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g --strip=off \ --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold \ --error-messages=on --profile=es2015-subset ``` OS: ``` Linux 4.18.0-25-generic #26~18.04.1-Ubuntu SMP \ Thu Jun 27 07:28:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux ``` Test case - test_03.js: ``` JSON.stringify(10, Array) ``` Backtrace: ``` $ ./build/bin/jerry /share/js_validation/test_03.js ASAN:DEADLYSIGNAL ================================================================= ==98861==ERROR: AddressSanitizer: stack-overflow on address 0xff364f20 (pc 0xf79c9ea8 bp 0xff365348 sp 0xff364f00 T0) #0 0xf79c9ea7 in malloc (/usr/lib32/libasan.so.4+0xe5ea7) #1 0x566192c1 in jmem_heap_alloc_block_internal /share/repos/jerryscript/jerry-core/jmem/jmem-heap.c:293 #2 0x56619391 in jmem_heap_gc_and_alloc_block /share/repos/jerryscript/jerry-core/jmem/jmem-heap.c:327 #3 0x56619466 in jmem_heap_alloc_block /share/repos/jerryscript/jerry-core/jmem/jmem-heap.c:373 #4 0x565f80f2 in ecma_alloc_property_pair /share/repos/jerryscript/jerry-core/ecma/base/ecma-alloc.c:198 #5 0x56675490 in ecma_create_property /share/repos/jerryscript/jerry-core/ecma/base/ecma-helpers.c:457 #6 0x56675b61 in ecma_create_named_data_property /share/repos/jerryscript/jerry-core/ecma/base/ecma-helpers.c:543 #7 0x5664a3cf in ecma_op_general_object_define_own_property /share/repos/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:346 #8 0x5663cbcd in ecma_op_array_object_define_own_property /share/repos/jerryscript/jerry-core/ecma/operations/ecma-array-object.c:343 #9 0x5660914b in ecma_op_object_define_own_property /share/repos/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1219 #10 0x5662c085 in ecma_builtin_helper_def_prop /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:848 #11 0x5663c20f in ecma_op_create_array_object /share/repos/jerryscript/jerry-core/ecma/operations/ecma-array-object.c:119 #12 0x5660398c in ecma_builtin_array_dispatch_construct /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array.c:101 #13 0x56603925 in ecma_builtin_array_dispatch_call /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array.c:87 #14 0x56635af5 in ecma_builtin_dispatch_call /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1051 #15 0x56644416 in ecma_op_function_call /share/repos/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:727 #16 0x566310e2 in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1405 #17 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #18 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #19 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #20 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #21 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #22 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #23 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #24 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #25 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #26 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #27 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #28 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 [ ... duplicate lines ... ] #239 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #240 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #241 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #242 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #243 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #244 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #245 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #246 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #247 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 #248 0x5663166b in ecma_builtin_json_str /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1499 #249 0x56632801 in ecma_builtin_json_array /share/repos/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1751 SUMMARY: AddressSanitizer: stack-overflow (/usr/lib32/libasan.so.4+0xe5ea7) in malloc ==98861==ABORTING ``` When creating a non-ASAN binary with build command: ``` ./tools/build.py --clean --debug --compile-flag=-m32 \ --profile=es2015-subset --system-allocator=on \ --error-messages=on --logging=on ``` Jerry runs for a while then it segfaults: ``` $ ./build/bin/jerry /share/js_validation/test_03.js Segmentation fault (core dumped) ``` A similar behaviour can be observed when running the test in node: ``` $ node /share/js_validation/test_03.js /share/js_validation/test_03.js:1 (function (exports, require, module, __filename, __dirname) { JSON.stringify(10, Array) ^ RangeError: Maximum call stack size exceeded at JSON.stringify (<anonymous>) at Object.<anonymous> (/share/js_validation/test_03.js:1:68) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:279:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3) $ node --version v10.10.0 ```
JSON.stringify with replacer = Array causes segmentation fault
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2963/comments
3
2019-07-11T12:25:38Z
2019-07-23T13:31:39Z
https://github.com/jerryscript-project/jerryscript/issues/2963
466,860,903
2,963
[ "jerryscript-project", "jerryscript" ]
- Regular expression objects can only capture 567 bytes of content. Is this a bug or design so? - em. ```js var str = ` <!--560+7--> <!-- 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 0123456789 --> <!--561+7--> <!-- 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890 --> `; var comment = /<!--(?:[^-]|(?:-(?!->)))*-->/g; str = str.replace(comment, function(tag, index){ console.log(index, '-', tag); return `<tag index=${index}/>`; }); console.log(str); ``` - result: ``` 0 - <!--560+7--> 14 - <!-- 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789 0123456789 --> 611 - <!--561+7--> error: FATAL ERROR: thread 401001b[regular.js] stack overflow. ```
Regular object can only capture 567 bytes buffer.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2957/comments
3
2019-07-10T06:30:29Z
2019-11-21T09:01:38Z
https://github.com/jerryscript-project/jerryscript/issues/2957
466,125,014
2,957
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 2b8c4286 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var x = 1 / 3 do { m = new Map([ ]) } while (x === 3 / 9) $ ``` ###### Output ``` ICE: Assertion 'ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):774. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7800832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7801cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a242 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56612f28 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612f69 in jerry_assert_fail (assertion=0x566b1c40 "ecma_is_value_object (value)", file=0x566b1660 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x56674ae0 <__func__.3642.lto_priv.706> "ecma_get_object_from_value", line=774) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5665fc28 in ecma_get_object_from_value (value=3200171710) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:774 #7 0x5664887f in ecma_gc_mark_container_object (object_p=0xf5f05aa0) at jerryscript/jerry-core/ecma/base/ecma-gc.c:255 #8 0x56648de7 in ecma_gc_mark (object_p=0xf5f05aa0) at jerryscript/jerry-core/ecma/base/ecma-gc.c:361 #9 0x5664ab9f in ecma_gc_run (severity=JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW) at jerryscript/jerry-core/ecma/base/ecma-gc.c:956 #10 0x5664b123 in ecma_free_unused_memory (severity=JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW) at jerryscript/jerry-core/ecma/base/ecma-gc.c:1094 #11 0x56612458 in jmem_run_free_unused_memory_callbacks (severity=JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW) at jerryscript/jerry-core/jmem/jmem-allocator.c:267 #12 0x566126e2 in jmem_heap_gc_and_alloc_block (size=16, ret_null_on_error=false) at jerryscript/jerry-core/jmem/jmem-heap.c:324 #13 0x566127c5 in jmem_heap_alloc_block (size=16) at jerryscript/jerry-core/jmem/jmem-heap.c:373 #14 0x56612ba6 in jmem_pools_alloc (size=16) at jerryscript/jerry-core/jmem/jmem-poolman.c:104 #15 0x565f606b in ecma_alloc_object () at jerryscript/jerry-core/ecma/base/ecma-alloc.c:84 #16 0x56629a61 in ecma_op_container_create_internal_object () at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:46 #17 0x56629bf7 in ecma_op_container_create (arguments_list_p=0xffffc7e4, arguments_list_len=1, lit_id=LIT_MAGIC_STRING_MAP_UL, proto_id=ECMA_BUILTIN_ID_MAP_PROTOTYPE) at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:73 #18 0x565c3388 in ecma_builtin_map_dispatch_construct (arguments_list_p=0xffffc7e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map.c:62 #19 0x5662107a in ecma_builtin_dispatch_construct (obj_p=0xf5f009d0, arguments_list_p=0xffffc7e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1075 #20 0x56632ad5 in ecma_op_function_construct (func_obj_p=0xf5f009d0, this_arg_value=72, arguments_list_p=0xffffc7e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1094 #21 0x565e4eed in opfunc_construct (frame_ctx_p=0xffffc860) at jerryscript/jerry-core/vm/vm.c:656 #22 0x565f56a4 in vm_execute (frame_ctx_p=0xffffc860, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3586 #23 0x565f5f87 in vm_run (bytecode_header_p=0xf5302a30, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3694 #24 0x565e3c15 in vm_run_global (bytecode_p=0xf5302a30) at jerryscript/jerry-core/vm/vm.c:273 #25 0x5663f51b in jerry_run (func_val=4126149123) at jerryscript/jerry-core/api/jerry.c:550 #26 0x5663bf9d in main (argc=3, argv=0xffffcc94) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_is_value_object (value) in ecma_get_object_from_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2951/comments
0
2019-07-08T09:54:04Z
2019-07-11T10:32:18Z
https://github.com/jerryscript-project/jerryscript/issues/2951
465,163,190
2,951
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 2b8c4286 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var str = new Map() var iterator = str[ Symbol.iterator ]() iterator.next.call({ }) ``` ###### Backtrace ```text ================================================================= ==27354==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5200084 at pc 0x566b9653 bp 0xffb19e08 sp 0xffb19df8 READ of size 4 at 0xf5200084 thread T0 #0 0x566b9652 in ecma_op_container_iterator_next jerryscript/jerry-core/ecma/operations/ecma-container-object.c:707 #1 0x56650e97 in ecma_builtin_map_iterator_prototype_object_next jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c:58 #2 0x56650e50 in ecma_builtin_map_iterator_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.inc.h:30 #3 0x566aeb92 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #4 0x566aedf3 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #5 0x566bfca4 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:727 #6 0x56648be3 in ecma_builtin_function_prototype_object_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:219 #7 0x566484e9 in ecma_builtin_function_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.inc.h:42 #8 0x566aeb92 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #9 0x566aedf3 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #10 0x566bfca4 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:727 #11 0x5667296b in opfunc_call jerryscript/jerry-core/vm/vm.c:572 #12 0x56683683 in vm_execute jerryscript/jerry-core/vm/vm.c:3574 #13 0x56683f86 in vm_run jerryscript/jerry-core/vm/vm.c:3694 #14 0x56671c14 in vm_run_global jerryscript/jerry-core/vm/vm.c:273 #15 0x566cd51a in jerry_run jerryscript/jerry-core/api/jerry.c:550 #16 0x566c9f9c in main jerryscript/jerry-main/main-unix.c:742 #17 0xf77a0e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #18 0x565f9160 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x16160) 0xf5200084 is located 4 bytes to the right of 16-byte region [0xf5200070,0xf5200080) allocated by thread T0 here: #0 0xf7a67f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566a061f in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:293 #2 0x566a06ef in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:327 #3 0x566a07c4 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:373 #4 0x566a0ba5 in jmem_pools_alloc jerryscript/jerry-core/jmem/jmem-poolman.c:104 #5 0x5668406a in ecma_alloc_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:84 #6 0x566efeff in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:85 #7 0x566760d1 in vm_loop jerryscript/jerry-core/vm/vm.c:1185 #8 0x56683623 in vm_execute jerryscript/jerry-core/vm/vm.c:3568 #9 0x56683f86 in vm_run jerryscript/jerry-core/vm/vm.c:3694 #10 0x56671c14 in vm_run_global jerryscript/jerry-core/vm/vm.c:273 #11 0x566cd51a in jerry_run jerryscript/jerry-core/api/jerry.c:550 #12 0x566c9f9c in main jerryscript/jerry-main/main-unix.c:742 #13 0xf77a0e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow jerryscript/jerry-core/ecma/operations/ecma-container-object.c:707 in ecma_op_container_iterator_next Shadow bytes around the buggy address: 0x3ea3ffc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea3ffd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea3ffe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea3fff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea40000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 00 00 =>0x3ea40010:[fa]fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 fa 0x3ea40020: fa fa 00 00 fa fa 00 fa fa fa 00 00 fa fa 00 01 0x3ea40030: fa fa 00 02 fa fa 00 03 fa fa 00 00 fa fa 00 03 0x3ea40040: fa fa 00 01 fa fa 00 03 fa fa 00 00 fa fa 00 02 0x3ea40050: fa fa 00 01 fa fa 00 02 fa fa 00 00 fa fa 00 01 0x3ea40060: fa fa 00 01 fa fa 00 03 fa fa 00 00 fa fa 00 01 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==27354==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-buffer-overflow in ecma_op_container_iterator_next
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2950/comments
0
2019-07-08T09:50:57Z
2019-07-11T09:33:18Z
https://github.com/jerryscript-project/jerryscript/issues/2950
465,161,737
2,950
[ "jerryscript-project", "jerryscript" ]
### Versions: `b6fc4e1` `e944cda` ### Testcase: ```` 1. var foo = function () { 2. var reg1 = new RegExp("{"); 3. print(reg1); 4. var reg2 = new RegExp("A{"); 5. print(reg2); 6. } 7. foo(); ```` ### Command: `./jerryscript/build/bin/jerry testcase.js` ### Result: ```` /{/ Exception backtrace: 0: testcase.js:4 1: testcase.js:7 Script Error: SyntaxError: invalid quantifier ```` ### Description: Why does jerry report an error on line 4 but not on line 2? Maybe, jerryscript should not throw an exception on line 4.
problem about regular expression
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2949/comments
2
2019-07-08T09:48:15Z
2019-10-18T09:36:18Z
https://github.com/jerryscript-project/jerryscript/issues/2949
465,160,476
2,949
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision ``` GIT hash: 2b8c4286 ``` ###### Build platform ``` Linux-4.15.0-51-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Build steps ```sh ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case: ```javascript new (new Object()).constructor().constructor('abcdefghi').repeat(-4956799914495204378) ``` ###### Backtrace: ```text ================================================================= ==28205==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4afec00 at pc 0xf79aa587 bp 0xff8293a8 sp 0xff828f78 WRITE of size 9 at 0xf4afec00 thread T0 #0 0xf79aa586 (/usr/lib32/libasan.so.5+0x9c586) #1 0x5665fd8c in ecma_string_copy_to_cesu8_buffer jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1173 #2 0x56704cbf in ecma_builtin_string_prototype_object_repeat jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2169 #3 0x566fd38d in ecma_builtin_string_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h:59 #4 0x5667e6e8 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #5 0x5667e946 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #6 0x5668f720 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:727 #7 0x566c60fd in opfunc_call jerryscript/jerry-core/vm/vm.c:572 #8 0x566d6bc6 in vm_execute jerryscript/jerry-core/vm/vm.c:3574 #9 0x566d746a in vm_run jerryscript/jerry-core/vm/vm.c:3694 #10 0x566c5402 in vm_run_global jerryscript/jerry-core/vm/vm.c:273 #11 0x56647c11 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #12 0x5664490b in main jerryscript/jerry-main/main-unix.c:742 #13 0xf772e750 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1e750) #14 0x56642190 in _start (jerryscript/build/bin/jerry+0x15190) 0xf4afec00 is located 0 bytes to the right of 7390208-byte region [0xf43f2800,0xf4afec00) allocated by thread T0 here: #0 0xf7a201cf in __interceptor_malloc (/usr/lib32/libasan.so.5+0x1121cf) #1 0x566a9b46 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:293 #2 0x566a9bab in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:327 #3 0x566a9c7d in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:373 #4 0x56704c8a in ecma_builtin_string_prototype_object_repeat jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2163 #5 0x566fd38d in ecma_builtin_string_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h:59 #6 0x5667e6e8 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #7 0x5667e946 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #8 0x5668f720 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:727 #9 0x566c60fd in opfunc_call jerryscript/jerry-core/vm/vm.c:572 #10 0x566d6bc6 in vm_execute jerryscript/jerry-core/vm/vm.c:3574 #11 0x566d746a in vm_run jerryscript/jerry-core/vm/vm.c:3694 #12 0x566c5402 in vm_run_global jerryscript/jerry-core/vm/vm.c:273 #13 0x56647c11 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #14 0x5664490b in main jerryscript/jerry-main/main-unix.c:742 #15 0xf772e750 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1e750) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.5+0x9c586) Shadow bytes around the buggy address: 0x3e95fd30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e95fd40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e95fd50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e95fd60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e95fd70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x3e95fd80:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e95fd90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e95fda0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e95fdb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e95fdc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e95fdd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==28205==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
heap-buffer-overflow in ecma_string_copy_to_cesu8_buffer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2948/comments
0
2019-07-05T15:28:40Z
2019-07-11T09:32:12Z
https://github.com/jerryscript-project/jerryscript/issues/2948
464,689,207
2,948
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision ``` GIT hash: 2b8c4286 ``` ###### Build platform ``` Linux-4.15.0-51-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Build steps ```sh ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case: ```javascript new Uint32Array(Array(undefined, 9040650076)).findIndex(function (p_0) { return p_0 }) ``` ###### Backtrace: ```text ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd3939 in __kernel_vsyscall () (gdb) bt #0 0xf7fd3939 in __kernel_vsyscall () #1 0xf77bf182 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77a92b6 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56662f10 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565d2162 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565d21a3 in jerry_assert_fail (assertion=0x566873a0 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x56687340 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x56687440 <__func__.4585> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565d1aef in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143 #7 0x565d186a in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5656f242 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:231 #9 0x5656d1a4 in main (argc=3, argv=0xffffcf94) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2947/comments
0
2019-07-05T15:22:17Z
2019-07-11T09:31:05Z
https://github.com/jerryscript-project/jerryscript/issues/2947
464,686,821
2,947
[ "jerryscript-project", "jerryscript" ]
var timestamp = Date.parse('Wed, 03 Jul 2019 03:15:44 GMT'); console.log(timestamp); // Result: NaN // Expected: 1562123744000
Date.parse() should handle UTC date string format
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2946/comments
5
2019-07-05T05:12:47Z
2019-11-26T12:04:12Z
https://github.com/jerryscript-project/jerryscript/issues/2946
464,464,013
2,946
[ "jerryscript-project", "jerryscript" ]
Hi, wondering are theses Syntax "private, public, protected, let, get, set, finally, const, await" supported in the current master branch? Or where can i find the information for which Syntax is supported? Would like to create my own class with some private methods, don't know how to do with Jerryscript. Please HELP, thank you!!
Are these Syntax supported in the current master branch?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2945/comments
5
2019-07-05T01:41:49Z
2019-07-09T23:29:44Z
https://github.com/jerryscript-project/jerryscript/issues/2945
464,428,413
2,945
[ "jerryscript-project", "jerryscript" ]
### version: `351acdf`, `b6fc4e1`, `e944cda` ### Testcase: ```` 1. var foo = function () { 2. var c = 0; 3. var p1 = this[c]; 4. print(p1); 5. var p2 = this[c++]; 6. print(p2); 7. }; 8. foo(); ```` ### Command: ```` ./jerryscript/build/bin/jerry testcase.js ```` ### Result: ```` undefined Exception backtrace: 0: 20190612/373821.js:5 1: 20190612/373821.js:9 Script Error: ReferenceError: Undefined reference. ```` ### Comment: Both variable p1 and variable p2 should be `undefined`, but jerry throws an exception on line 5. Other more, other engines do not throw exception on line 5, such as v8, spiderMonkey, chakra, javascriptCore.
Expression c++ is not recognized correctly
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2937/comments
0
2019-07-01T07:44:08Z
2019-07-04T16:26:47Z
https://github.com/jerryscript-project/jerryscript/issues/2937
462,562,865
2,937
[ "jerryscript-project", "jerryscript" ]
When using UTF-8 variable name, the "jerry_parse" function will returns a value "1073429487", wondering how to get it fixed? ```javascript var 测试 = "您好"; ```
UTF-8 variable name error
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2936/comments
16
2019-07-01T01:49:42Z
2019-07-07T22:47:12Z
https://github.com/jerryscript-project/jerryscript/issues/2936
462,475,542
2,936
[ "jerryscript-project", "jerryscript" ]
Hello, If my understanding is correct, in the jerryscript implementation, if an error is thrown when resolving a promise, it will only be passed to the rejection handler (if there is one registered). If there is no promise rejection registered, the error is silently ignored. I am looking for a way to make that error return to the calling function, or some other way to signal it. My approach was to change `ecma_reject_promise()` to take an additional out parameter telling whether the rejection was handled or not. `ecma_promise_trigger_reactions()` sets this parameter to `false` in case the reactions collection was empty from the start. Based on this, `ecma_promise_reject_handler()` will return an error for unhandled rejections. This works for a snapshot that was loaded, with all the chained promises' reactions registered. In this situation, when a `.then()` handler executes, we can determine whether it has a subsequent `.catch()` rejection handler chained. If it doesn't, `ecma_reject_handler()` returns with an error as expected. This doesn't work for direct function calls. For instance, a scenario like `foo().then()`, where `foo()` calls into a C implementation that returns a rejected promise immediately via `jerry_resolve_or_reject_promise()`. At this point, I noticed `ecma_promise_do_then()` wasn't called yet to register the handlers and schedule the reactions. I would like opinions on this approach. Do you think the current jerry design allows to signal unhandled errors thrown during exceptions, or it's always up the the developer to chain a `.catch()` call for thrown errors? Thank you!
Discussion: Report unhandled promise rejections
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2931/comments
8
2019-06-28T14:17:10Z
2021-01-18T13:59:42Z
https://github.com/jerryscript-project/jerryscript/issues/2931
462,056,947
2,931
[ "jerryscript-project", "jerryscript" ]
```javascript (function() { console.log("Start Benchmark\n"); while(true) { var st = new Date(); var k = 0; for(var i = 0; i < 1000; i++) { for(var j = 0; j < 1000; j++) { //k += j; } } var et = new Date(); var ct = (et- st); console.log("Time:" + ct.toString() + " Count:" + k.toString() + "\n"); } })(); ``` Wrap the code in a function, the code above took about 2 seconds. ```javascript //(function() { console.log("Start Benchmark\n"); while(true) { var st = new Date(); var k = 0; for(var i = 0; i < 1000; i++) { for(var j = 0; j < 1000; j++) { //k += j; } } var et = new Date(); var ct = (et- st); console.log("Time:" + ct.toString() + " Count:" + k.toString() + "\n"); } //})(); ``` But if just executing the code in the second block above, it took 13 seconds to finish, its 6.5x slower than wrapping it into the function.... Any thought? thanks~~~
Strange performance issue
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2930/comments
6
2019-06-27T22:22:29Z
2019-06-28T14:27:48Z
https://github.com/jerryscript-project/jerryscript/issues/2930
461,774,905
2,930
[ "jerryscript-project", "jerryscript" ]
### Steps to reproduce https://jerryscript.net/ shows invalid SSL certificate This issue was noticed while adding link to JerryScript in OpenJSF CPC README in https://github.com/openjs-foundation/cross-project-council/pull/218 ### Expected output The website https://jerryscript.net/ loads without any certificate issues ### Actual output https://jerryscript.net/ shows invalid SSL certificate
jerryscript.net - invalid SSL certificate
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2924/comments
5
2019-06-24T20:32:50Z
2019-07-09T13:15:50Z
https://github.com/jerryscript-project/jerryscript/issues/2924
460,082,326
2,924
[ "jerryscript-project", "jerryscript" ]
As the title suggests, the testcase is: ``` var func = function (number) { "use strict"; number.snippetText = ""; }; func(-334918463); ``` The defination and assignment at the third line leads to an exception when I run this testcase in V8 and SpiderMonkey. But Jerry doesn't throws any exception.
An error should be thrown when defining a property for a read-only variable in strict mode.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2914/comments
4
2019-06-17T13:32:36Z
2019-06-24T09:12:24Z
https://github.com/jerryscript-project/jerryscript/issues/2914
456,937,108
2,914
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 3953fee0 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-51-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript var m = new Map; print(m.set("strItem", { $: 0})); gc(); print(m.get("st" + "rItem")) ``` ###### Backtrace: ```text ================================================================= ==45751==ERROR: AddressSanitizer: heap-use-after-free on address 0xf5400614 at pc 0x567050e3 bp 0xff9d9978 sp 0xff9d9968 READ of size 1 at 0xf5400614 thread T0 #0 0x567050e2 in ecma_find_named_property jerryscript/jerry-core/ecma/base/ecma-helpers.c:607 #1 0x566a557c in ecma_op_object_find_own jerryscript/jerry-core/ecma/operations/ecma-objects.c:522 #2 0x566a5ad7 in ecma_op_object_get jerryscript/jerry-core/ecma/operations/ecma-objects.c:697 #3 0x56688f32 in vm_op_get_value jerryscript/jerry-core/vm/vm.c:102 #4 0x566905ac in vm_loop jerryscript/jerry-core/vm/vm.c:1696 #5 0x5669ac2a in vm_execute jerryscript/jerry-core/vm/vm.c:3561 #6 0x5669b5c9 in vm_run jerryscript/jerry-core/vm/vm.c:3700 #7 0x56689224 in vm_run_global jerryscript/jerry-core/vm/vm.c:267 #8 0x566e0a72 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #9 0x566dd4f4 in main jerryscript/jerry-main/main-unix.c:742 #10 0xf7791e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #11 0x5660cef0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x15ef0) 0xf5400614 is located 4 bytes inside of 24-byte region [0xf5400610,0xf5400628) freed by thread T0 here: #0 0xf7a58b74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x566b71bc in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:504 #2 0x5669b7d7 in ecma_dealloc_property_pair jerryscript/jerry-core/ecma/base/ecma-alloc.c:211 #3 0x566ead1c in ecma_gc_free_object jerryscript/jerry-core/ecma/base/ecma-gc.c:537 #4 0x566ebe64 in ecma_gc_run jerryscript/jerry-core/ecma/base/ecma-gc.c:934 #5 0x566e02f3 in jerry_gc jerryscript/jerry-core/api/jerry.c:295 #6 0x5661b372 in jerryx_handler_gc jerryscript/jerry-ext/handler/handler-gc.c:35 #7 0x566d3618 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:815 #8 0x56689f7b in opfunc_call jerryscript/jerry-core/vm/vm.c:566 #9 0x5669ac8a in vm_execute jerryscript/jerry-core/vm/vm.c:3567 #10 0x5669b5c9 in vm_run jerryscript/jerry-core/vm/vm.c:3700 #11 0x56689224 in vm_run_global jerryscript/jerry-core/vm/vm.c:267 #12 0x566e0a72 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #13 0x566dd4f4 in main jerryscript/jerry-main/main-unix.c:742 #14 0xf7791e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf7a58f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566b6ebd in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:293 #2 0x566b6f8d in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:327 #3 0x566b7062 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:373 #4 0x5669b7b5 in ecma_alloc_property_pair jerryscript/jerry-core/ecma/base/ecma-alloc.c:198 #5 0x56704490 in ecma_create_property jerryscript/jerry-core/ecma/base/ecma-helpers.c:457 #6 0x56704b61 in ecma_create_named_data_property jerryscript/jerry-core/ecma/base/ecma-helpers.c:543 #7 0x5668dc4e in vm_loop jerryscript/jerry-core/vm/vm.c:1260 #8 0x5669ac2a in vm_execute jerryscript/jerry-core/vm/vm.c:3561 #9 0x5669b5c9 in vm_run jerryscript/jerry-core/vm/vm.c:3700 #10 0x56689224 in vm_run_global jerryscript/jerry-core/vm/vm.c:267 #11 0x566e0a72 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #12 0x566dd4f4 in main jerryscript/jerry-main/main-unix.c:742 #13 0xf7791e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/ecma/base/ecma-helpers.c:607 in ecma_find_named_property Shadow bytes around the buggy address: 0x3ea80070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea80080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea80090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ea800c0: fa fa[fd]fd fd fa fa fa 00 00 00 fa fa fa 00 00 0x3ea800d0: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x3ea800e0: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ea800f0: fa fa 00 00 00 04 fa fa 00 00 00 fa fa fa 00 00 0x3ea80100: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x3ea80110: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 03 fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==45751==ABORTING bt No stack. ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-use-after-free in ecma_find_named_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2911/comments
0
2019-06-16T07:53:21Z
2019-06-24T09:13:12Z
https://github.com/jerryscript-project/jerryscript/issues/2911
456,613,693
2,911
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 351acdf5 Build command: ./tools/build.py --clean --debug --error-messages=on --profile=es2015-subset --logging=on ``` ###### OS: ``` Linux-4.15.0-51-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript var map = new Map ; for (var i = 0; i < 15 ; i ++ ) { map.set() } map.forEach ( Number ) ``` ###### Backtrace: ```text ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7800832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7801cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579f84 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566157a6 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566157e7 in jerry_assert_fail (assertion=0x566a3760 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566a3700 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x56678500 <__func__.4545.lto_priv.501> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56614d6a in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143 #7 0x56614995 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5663deee in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:231 #9 0x5663bcfb in main (argc=3, argv=0xffffd1b4) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2910/comments
0
2019-06-13T18:59:50Z
2019-06-21T17:02:07Z
https://github.com/jerryscript-project/jerryscript/issues/2910
455,903,394
2,910
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 351acdf5 Build command: ./tools/build.py --clean --debug --logging=on --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-51-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript import{p0hc"= ``` ###### Backtrace: ```text import{p0hc"= ~~~~~~~~~~~^ Script Error: SyntaxError: Unterminated string literal. [line: 1, column: 12] ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff7dc7535 in __GI_abort () at abort.c:79 #2 0x00005555555cf284 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x000055555558f984 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x000055555558f9d6 in jerry_assert_fail (assertion=0x5555555df198 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x5555555df118 " jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5555555ead20 <__func__.4822> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x000055555558ef77 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143 #6 0x000055555558ebef in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #7 0x000055555555b7f5 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:231 #8 0x000055555555ab89 in main (argc=3, argv=0x7fffffffddc8) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [libFuzzer](https://llvm.org/docs/LibFuzzer.html). </sup>
Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_allocated_size
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2908/comments
0
2019-06-12T15:38:12Z
2019-06-21T12:21:09Z
https://github.com/jerryscript-project/jerryscript/issues/2908
455,286,135
2,908
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: > Checked version: 351acdf > Build command: python tools/build.py --debug --error-messages=on --profile=es2015-subset ###### Test case: ``` 1 var foo = function () { 2 this.timer_ = null; 3 if (this.shouldFire_ && !this.pauseCount_) { 4 this.timer.onstart(); 5 800 = false; 6 7 } 8 }; 9 10 foo(); ``` When run the above testcase, Jerry cannot report the Reference error (line 5) while other JS engines such as V8, SpiderMonkey can.
Can Jerry report the Reference error when parsing JS code?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2906/comments
7
2019-06-12T12:49:44Z
2020-07-06T11:37:25Z
https://github.com/jerryscript-project/jerryscript/issues/2906
455,194,771
2,906
[ "jerryscript-project", "jerryscript" ]
The try-catch block is unable to catch the error when I execute the code shows below, but throw `ERR_REF_COUNT_LIMIT` error . ```` var func = function () { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); f.length = f; try { print("run to try"); print("Using f will give an error: " + f); print("run to 2"); } catch (e) { print("run to catch!") } }; func(); ```` The output is: ```` run to try Error: ERR_REF_COUNT_LIMIT ````
The try-catch block is unable to catch the exception?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2905/comments
6
2019-06-12T12:36:11Z
2019-07-05T10:21:49Z
https://github.com/jerryscript-project/jerryscript/issues/2905
455,188,243
2,905
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 351acdf5 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset --builddir=build_gcc_asan_es2015 ``` ###### OS: ``` Linux-4.15.0-51-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript var b = Symbol.for(); for (var $;;) {$ = $("" + b)}; ``` ###### Backtrace: ```text Script Error: TypeError: Cannot convert a Symbol value to a string. ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7800832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7801cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579f84 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566157a6 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566157e7 in jerry_assert_fail (assertion=0x566b1520 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", file=0x566b14a0 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x56673a20 <__func__.5045.lto_priv.663> "ecma_free_string_list", line=43) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56668041 in ecma_free_string_list (string_list_p=0xf5d00490) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43 #7 0x5666813d in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:61 #8 0x5666700c in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:66 #9 0x5663dcc1 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:216 #10 0x5663bcfb in main (argc=3, argv=0xffffcd54) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p) in ecma_free_string_list
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2902/comments
0
2019-06-11T16:26:10Z
2019-06-19T10:29:59Z
https://github.com/jerryscript-project/jerryscript/issues/2902
454,788,241
2,902
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 351acdf5 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset --builddir=build_gcc_asan_es2015 ``` ###### OS: ``` Linux-4.15.0-51-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript object = new Object ( ) var str = Symbol ( 'foo' ) assert ( object + str === "[object Object]" ) ``` ###### Backtrace: ```text Script Error: TypeError: Cannot convert a Symbol value to a string. ICE: Assertion 'string_p->refs_and_container >= ECMA_STRING_REF_ONE' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c(ecma_deref_ecma_string):992. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7800832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7801cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579f84 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566157a6 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566157e7 in jerry_assert_fail (assertion=0x566adb20 "string_p->refs_and_container >= ECMA_STRING_REF_ONE", file=0x566ada20 "jerryscript/jerry-core/ecma/base/ecma-helpers-string.c", function=0x56672380 <__func__.3322.lto_priv.734> "ecma_deref_ecma_string", line=992) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566573a1 in ecma_deref_ecma_string (string_p=0xf5d00670) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:992 #7 0x5665ff98 in ecma_free_value (value=4124051060) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1043 #8 0x566600f1 in ecma_free_value_if_not_object (value=4124051060) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1090 #9 0x56663cdd in ecma_free_property (object_p=0xf5f00b50, name_cp=4124051248, property_p=0xf5f00a34 "9\035\276\276t\006\320\365c\n\360\365\060\a\320\365P\a\320", <incomplete sequence \365>) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:761 #10 0x56648c69 in ecma_gc_free_object (object_p=0xf5f00b50) at jerryscript/jerry-core/ecma/base/ecma-gc.c:530 #11 0x56649e45 in ecma_gc_run (severity=JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW) at jerryscript/jerry-core/ecma/base/ecma-gc.c:934 #12 0x56667004 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:65 #13 0x5663dcc1 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:216 #14 0x5663bcfb in main (argc=3, argv=0xffffcd54) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion string_p->refs_and_container >= ECMA_STRING_REF_ONE in ecma_deref_ecma_string
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2901/comments
0
2019-06-11T15:51:32Z
2019-06-19T10:29:59Z
https://github.com/jerryscript-project/jerryscript/issues/2901
454,770,825
2,901
[ "jerryscript-project", "jerryscript" ]
- Jerryscript's regular expression not support positive/negative assert, em: ``` /(?<=\?)[^#]+/ ```
Lookbehind not supported in regular expressions
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2900/comments
7
2019-06-10T09:26:35Z
2019-07-02T09:13:07Z
https://github.com/jerryscript-project/jerryscript/issues/2900
454,078,099
2,900
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: b6fc4e13 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-50-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript object = { valueOf: function ( ) { return Symbol ( "foo" ) } }; assert("" + object); ``` ###### Backtrace: ```text Script Error: TypeError: Cannot convert a Symbol value to a string. ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7800832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7801cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579af9 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566149db in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56614a1c in jerry_assert_fail (assertion=0x566afc80 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", file=0x566afc00 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x566722c0 <__func__.5035.lto_priv.673> "ecma_free_string_list", line=43) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566668f4 in ecma_free_string_list (string_list_p=0xf5d00710) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43 #7 0x56666a30 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:63 #8 0x566658bf in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:66 #9 0x5663c574 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:216 #10 0x5663a5ae in main (argc=3, argv=0xffffcbe4) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p) in ecma_free_string_list
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2897/comments
0
2019-06-05T06:17:02Z
2019-06-11T15:42:15Z
https://github.com/jerryscript-project/jerryscript/issues/2897
452,331,350
2,897
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: b6fc4e13 Build command: ./tools/build.py --clean --debug --compile-flag=-m32 \ --profile=es2015-subset --system-allocator=on \ --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-47-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript export {} from "dummy.js"; export {} from "tests/jerry/es2015/module-export-04.js" ``` Note: The test case must be executed from the root directory of JerryScript, since the file in the first export expression must be non-existent source, while the second one must exist. ###### Backtrace: ```text Error: failed to open file: dummy.js ICE: Assertion 'ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):774. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655cded in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0ab5 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0aef in jerry_assert_fail (assertion=0x565e93bf "ecma_is_value_object (value)", file=0x565eaf78 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x565d353c <__func__.3476.lto_priv.705> "ecma_get_object_from_value", line=774) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565c7a1b in ecma_get_object_from_value (value=1450174951) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:774 #7 0x56593a35 in ecma_module_parse (module_p=0x566fe720) at jerryscript/jerry-core/ecma/base/ecma-module.c:713 #8 0x56593a7c in ecma_module_parse_modules () at jerryscript/jerry-core/ecma/base/ecma-module.c:732 #9 0x56589346 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x565fd0e0 <buffer.lto_priv> "export {} from \"dummy.js\";\nexport {} from \"tests/jerry/es2015/module-export-04.js\"\n", source_size=83, parse_opts=0, bytecode_data_p=0xffffcd10) at jerryscript/jerry-core/parser/js/js-parser.c:2985 #10 0x565b6368 in jerry_parse (resource_name_p=0xffffd14c "crash-1acbab01002cc1d7a3fe977db3681d4deb444c3a", resource_name_length=46, source_p=0x565fd0e0 <buffer.lto_priv> "export {} from \"dummy.js\";\nexport {} from \"tests/jerry/es2015/module-export-04.js\"\n", source_size=83, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:407 #11 0x565b4f98 in main (argc=3, argv=0xffffcf14) at jerryscript/jerry-main/main-unix.c:733 ```
Assertion 'ecma_is_value_object (value)' failed in ecma_get_object_from_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2896/comments
0
2019-06-04T11:48:37Z
2019-06-14T07:29:27Z
https://github.com/jerryscript-project/jerryscript/issues/2896
451,950,598
2,896
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: b6fc4e13 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-50-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript function createMap (count) { var map = new Map ( ) for (var i = { member : 0, valueOf: function () { return this.member } }; i < count ; i ++) { map.set(i); } return map } createMap(2000).forEach(function($, $) {}) ``` ###### Backtrace: ```text ================================================================= ==1190==ERROR: AddressSanitizer: heap-use-after-free on address 0xf5100610 at pc 0x56695089 bp 0xff95cbb8 sp 0xff95cba8 READ of size 2 at 0xf5100610 thread T0 #0 0x56695088 in ecma_ref_object jerryscript/jerry-core/ecma/base/ecma-gc.c:135 #1 0x566aca38 in ecma_copy_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:852 #2 0x566acacb in ecma_fast_copy_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:879 #3 0x56646b76 in vm_execute jerryscript/jerry-core/vm/vm.c:3437 #4 0x566477fe in vm_run jerryscript/jerry-core/vm/vm.c:3612 #5 0x5667edfc in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #6 0x56678a5d in ecma_op_container_foreach jerryscript/jerry-core/ecma/operations/ecma-container-object.c:541 #7 0x5661218d in ecma_builtin_map_prototype_object_foreach jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c:83 #8 0x56611fc6 in ecma_builtin_map_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.inc.h:43 #9 0x5666e6d9 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #10 0x5666e93a in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #11 0x5667eaa1 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #12 0x56636c35 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #13 0x56646ebf in vm_execute jerryscript/jerry-core/vm/vm.c:3479 #14 0x566477fe in vm_run jerryscript/jerry-core/vm/vm.c:3612 #15 0x56635ede in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #16 0x5668c305 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #17 0x56688d87 in main jerryscript/jerry-main/main-unix.c:742 #18 0xf7727e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #19 0x565b9ed0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x15ed0) 0xf5100610 is located 0 bytes inside of 16-byte region [0xf5100610,0xf5100620) freed by thread T0 here: #0 0xf79eeb74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x566633d1 in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:504 #2 0x5666392c in jmem_pools_collect_empty jerryscript/jerry-core/jmem/jmem-poolman.c:175 #3 0x56662f12 in jmem_run_free_unused_memory_callbacks jerryscript/jerry-core/jmem/jmem-allocator.c:270 #4 0x56663194 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:324 #5 0x56663277 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:373 #6 0x566479ea in ecma_alloc_property_pair jerryscript/jerry-core/ecma/base/ecma-alloc.c:198 #7 0x566afd23 in ecma_create_property jerryscript/jerry-core/ecma/base/ecma-helpers.c:457 #8 0x566b03f4 in ecma_create_named_data_property jerryscript/jerry-core/ecma/base/ecma-helpers.c:543 #9 0x56678113 in ecma_op_container_set jerryscript/jerry-core/ecma/operations/ecma-container-object.c:406 #10 0x566121fa in ecma_builtin_map_prototype_object_set jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c:132 #11 0x566120e9 in ecma_builtin_map_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.inc.h:46 #12 0x5666e6d9 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #13 0x5666e93a in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #14 0x5667eaa1 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #15 0x56636c35 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #16 0x56646ebf in vm_execute jerryscript/jerry-core/vm/vm.c:3479 #17 0x566477fe in vm_run jerryscript/jerry-core/vm/vm.c:3612 #18 0x5667edfc in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #19 0x56636c35 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #20 0x56646ebf in vm_execute jerryscript/jerry-core/vm/vm.c:3479 #21 0x566477fe in vm_run jerryscript/jerry-core/vm/vm.c:3612 #22 0x56635ede in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #23 0x5668c305 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #24 0x56688d87 in main jerryscript/jerry-main/main-unix.c:742 #25 0xf7727e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf79eef34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566630d2 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:293 #2 0x566631a2 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:327 #3 0x56663277 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:373 #4 0x56663658 in jmem_pools_alloc jerryscript/jerry-core/jmem/jmem-poolman.c:104 #5 0x566478e2 in ecma_alloc_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:84 #6 0x566ae876 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:85 #7 0x5663a39b in vm_loop jerryscript/jerry-core/vm/vm.c:1178 #8 0x56646e5f in vm_execute jerryscript/jerry-core/vm/vm.c:3473 #9 0x566477fe in vm_run jerryscript/jerry-core/vm/vm.c:3612 #10 0x5667edfc in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #11 0x56636c35 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #12 0x56646ebf in vm_execute jerryscript/jerry-core/vm/vm.c:3479 #13 0x566477fe in vm_run jerryscript/jerry-core/vm/vm.c:3612 #14 0x56635ede in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #15 0x5668c305 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #16 0x56688d87 in main jerryscript/jerry-main/main-unix.c:742 #17 0xf7727e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/ecma/base/ecma-gc.c:135 in ecma_ref_object Shadow bytes around the buggy address: 0x3ea20070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea200a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea200b0: fa fa fd fd fa fa 00 00 fa fa 00 00 fa fa 00 fa =>0x3ea200c0: fa fa[fd]fd fa fa 00 00 fa fa 00 06 fa fa fd fd 0x3ea200d0: fa fa 00 00 fa fa 00 04 fa fa 00 07 fa fa fd fd 0x3ea200e0: fa fa 00 00 fa fa 00 06 fa fa 00 05 fa fa 00 02 0x3ea200f0: fa fa 00 06 fa fa 00 00 fa fa fa fa fa fa fa fa 0x3ea20100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==1190==ABORTING bt No stack. ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-use-after-free in ecma_ref_object
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2895/comments
0
2019-06-03T15:56:37Z
2019-06-24T09:13:12Z
https://github.com/jerryscript-project/jerryscript/issues/2895
451,562,475
2,895
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: b6fc4e13 Build command: ./tools/build.py --clean --debug --compile-flag=-m32 \ --profile=es2015-subset --system-allocator=on \ --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-47-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript Array.prototype.unshift(Object(Symbol())); Array.prototype.reduce(function(p_0, p_1) { return p_0 + p_1}, ""); ``` ###### Backtrace: ```text ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655cded in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0ab5 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0aef in jerry_assert_fail (assertion=0x565e54bc "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x565e5480 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x565d63ec <__func__.4385.lto_priv.512> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565a05c4 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143 #7 0x565a0378 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x565b60e8 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:231 #9 0x565b5521 in main (argc=3, argv=0xffffd1f4) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2894/comments
0
2019-06-02T18:29:05Z
2019-06-11T15:42:15Z
https://github.com/jerryscript-project/jerryscript/issues/2894
451,220,154
2,894
[ "jerryscript-project", "jerryscript" ]
When running the following code, I find Jerry cannot output error information. ``` var f = function(name){ delete this.keywords[name]; print("Hello Jerry"); } f("jerry"); ``` Outputs: Hello Jerry I think jerry does not execute the code "delete this.keywords[name];". I don't know why this happens
Can Jerry delete a undefined object?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2891/comments
9
2019-05-30T08:55:27Z
2019-11-14T12:53:52Z
https://github.com/jerryscript-project/jerryscript/issues/2891
450,201,426
2,891
[ "jerryscript-project", "jerryscript" ]
I used the object's properties and call object's method in native pointer `free_cb` callback, I found that there might be a memory leak or crash. test code as following, the native pointer `free_cb` will call `finalize()` method. Whether the native pointer does not allow use this object method or any property? ``` javascript class Test { constructor() { this.a = 1; } finalize() { console.log('foo'); this.a = 0; } } var t = new Test(); gc(true); var t = new Test(); gc(true); var t = new Test(); gc(true); var t = new Test(); gc(true); ```
Question about native pointer.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2889/comments
10
2019-05-29T06:31:08Z
2019-07-02T13:46:20Z
https://github.com/jerryscript-project/jerryscript/issues/2889
449,621,852
2,889
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 8e39fbc4 Build command: ./tools/build.py --clean --debug --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-47-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript Object.defineProperties(constructor, { $: Object }) JSON.parse('{"a":1}', function (k) { if (k) { $ *= $ } }) var $ = Object.freeze(RegExp($, 'g')).exec() ``` ###### Backtrace: ``` Script Error: ReferenceError: person is not defined ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77f9832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77facc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579a19 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56614f99 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56614fda in jerry_assert_fail (assertion=0x566aec40 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", file=0x566aebc0 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x566710e0 <__func__.5048.lto_priv.663> "ecma_free_string_list", line=43) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566656ca in ecma_free_string_list (string_list_p=0xf5d004d0) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43 #7 0x56665806 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:63 #8 0x56664695 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:66 #9 0x5663c015 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:216 #10 0x5663a06a in main (argc=3, argv=0xffffce34) at jerryscript/jerry-main/main-unix.c:940 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p) in ecma_free_string_list
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2885/comments
0
2019-05-24T13:04:27Z
2019-05-28T12:22:58Z
https://github.com/jerryscript-project/jerryscript/issues/2885
448,160,397
2,885
[ "jerryscript-project", "jerryscript" ]
I am currently constructing the layout for a C++ wrapper. This one is meant to be as thin and light as possible, as it's only purpose is to support OO programming with Jerry. Mainly meant to make wrapping C++ classes just a little bit easier. https://gist.github.com/IngwiePhoenix/238db8d1a7f8731c6be7c4d28f20357c The idea is: - Use local variables instead of pointers to automatically trigger destruction (which should release the underlying `jerry_value_t`). - Simplify defining native functions (`Value (*jerry_cxx_handler_cb)(Context)`) to make the handler signatures just a little less verbose. This is achieved by wrapping the actual callback in a generic `jerry_value_t (*)(jerry_value_t, jerry_value_t, jerry_value_t*, jerry_value_t)` and assigning it as the native pointer in a function (setting the native pointer in an object). - Allow quick conversion between the C++ types and C types (`operator jerry_value_t ();`) to allow using the regular C functions as expected. - Mimic common methods - but only those that are _really_ needed. - Use sub-classing and inheritance on a simple, non-diamond level, to allow other C++ types to derive from it (`class MyJerryVector: public JerryScript::Object, public MyVector`) so that going back and forth between native and scripted calls is easier. - Try not to use templates. Templates are great, but can bring forth more confusion than clearance. So far, I have tried to map out the basic types and their structure. I am going to create a few `inline` functions to allow JerryScript to have a better and more controlled way of dealing with the C++ wrappers (like returning a `JerryScript::Value` instead of a `jerry_value_t`). Also, I decided to create a very basic base class `Value`, which serves as the foundation for any other type. What do you think of the structure and idea? Is there anything that I am missing? My goal is to contribute this towards `jerry-ext` in the future, to allow a user to also use JerryScript in C++, if they like. The wrapper is meant to make a few things more OO-ish, but not to wrap the entire C API. ```c++ // For example: use JerryScript::Object; use JerryScript::Number; use JerryScript::String; Object o = Object::global(); o["foo"] = String("bar"); o["baz"] = Number(42); ``` Would be glad to hear your thoughts! :)
Discussion: Thin C++ wrapper (jerry_value_t, core functions)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2884/comments
2
2019-05-22T13:45:56Z
2020-05-26T13:53:10Z
https://github.com/jerryscript-project/jerryscript/issues/2884
447,146,744
2,884
[ "jerryscript-project", "jerryscript" ]
This is more of a curios question in the way of it being "theoreticaly possible or not". Basically, I was wondering if I could slightly improve JerryScript's performance by swapping out certain parts of it - like it's JSON parser with something like [simdjson](https://github.com/lemire/simdjson), it's string handling with [rapidstring](https://github.com/boyerjohn/rapidstring), RegExp with [re2](https://github.com/google/re2) and it's compiler and VM with [asmjit](https://github.com/asmjit/asmjit). Would any of this be possible? I doubt that just re-implementing the API won't do, forking the entire project seems more likely for some of the things. But what is most interesting to me is improving JerryScript's performance by using a JIT instead of an interpreter. What do you think of this?
Curios/Question: Exchanging implementations
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2883/comments
3
2019-05-22T12:52:20Z
2019-06-28T15:05:51Z
https://github.com/jerryscript-project/jerryscript/issues/2883
447,118,661
2,883
[ "jerryscript-project", "jerryscript" ]
As part of my project, I need to expose some C++ APIs to JerryScript. Now, the best way to actually do that is by being able to tag the native instance onto the object created. Imagine this class for example: ```c++ class Foo { public: Foo(); ~Foo(); int someMethod(); }; ``` Now, what I guess I have to do, is to create a `jerry_native_object_info_t`. ```c void foo_free(void* ptr) { Foo* foo_ptr = (Foo*)ptr; delete foo_ptr; // trigger deallocation and deconstruction } jerry_object_native_info_t foo_info = { .free_cb = foo_free }; ``` So far, so good. But from what I figured, I would do something like this: ```c jerry_value_t obj = jerry_create_object(); Foo* foo_ptr = new Foo(); jerry_set_object_native_pointer(obj, (void*)foo_ptr, &foo_info); ``` And get this pointer in a method like this: ```c void* ptr; if(jerry_get_object_native_pointer(obj, &ptr, &foo_info)) { Foo* foo_ptr = (void*)ptr; } ``` So far, this bit I did understand. But what if I want to have the instance of `Foo` tagged on an instance object? Do I define that in an `Object.constructor`? Is it save that - even when I have multiple `Foo`s around, that only the instance tagged to the specific object will be sent to the `free_cb` once the GC decides to delete it? (And on a side note: how do I actually define a constructor in C?) Also, can I tag any kind of pointer in? Take for instance: I am working on a C++ wrapper, and I would like to reduce this: ```c static jerry_value_t function( const jerry_value_t func_value, const jerry_value_t this_value, const jerry_value_t *args_p, const jerry_value_t args_cnt ); ``` Into this: ```c++ Value function(Context ctx); ``` The idea I had, was to use a generic wrapper object which would construct a function off something like the following, and just take the returned value and return it like usual: ```c++ typedef Value (*jerry_cxx_handler_t)(Context); jerry_object_native_info_t dummy_info = { .free_cb = NULL }; static jerry_value_t cxx_wrapper( const jerry_value_t func_value, const jerry_value_t this_value, const jerry_value_t *args_p, const jerry_value_t args_cnt ) { void* ptr; if(! jerry_get_object_native_pointer(func_value, &ptr, &dummy_info)) { /* handle error */ } jerry_cxx_handler_t handler = (jerry_cxx_handler_t)ptr; Context ctx(func_value, this_value, args_p, args_cnt); Value cxx_rt = handler(ctx); jerry_value_t rt = cxx_rt.raw(); return rt; // ctx and cxx_rt should auto-destruct and release their copy of the value properly. } ``` Now, what I am curios about is: When constructing the `jerry_value_t` with the native pointer set to a `jerry_cxx_handler_t`, is it ensured that only _this_ `func_value` has exactly _this_ function pointer assigned at any time? Thank you very much. :)
Assigning a native pointer to an object - individually.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2880/comments
4
2019-05-17T12:54:02Z
2019-05-22T10:58:18Z
https://github.com/jerryscript-project/jerryscript/issues/2880
445,428,150
2,880
[ "jerryscript-project", "jerryscript" ]
Apparently, a recent ECMA standard specifies `import(module: String): Promise` as a dynamic method of loading and processing modules. Are there plans for implementing this?
Provide import(String):Promise
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2879/comments
3
2019-05-17T11:39:23Z
2019-06-28T15:13:09Z
https://github.com/jerryscript-project/jerryscript/issues/2879
445,400,347
2,879
[ "jerryscript-project", "jerryscript" ]
I would like to suggest a set of useful macros, for the case that someone is building modules right into the host application versus loading them dynamicaly. The idea behind a macro like `JERRYX_NATIVE_MODULE_EXTERN(module_name)` would be, that a developer may be curating a list of built-in modules, through which they may iterate within the initialization of a program: ```c jerryx_native_module_t internal_modules[] = { _foo_definition, _bar_definition, NULL }; for(int i = 0; internal_modules[i] != NULL; i++) { jerryx_native_module_register(internal_modules[i]); } ``` Currently, the developer has to actually be aware of the definition of `JERRYX_NATIVE_MODULE(...)` in order to do this. Having a set of helper macros that simplify the usage of this method would be quite helpful therefore. The macros would simply help to get the names right; to retrive the on-resolve callback, or the respective register or unregister function, if required. What do you think? :) Kind regards, Ingwie
Suggestion: jerryscript-ext/module.h - Improve built-in modules
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2877/comments
6
2019-05-17T05:11:01Z
2019-10-18T11:36:04Z
https://github.com/jerryscript-project/jerryscript/issues/2877
445,267,148
2,877
[ "jerryscript-project", "jerryscript" ]
I am working on writing wrappers for the [rlutil](https://github.com/tapio/rlutil) library, and right now I am a bit lost on the way to convert `jerry_value_t`s into `char*`s. ```c static jerry_value_t rlutil_setConsoleTitle( const jerry_value_t func_value, const jerry_value_t this_value, const jerry_value_t *arg_p, const jerry_value_t arg_cnt ) { if(arg_cnt != 1) { // handle eerror } jerry_size_t len = jerry_get_string_size(); char str[len + 1]; jerry_string_to_char_buffer(arg_p[0], &str, len); setConsoleTitle(str); return jerry_create_undefined(); } ``` I haven't had a opportunity to test just yet - writing this in my break time :). But, is this the correct way of doing this, and is there possibly a better way? Thanks!
Right way to get a string from JerryScript?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2876/comments
4
2019-05-17T00:23:46Z
2019-05-17T06:49:50Z
https://github.com/jerryscript-project/jerryscript/issues/2876
445,212,247
2,876
[ "jerryscript-project", "jerryscript" ]
I guess a backtrace and log speak a little more than words :) ``` [email protected] ~/W/G/j/out $ env PATH=/usr/bin/:$PATH lldb ./bin/jerry-snapshot generate ./test.js (lldb) target create "./bin/jerry-snapshot" Current executable set to './bin/jerry-snapshot' (x86_64). (lldb) settings set -- target.run-args "generate" "./test.js" (lldb) r Process 63738 launched: '/Users/Ingwie/Work/Git/jerryscript/out/bin/jerry-snapshot' (x86_64) Input file './test.js' (65 bytes) loaded. Process 63738 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10) frame #0: 0x00007fff6baff975 libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell + 53 libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell: -> 0x7fff6baff975 <+53>: vmovups %ymm0, (%rdi) 0x7fff6baff979 <+57>: addq $0x20, %rdi 0x7fff6baff97d <+61>: andq $-0x20, %rdi 0x7fff6baff981 <+65>: movq %rdi, %rcx Target 0: (jerry-snapshot) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10) * frame #0: 0x00007fff6baff975 libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell + 53 frame #1: 0x0000000100005268 jerry-snapshot`jerry_init + 27 frame #2: 0x00000001000016fc jerry-snapshot`main + 680 frame #3: 0x00007fff6b91d3d5 libdyld.dylib`start + 1 ``` Contents of that test file: ```js class A { mtd() { return 1; } } print((new A()).mtd()); ``` Executing it normally works just fine. ``` $ ./bin/jerry ./test.js Exception backtrace: class A { ^ Script Error: SyntaxError: Primary expression expected. [line: 1, column: 1] ``` Yes, it is a syntax error, but I expected to see this when I was building a snapshot. Any idea? Thanks!
jerry-snapshot: Crashes with SIGSEV, out of bounds memory
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2869/comments
5
2019-05-11T22:26:11Z
2019-05-13T14:07:40Z
https://github.com/jerryscript-project/jerryscript/issues/2869
443,041,833
2,869
[ "jerryscript-project", "jerryscript" ]
I have noticed that Jerryscript run too slowly, especially on array manipulation. For example, this code takes about 119ms on my ARM-CortexM4 48MHz 32-bit machine: ``` var array = new Int16Array(1500) for (var iii = 0; iii < 1500; iii++) { if (iii < 2) { array[iii] = iii } else { array[iii] = (array[iii - 1] - array[iii - 2]) * 2 } } ``` Build command (from commit `2d1ad149`): ``` sudo python tools/build.py --clean --lto=off --toolchain=cmake/toolchain_mcu_stm32f4.cmake --jerry-cmdline=off --jerry-ext=off --jerry-libm=off --jerry-port-default=off --all-in-one=on --error-messages=on --mem-heap=63 --mem-stats=on --profile=my_profile --snapshot-exec=on --snapshot-save=off` ``` Profile: ``` JERRY_BUILTIN_ANNEXB=0 JERRY_BUILTIN_DATE=0 JERRY_BUILTIN_REGEXP=0 JERRY_ES2015=0 JERRY_ES2015_BUILTIN_TYPEDARRAY=1 JERRY_UNICODE_CASE_CONVERSION=0 JERRY_NUMBER_TYPE_FLOAT64=0 ``` Is it the limitation of Jerryscript? Do you have any idea to improve performance in my machine?
Jerryscript performance issue
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2868/comments
9
2019-05-10T16:51:45Z
2019-10-04T15:41:14Z
https://github.com/jerryscript-project/jerryscript/issues/2868
442,807,933
2,868
[ "jerryscript-project", "jerryscript" ]
When I upgrade to the latest version(2019.5.9), the reference is always error.
Object reference count limit is reached after update
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2867/comments
31
2019-05-10T07:27:44Z
2019-10-02T11:58:07Z
https://github.com/jerryscript-project/jerryscript/issues/2867
442,577,041
2,867
[ "jerryscript-project", "jerryscript" ]
Function.toString() can'not return function body now. When will this feature be supported? We need to support ejs and jade.
Function.toString() don't work.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2866/comments
8
2019-05-10T01:53:45Z
2021-10-25T12:53:30Z
https://github.com/jerryscript-project/jerryscript/issues/2866
442,503,578
2,866
[ "jerryscript-project", "jerryscript" ]
Hello. By skimming the source files and the wiki as well as the project's page, I kept reading that it supports ECMAScript 5.1, however JerryScript is implemented in such a small source tree, that I wonder what it actually supports - and what not? A small listing of what it does and does not do, would be very nice :) Kind regards, Ingwie
List of things that JerryScript can do and can't do?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2858/comments
2
2019-05-03T16:04:43Z
2019-05-04T19:02:08Z
https://github.com/jerryscript-project/jerryscript/issues/2858
440,114,722
2,858
[ "jerryscript-project", "jerryscript" ]
Hey! For a project that I am working on, I need a scripting language that is familiar to developers - so I decided to go and try out JerryScript. But good lord, I had no idea... ^^; ![image](https://user-images.githubusercontent.com/2893716/57149895-1506c800-6dcd-11e9-994c-65f786c7acd0.png) I generated this command quickly by using the fish shell: ```fish echo gcc (find jerry-core jerry-ext jerry-main jerry-port/default/include -type d -exec echo -n "-I{} " \;) (find jerry-core jerry-ext jerry-port -name "*.c" -exec echo -n "{} " \;) jerry-main/cli.c jerry-main/main-unix.c -o jerry | pbcopy ``` and manually appending the `-D` definition. This command is **big** and I wonder: Why is JerryScript's structure so huge, and is there some kind of explanation on how to integrate JerryScript on one's own build system, what `-D`'s it accepts and such? I will need to add JerryScript into my own build tool, hence I tried to reproduce a full compilation "by hand" to learn how it is being built. And well, I learned that - and I am surprised I did not exceed the maximum number of arguments... ;) Kind regards, Ingwie
Why is JerryScript's structure so deep?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2857/comments
5
2019-05-03T16:01:31Z
2019-06-28T16:45:18Z
https://github.com/jerryscript-project/jerryscript/issues/2857
440,113,432
2,857
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: a2e78164 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-48-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript var buffer = new ArrayBuffer() new DataView(buffer, 0, undefined) ``` ###### Backtrace: ``` ICE: Assertion '!ecma_number_is_nan (num)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-number.c(ecma_number_is_infinity):339. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77f8832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77f9cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579719 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661495e in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661499f in jerry_assert_fail (assertion=0x566a8e20 "!ecma_number_is_nan (num)", file=0x566a9160 "jerryscript/jerry-core/ecma/base/ecma-helpers-number.c", function=0x5666df00 <__func__.2920.lto_priv.750> "ecma_number_is_infinity", line=339) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5664f01c in ecma_number_is_infinity (num=nan(0x8000000000001)) at jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:339 #7 0x5662b84e in ecma_op_dataview_create (arguments_list_p=0xffffc984, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-dataview-object.c:115 #8 0x565b6575 in ecma_builtin_dataview_dispatch_construct (arguments_list_p=0xffffc984, arguments_list_len=3) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.c:62 #9 0x5662011e in ecma_builtin_dispatch_construct (obj_p=0xf5f00850, arguments_list_p=0xffffc984, arguments_list_len=3) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1075 #10 0x5662f54e in ecma_op_function_construct (func_obj_p=0xf5f00850, this_arg_value=72, arguments_list_p=0xffffc984, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1062 #11 0x565e8899 in opfunc_construct (frame_ctx_p=0xffffca00) at jerryscript/jerry-core/vm/vm.c:649 #12 0x565f85df in vm_execute (frame_ctx_p=0xffffca00, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3490 #13 0x565f8ebf in vm_run (bytecode_header_p=0xf5303e40, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #14 0x565e75b8 in vm_run_global (bytecode_p=0xf5303e40) at jerryscript/jerry-core/vm/vm.c:266 #15 0x5663ca82 in jerry_run (func_val=4126148931) at jerryscript/jerry-core/api/jerry.c:550 #16 0x56639584 in main (argc=3, argv=0xffffce34) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
Assertion '!ecma_number_is_nan (num)' failed in ecma_number_is_infinity
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2854/comments
0
2019-05-03T12:11:14Z
2019-05-10T08:47:25Z
https://github.com/jerryscript-project/jerryscript/issues/2854
440,017,627
2,854
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: a2e78164 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-48-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript var map = new Map() map.set() map.set('bar') var count = 0 map.forEach(function () { if (count === 0) { map.delete('bar') } }) ``` ###### Backtrace: ``` ICE: Assertion 'property_p != NULL' failed at jerryscript/jerry-core/ecma/operations/ecma-map-object.c(ecma_op_map_foreach):380. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77f8832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77f9cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579719 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661495e in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661499f in jerry_assert_fail (assertion=0x566a5c00 "property_p != NULL", file=0x566a59e0 "jerryscript/jerry-core/ecma/operations/ecma-map-object.c", function=0x56673420 <__func__.3808.lto_priv.553> "ecma_op_map_foreach", line=380) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56633912 in ecma_op_map_foreach (this_arg=4126148787, predicate=4126148451, predicate_this_arg=72) at jerryscript/jerry-core/ecma/operations/ecma-map-object.c:380 #7 0x565c324f in ecma_builtin_map_prototype_object_foreach (this_arg=4126148787, predicate=4126148451, predicate_this_arg=72) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c:83 #8 0x565c308b in ecma_builtin_map_prototype_dispatch_routine (builtin_routine_id=68, this_arg_value=4126148787, arguments_list=0xffffc700, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.inc.h:43 #9 0x5661fc37 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_MAP_PROTOTYPE, builtin_routine_id=68, this_arg_value=4126148787, arguments_list_p=0xffffc700, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #10 0x5661fe98 in ecma_builtin_dispatch_call (obj_p=0xf5f00790, this_arg_value=4126148787, arguments_list_p=0xffffc99c, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #11 0x5662e6f8 in ecma_op_function_call (func_obj_p=0xf5f00790, this_arg_value=4126148787, arguments_list_p=0xffffc99c, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #12 0x565e8321 in opfunc_call (frame_ctx_p=0xffffca10) at jerryscript/jerry-core/vm/vm.c:565 #13 0x565f85bf in vm_execute (frame_ctx_p=0xffffca10, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3478 #14 0x565f8ebf in vm_run (bytecode_header_p=0xf51031d0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #15 0x565e75b8 in vm_run_global (bytecode_p=0xf51031d0) at jerryscript/jerry-core/vm/vm.c:266 #16 0x5663ca82 in jerry_run (func_val=4126149027) at jerryscript/jerry-core/api/jerry.c:550 #17 0x56639584 in main (argc=3, argv=0xffffce44) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
Assertion 'property_p != NULL' failed in ecma_op_map_foreach
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2853/comments
0
2019-05-03T12:09:57Z
2019-05-08T13:21:44Z
https://github.com/jerryscript-project/jerryscript/issues/2853
440,017,236
2,853
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: a2e78164 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-48-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript (function () { function createMap (count) { var map = new Map() for (var i = 0; i < count; i++) { map.set(i) } return map } createMap(2000).forEach(function ($, key) { $ += key }) }()) ``` ###### Backtrace: ``` ICE: Assertion 'ECMA_GET_DIRECT_STRING_TYPE (string2_p) == ECMA_DIRECT_STRING_UINT' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c(ecma_concat_ecma_strings):854. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77f8832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77f9cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579719 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661495e in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661499f in jerry_assert_fail (assertion=0x566aa320 "ECMA_GET_DIRECT_STRING_TYPE (string2_p) == ECMA_DIRECT_STRING_UINT", file=0x566a9840 "jerryscript/jerry-core/ecma/base/ecma-helpers-string.c", function=0x5666e540 <__func__.3299.lto_priv.92> "ecma_concat_ecma_strings", line=854) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56653f0c in ecma_concat_ecma_strings (string1_p=0x15, string2_p=0x3d) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:854 #7 0x56573874 in opfunc_addition (left_value=0, right_value=61) at jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c:154 #8 0x565f1606 in vm_loop (frame_ctx_p=0xffffc170) at jerryscript/jerry-core/vm/vm.c:2209 #9 0x565f855f in vm_execute (frame_ctx_p=0xffffc170, arg_p=0xffffc340, arg_list_len=2) at jerryscript/jerry-core/vm/vm.c:3472 #10 0x565f8ebf in vm_run (bytecode_header_p=0xf5f00a00, this_binding_value=4126149459, lex_env_p=0xf5d006d0, parse_opts=0, arg_list_p=0xffffc340, arg_list_len=2) at jerryscript/jerry-core/vm/vm.c:3609 #11 0x5662ea53 in ecma_op_function_call (func_obj_p=0xf5f0bfb0, this_arg_value=72, arguments_list_p=0xffffc340, arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #12 0x56633ad0 in ecma_op_map_foreach (this_arg=4126148595, predicate=4126195635, predicate_this_arg=72) at jerryscript/jerry-core/ecma/operations/ecma-map-object.c:396 #13 0x565c324f in ecma_builtin_map_prototype_object_foreach (this_arg=4126148595, predicate=4126195635, predicate_this_arg=72) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c:83 #14 0x565c308b in ecma_builtin_map_prototype_dispatch_routine (builtin_routine_id=68, this_arg_value=4126148595, arguments_list=0xffffc440, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.inc.h:43 #15 0x5661fc37 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_MAP_PROTOTYPE, builtin_routine_id=68, this_arg_value=4126148595, arguments_list_p=0xffffc440, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #16 0x5661fe98 in ecma_builtin_dispatch_call (obj_p=0xf5f0bfe0, this_arg_value=4126148595, arguments_list_p=0xffffc6ec, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #17 0x5662e6f8 in ecma_op_function_call (func_obj_p=0xf5f0bfe0, this_arg_value=4126148595, arguments_list_p=0xffffc6ec, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #18 0x565e8321 in opfunc_call (frame_ctx_p=0xffffc760) at jerryscript/jerry-core/vm/vm.c:565 #19 0x565f85bf in vm_execute (frame_ctx_p=0xffffc760, arg_p=0xffffc9b4, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3478 #20 0x565f8ebf in vm_run (bytecode_header_p=0xf5101ea0, this_binding_value=4126149459, lex_env_p=0xf5d006d0, parse_opts=0, arg_list_p=0xffffc9b4, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #21 0x5662ea53 in ecma_op_function_call (func_obj_p=0xf5f00910, this_arg_value=72, arguments_list_p=0xffffc9b4, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #22 0x565e8321 in opfunc_call (frame_ctx_p=0xffffca20) at jerryscript/jerry-core/vm/vm.c:565 #23 0x565f85bf in vm_execute (frame_ctx_p=0xffffca20, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3478 #24 0x565f8ebf in vm_run (bytecode_header_p=0xf5f009a0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #25 0x565e75b8 in vm_run_global (bytecode_p=0xf5f009a0) at jerryscript/jerry-core/vm/vm.c:266 #26 0x5663ca82 in jerry_run (func_val=4126148931) at jerryscript/jerry-core/api/jerry.c:550 #27 0x56639584 in main (argc=3, argv=0xffffce54) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
Assertion 'ECMA_GET_DIRECT_STRING_TYPE (string2_p) == ECMA_DIRECT_STRING_UINT' failed in ecma_concat_ecma_strings
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2852/comments
0
2019-05-03T12:08:40Z
2019-05-08T13:21:44Z
https://github.com/jerryscript-project/jerryscript/issues/2852
440,016,801
2,852
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: a2e78164 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-48-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript function a (n) { var array = new Int32Array(n) var array2 = new Int32Array(array) array2.set(new Uint8Array(array.buffer, 34)) } a(10) ``` ###### Backtrace: ``` ================================================================= ==8141==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf46017ac at pc 0x566f0bb1 bp 0xffd42d88 sp 0xffd42d78 READ of size 1 at 0xf46017ac thread T0 #0 0x566f0bb0 in ecma_get_typedarray_element jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:66 #1 0x5670302c in ecma_op_typedarray_set_with_typedarray jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:786 #2 0x567031fe in ecma_builtin_typedarray_prototype_set jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:820 #3 0x56700f0d in ecma_builtin_typedarray_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:67 #4 0x566ffc36 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #5 0x566ffe97 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #6 0x5670e6f7 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #7 0x566c8320 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #8 0x566d85be in vm_execute jerryscript/jerry-core/vm/vm.c:3478 #9 0x566d8ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #10 0x5670ea52 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #11 0x566c8320 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #12 0x566d85be in vm_execute jerryscript/jerry-core/vm/vm.c:3478 #13 0x566d8ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #14 0x566c75b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #15 0x5671ca81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #16 0x56719583 in main jerryscript/jerry-main/main-unix.c:742 #17 0xf7746e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #18 0x5664aaf0 (jerryscript/build/bin/jerry+0x15af0) 0xf46017ac is located 20 bytes to the left of 68-byte region [0xf46017c0,0xf4601804) allocated by thread T0 here: #0 0xf7a0df34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566f4174 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:286 #2 0x566f4242 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:320 #3 0x566f4316 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:366 #4 0x566d8fe4 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:112 #5 0x5673e323 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x567070d0 in ecma_arraybuffer_new_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x566f129f in ecma_typedarray_create_object_with_length jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:246 #8 0x566f2887 in ecma_op_create_typedarray jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:624 #9 0x567009b4 in ecma_typedarray_helper_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.c:219 #10 0x56700516 in ecma_builtin_int32array_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c:68 #11 0x5670011d in ecma_builtin_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1075 #12 0x5670f54d in ecma_op_function_construct jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1062 #13 0x566c8898 in opfunc_construct jerryscript/jerry-core/vm/vm.c:649 #14 0x566d85de in vm_execute jerryscript/jerry-core/vm/vm.c:3490 #15 0x566d8ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #16 0x5670ea52 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #17 0x566c8320 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #18 0x566d85be in vm_execute jerryscript/jerry-core/vm/vm.c:3478 #19 0x566d8ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #20 0x566c75b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #21 0x5671ca81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #22 0x56719583 in main jerryscript/jerry-main/main-unix.c:742 #23 0xf7746e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:66 in ecma_get_typedarray_element Shadow bytes around the buggy address: 0x3e8c02a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8c02b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8c02c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8c02d0: fa fa fa fa fa fa fa fa fa fa fa fa 00 00 00 00 0x3e8c02e0: 00 00 00 00 04 fa fa fa fa fa 00 00 00 00 00 00 =>0x3e8c02f0: 00 00 04 fa fa[fa]fa fa 00 00 00 00 00 00 00 00 0x3e8c0300: 04 fa fa fa fa fa fd fd fd fd fd fd fd fd fd fa 0x3e8c0310: fa fa fa fa fd fd fd fd fd fd fd fd fd fa fa fa 0x3e8c0320: fa fa fd fd fd fd fd fd fd fd fd fa fa fa fa fa 0x3e8c0330: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 0x3e8c0340: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==8141==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
heap-buffer-overflow in ecma_get_typedarray_element
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2851/comments
0
2019-05-03T12:06:35Z
2019-07-01T11:09:40Z
https://github.com/jerryscript-project/jerryscript/issues/2851
440,016,189
2,851
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: a2e78164 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-48-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript (function () { var d = new DataView(new ArrayBuffer()) for (var $; ;) { d.setInt8(0) } })() ``` ###### Backtrace: ``` ================================================================= ==14893==ERROR: AddressSanitizer: heap-use-after-free on address 0xf5400880 at pc 0x5669d83a bp 0xffceb8b8 sp 0xffceb8a8 READ of size 2 at 0xf5400880 thread T0 #0 0x5669d839 in ecma_is_lexical_environment jerryscript/jerry-core/ecma/base/ecma-helpers.c:179 #1 0x5669da8d in ecma_get_object_type jerryscript/jerry-core/ecma/base/ecma-helpers.c:228 #2 0x566458b0 in ecma_object_class_is jerryscript/jerry-core/ecma/operations/ecma-objects.c:1973 #3 0x5666aff6 in ecma_op_dataview_get_set_view_value jerryscript/jerry-core/ecma/operations/ecma-dataview-object.c:278 #4 0x565f54ac in ecma_builtin_dataview_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c:204 #5 0x5665ec36 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #6 0x5665ee97 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #7 0x5666d6f7 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #8 0x56627320 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #9 0x566375be in vm_execute jerryscript/jerry-core/vm/vm.c:3478 #10 0x56637ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #11 0x5666da52 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #12 0x56627320 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #13 0x566375be in vm_execute jerryscript/jerry-core/vm/vm.c:3478 #14 0x56637ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #15 0x566265b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #16 0x5667ba81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #17 0x56678583 in main jerryscript/jerry-main/main-unix.c:742 #18 0xf77a8e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #19 0x565a9af0 (jerryscript/build/bin/jerry+0x15af0) 0xf5400880 is located 0 bytes inside of 29-byte region [0xf5400880,0xf540089d) freed by thread T0 here: #0 0xf7a6fb74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x5665335b in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:490 #2 0x56638007 in ecma_dealloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:126 #3 0x56685d21 in ecma_gc_free_object jerryscript/jerry-core/ecma/base/ecma-gc.c:618 #4 0x566868af in ecma_gc_run jerryscript/jerry-core/ecma/base/ecma-gc.c:910 #5 0x56686c46 in ecma_free_unused_memory jerryscript/jerry-core/ecma/base/ecma-gc.c:988 #6 0x566530b3 in jmem_run_free_unused_memory_callbacks jerryscript/jerry-core/jmem/jmem-allocator.c:267 #7 0x56653234 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:317 #8 0x56653316 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:366 #9 0x56637fe4 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:112 #10 0x5669d323 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #11 0x5665d15c in ecma_builtin_make_function_object_for_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:556 #12 0x5665e0a3 in ecma_builtin_try_to_instantiate_property jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:814 #13 0x56641aa3 in ecma_op_object_find_own jerryscript/jerry-core/ecma/operations/ecma-objects.c:528 #14 0x56641fc8 in ecma_op_object_get jerryscript/jerry-core/ecma/operations/ecma-objects.c:697 #15 0x566262b5 in vm_op_get_value jerryscript/jerry-core/vm/vm.c:101 #16 0x5662dcd4 in vm_loop jerryscript/jerry-core/vm/vm.c:1734 #17 0x5663755e in vm_execute jerryscript/jerry-core/vm/vm.c:3472 #18 0x56637ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #19 0x5666da52 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #20 0x56627320 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #21 0x566375be in vm_execute jerryscript/jerry-core/vm/vm.c:3478 #22 0x56637ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #23 0x566265b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #24 0x5667ba81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #25 0x56678583 in main jerryscript/jerry-main/main-unix.c:742 #26 0xf77a8e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf7a6ff34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x56653174 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:286 #2 0x56653242 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:320 #3 0x56653316 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:366 #4 0x56637fe4 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:112 #5 0x5669d323 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x566660d0 in ecma_arraybuffer_new_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x56666546 in ecma_op_create_arraybuffer_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x565f4b27 in ecma_builtin_arraybuffer_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x5665f11d in ecma_builtin_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1075 #10 0x5666e54d in ecma_op_function_construct jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1062 #11 0x56627898 in opfunc_construct jerryscript/jerry-core/vm/vm.c:649 #12 0x566375de in vm_execute jerryscript/jerry-core/vm/vm.c:3490 #13 0x56637ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #14 0x5666da52 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #15 0x56627320 in opfunc_call jerryscript/jerry-core/vm/vm.c:565 #16 0x566375be in vm_execute jerryscript/jerry-core/vm/vm.c:3478 #17 0x56637ebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #18 0x566265b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #19 0x5667ba81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #20 0x56678583 in main jerryscript/jerry-main/main-unix.c:742 #21 0xf77a8e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/ecma/base/ecma-helpers.c:179 in ecma_is_lexical_environment Shadow bytes around the buggy address: 0x3ea800c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800f0: fa fa fa fa fa fa fa fa 00 00 00 fa fa fa 00 00 0x3ea80100: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa =>0x3ea80110:[fd]fd fd fd fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ea80120: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ea80130: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x3ea80140: 00 00 04 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ea80150: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ea80160: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 00 fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==14893==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
heap-use-after-free in ecma_is_lexical_environment
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2850/comments
0
2019-05-03T12:04:40Z
2019-05-08T13:14:24Z
https://github.com/jerryscript-project/jerryscript/issues/2850
440,015,509
2,850
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: a2e78164 Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-48-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript new DataView(new ArrayBuffer).buffer ``` ###### Backtrace: ``` ================================================================= ==30714==ERROR: AddressSanitizer: heap-use-after-free on address 0xf54008b0 at pc 0x5665935e bp 0xffd69338 sp 0xffd69328 READ of size 2 at 0xf54008b0 thread T0 #0 0x5665935d in ecma_ref_object jerryscript/jerry-core/ecma/base/ecma-gc.c:135 #1 0x565ca020 in ecma_builtin_dataview_prototype_object_getters jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c:122 #2 0x565ca196 in ecma_builtin_dataview_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c:159 #3 0x56633c36 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #4 0x56633e97 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #5 0x566426f7 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #6 0x56616dd5 in ecma_op_object_find_own jerryscript/jerry-core/ecma/operations/ecma-objects.c:602 #7 0x56616fc8 in ecma_op_object_get jerryscript/jerry-core/ecma/operations/ecma-objects.c:697 #8 0x565fb2b5 in vm_op_get_value jerryscript/jerry-core/vm/vm.c:101 #9 0x56602955 in vm_loop jerryscript/jerry-core/vm/vm.c:1695 #10 0x5660c55e in vm_execute jerryscript/jerry-core/vm/vm.c:3472 #11 0x5660cebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #12 0x565fb5b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #13 0x56650a81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #14 0x5664d583 in main jerryscript/jerry-main/main-unix.c:742 #15 0xf77b1e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #16 0x5657eaf0 (jerryscript/build/bin/jerry+0x15af0) 0xf54008b0 is located 0 bytes inside of 25-byte region [0xf54008b0,0xf54008c9) freed by thread T0 here: #0 0xf7a78b74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x5662835b in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:490 #2 0x5660d007 in ecma_dealloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:126 #3 0x5665ad21 in ecma_gc_free_object jerryscript/jerry-core/ecma/base/ecma-gc.c:618 #4 0x5665b8af in ecma_gc_run jerryscript/jerry-core/ecma/base/ecma-gc.c:910 #5 0x5665bc46 in ecma_free_unused_memory jerryscript/jerry-core/ecma/base/ecma-gc.c:988 #6 0x566280b3 in jmem_run_free_unused_memory_callbacks jerryscript/jerry-core/jmem/jmem-allocator.c:267 #7 0x56628234 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:317 #8 0x56628316 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:366 #9 0x5660cfe4 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:112 #10 0x56672323 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #11 0x5663215c in ecma_builtin_make_function_object_for_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:556 #12 0x5663237b in ecma_builtin_make_function_object_for_getter_accessor jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:593 #13 0x56633259 in ecma_builtin_try_to_instantiate_property jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:834 #14 0x56616aa3 in ecma_op_object_find_own jerryscript/jerry-core/ecma/operations/ecma-objects.c:528 #15 0x56616fc8 in ecma_op_object_get jerryscript/jerry-core/ecma/operations/ecma-objects.c:697 #16 0x565fb2b5 in vm_op_get_value jerryscript/jerry-core/vm/vm.c:101 #17 0x56602955 in vm_loop jerryscript/jerry-core/vm/vm.c:1695 #18 0x5660c55e in vm_execute jerryscript/jerry-core/vm/vm.c:3472 #19 0x5660cebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #20 0x565fb5b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #21 0x56650a81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #22 0x5664d583 in main jerryscript/jerry-main/main-unix.c:742 #23 0xf77b1e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf7a78f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x56628174 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:286 #2 0x56628242 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:320 #3 0x56628316 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:366 #4 0x5660cfe4 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:112 #5 0x56672323 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x5663b0d0 in ecma_arraybuffer_new_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x5663b546 in ecma_op_create_arraybuffer_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x565c9b27 in ecma_builtin_arraybuffer_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x5663411d in ecma_builtin_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1075 #10 0x5664354d in ecma_op_function_construct jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1062 #11 0x565fc898 in opfunc_construct jerryscript/jerry-core/vm/vm.c:649 #12 0x5660c5de in vm_execute jerryscript/jerry-core/vm/vm.c:3490 #13 0x5660cebe in vm_run jerryscript/jerry-core/vm/vm.c:3609 #14 0x565fb5b7 in vm_run_global jerryscript/jerry-core/vm/vm.c:266 #15 0x56650a81 in jerry_run jerryscript/jerry-core/api/jerry.c:550 #16 0x5664d583 in main jerryscript/jerry-main/main-unix.c:742 #17 0xf77b1e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/ecma/base/ecma-gc.c:135 in ecma_ref_object Shadow bytes around the buggy address: 0x3ea800c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea800f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 00 00 0x3ea80100: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 00 fa fa =>0x3ea80110: 00 00 00 fa fa fa[fd]fd fd fd fa fa 00 00 00 fa 0x3ea80120: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ea80130: 00 fa fa fa 00 00 00 fa fa fa 00 00 05 fa fa fa 0x3ea80140: 00 00 01 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ea80150: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ea80160: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 00 fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==30714==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
heap-use-after-free in ecma_builtin_dataview_prototype_object_getters
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2848/comments
0
2019-05-03T10:50:37Z
2019-05-08T13:14:22Z
https://github.com/jerryscript-project/jerryscript/issues/2848
439,992,437
2,848
[ "jerryscript-project", "jerryscript" ]
*Hi all! In an effort to make sure we're fully getting the word out to OpenJS Foundation project communities about the collaborator summit, I'm posting the following message on main or admin repos:* This year, the Node Collaborator summit is opening up to include and welcome all former JS Foundation projects. The Collaborator summit is a space where projects and working groups within projects have the dedicated time and space to get together and get work done. We will have project-specific meetings, cross-project meetings on issues like security and standards, and of course meetings to discuss new programs and patterns for the new CPC. The event will be in Berlin on May 30-31st at the Courtyard Marriott City Center. It is free to register with the password 'collabsummit.' We are also inviting all projects/attendees to suggest meetings and sessions via our CFP - these are not conference talks, but rather collaborative conversations or meetings you would like to hold with your peers. We ask that you register in advance so that we can allocate meeting room space and resources, and so that we can publish where conversations are scheduled in the day or two leading up to the event. Links: * [Session Proposals](https://docs.google.com/forms/d/e/1FAIpQLScneYhY4iqm8x2C2AO9EEzJ5smkOKhLqfxEMQcfNvP5rvXfHg/viewform?usp=sf_link) * [Registration](https://www.eventbrite.com/e/openjs-collaborator-summit-tickets-55985971548) (password is collabsummit) * Information on how to apply for the [Travel Fund](https://github.com/nodejs/admin/blob/master/MEMBER_TRAVEL_FUND.md) * [Summit Planning Repo](https://github.com/nodejs/summit/issues)
Community Invitation to the OpenJS Collaborator Summit + Info
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2847/comments
1
2019-05-01T14:43:24Z
2020-04-21T10:03:18Z
https://github.com/jerryscript-project/jerryscript/issues/2847
439,188,681
2,847
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 1cdb3c6c Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-48-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript function f ( ) { } var B = class extends f { constructor ( ){ eval ( "eval ('super (1, 2, 3, 4)')" ) ; } } C = class extends B { g ( ) { { ( ) => { } } } } D = class extends C { constructor ( ) { super ( ) } g () { eval () } } eval = eval.bind() new D ``` ###### Backtrace: ``` ICE: Assertion 'property_p' failed at jerryscript/jerry-core/ecma/operations/ecma-function-object.c(ecma_op_is_super_called):587. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de9832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7deacc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655cd0d in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0525 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a055f in jerry_assert_fail (assertion=0x565e755b "property_p", file=0x565e6180 "jerryscript/jerry-core/ecma/operations/ecma-function-object.c", function=0x565d4348 <__func__.5577.lto_priv.572> "ecma_op_is_super_called", line=587) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565aeb34 in ecma_op_is_super_called (lex_env_p=0x566fc1b0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:587 #7 0x5658e5a3 in vm_loop (frame_ctx_p=0xffffc188) at jerryscript/jerry-core/vm/vm.c:1504 #8 0x56592257 in vm_execute (frame_ctx_p=0xffffc188, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3472 #9 0x565924d1 in vm_run (bytecode_header_p=0x566fd800, this_binding_value=1450164611, lex_env_p=0x566fc1b0, parse_opts=12, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #10 0x5658c42a in vm_run_eval (bytecode_data_p=0x566fd800, parse_opts=12) at jerryscript/jerry-core/vm/vm.c:330 #11 0x565adc55 in ecma_op_eval_chars_buffer (code_p=0x566fd7c8 "super (1, 2, 3, 4)", code_buffer_size=18, parse_opts=12) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:116 #12 0x565adb4e in ecma_op_eval (code_p=0x566fd7c0, parse_opts=0) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #13 0x565796cb in ecma_builtin_global_object_eval (x=1450170305) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:103 #14 0x5657ac39 in ecma_builtin_global_dispatch_routine (builtin_routine_id=68, this_arg=72, arguments_list_p=0xffffc364, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:1181 #15 0x565a6018 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_GLOBAL, builtin_routine_id=68, this_arg_value=72, arguments_list_p=0xffffc364, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #16 0x565a6163 in ecma_builtin_dispatch_call (obj_p=0x566fced0, this_arg_value=72, arguments_list_p=0xffffc5e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #17 0x565af075 in ecma_op_function_call (func_obj_p=0x566fced0, this_arg_value=72, arguments_list_p=0xffffc5e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #18 0x565af6d6 in ecma_op_function_call (func_obj_p=0x566fced0, this_arg_value=72, arguments_list_p=0xffffc5e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:961 #19 0x5658c8b2 in opfunc_call (frame_ctx_p=0xffffc5f8) at jerryscript/jerry-core/vm/vm.c:565 #20 0x56592281 in vm_execute (frame_ctx_p=0xffffc5f8, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3478 #21 0x565924d1 in vm_run (bytecode_header_p=0x566fd790, this_binding_value=1450164611, lex_env_p=0x566fc1b0, parse_opts=12, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #22 0x5658c42a in vm_run_eval (bytecode_data_p=0x566fd790, parse_opts=12) at jerryscript/jerry-core/vm/vm.c:330 #23 0x565adc55 in ecma_op_eval_chars_buffer (code_p=0x566fc988 "eval ('super (1, 2, 3, 4)')", code_buffer_size=27, parse_opts=12) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:116 #24 0x565adb4e in ecma_op_eval (code_p=0x566fc980, parse_opts=0) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #25 0x565796cb in ecma_builtin_global_object_eval (x=1450166657) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:103 #26 0x5657ac39 in ecma_builtin_global_dispatch_routine (builtin_routine_id=68, this_arg=72, arguments_list_p=0xffffc7d4, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:1181 #27 0x565a6018 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_GLOBAL, builtin_routine_id=68, this_arg_value=72, arguments_list_p=0xffffc7d4, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #28 0x565a6163 in ecma_builtin_dispatch_call (obj_p=0x566fced0, this_arg_value=72, arguments_list_p=0xffffca54, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #29 0x565af075 in ecma_op_function_call (func_obj_p=0x566fced0, this_arg_value=72, arguments_list_p=0xffffca54, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #30 0x565af6d6 in ecma_op_function_call (func_obj_p=0x566fced0, this_arg_value=72, arguments_list_p=0xffffca54, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:961 #31 0x5658c8b2 in opfunc_call (frame_ctx_p=0xffffca88) at jerryscript/jerry-core/vm/vm.c:565 #32 0x56592281 in vm_execute (frame_ctx_p=0xffffca88, arg_p=0xffffccc4, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3478 #33 0x565924d1 in vm_run (bytecode_header_p=0x566fc830, this_binding_value=1450168915, lex_env_p=0x566fd2b0, parse_opts=0, arg_list_p=0xffffccc4, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #34 0x565af24f in ecma_op_function_call (func_obj_p=0x566fcfa0, this_arg_value=1450168915, arguments_list_p=0xffffccc4, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #35 0x565afb59 in ecma_op_function_construct (func_obj_p=0x566fcfa0, this_arg_value=1450168915, arguments_list_p=0xffffccc5, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1119 #36 0x5658c675 in vm_super_call (frame_ctx_p=0xffffccd8) at jerryscript/jerry-core/vm/vm.c:479 #37 0x56592291 in vm_execute (frame_ctx_p=0xffffccd8, arg_p=0xffffcf04, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3484 #38 0x565924d1 in vm_run (bytecode_header_p=0x566fcc00, this_binding_value=1450168915, lex_env_p=0x566fd270, parse_opts=0, arg_list_p=0xffffcf04, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #39 0x565af24f in ecma_op_function_call (func_obj_p=0x566fd150, this_arg_value=1450168915, arguments_list_p=0xffffcf04, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:792 #40 0x565afb59 in ecma_op_function_construct (func_obj_p=0x566fd150, this_arg_value=1450168915, arguments_list_p=0xffffcf05, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1119 #41 0x5658ca8e in opfunc_construct (frame_ctx_p=0xffffcf28) at jerryscript/jerry-core/vm/vm.c:649 #42 0x565922a1 in vm_execute (frame_ctx_p=0xffffcf28, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3490 #43 0x565924d1 in vm_run (bytecode_header_p=0x566fcc90, this_binding_value=1450164611, lex_env_p=0x566fc1b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3609 #44 0x5658c355 in vm_run_global (bytecode_p=0x566fcc90) at jerryscript/jerry-core/vm/vm.c:266 #45 0x565b5e74 in jerry_run (func_val=1450167923) at jerryscript/jerry-core/api/jerry.c:550 #46 0x565b4807 in main (argc=3, argv=0xffffd1d4) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'property_p' failed in ecma_op_is_super_called
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2846/comments
0
2019-04-30T13:32:09Z
2019-05-10T10:23:30Z
https://github.com/jerryscript-project/jerryscript/issues/2846
438,780,123
2,846
[ "jerryscript-project", "jerryscript" ]
###### JerryScipt version: ``` Checked revision: 56b6d3a4 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js export function $ () { var $, b } ``` ###### Backtrace: ```text Program received signal SIGSEGV, Segmentation fault. 0x000055555558aa5d in lit_is_valid_cesu8_string ( cesu8_buf_p=0x555500100002 <error: Cannot access memory at address 0x555500100002>, buf_size=1) at jerryscript/jerry-core/lit/lit-strings.c:135 135 lit_utf8_byte_t c = cesu8_buf_p[idx++]; (gdb) bt #0 0x000055555558aa5d in lit_is_valid_cesu8_string ( cesu8_buf_p=0x555500100002 <error: Cannot access memory at address 0x555500100002>, buf_size=1) at jerryscript/jerry-core/lit/lit-strings.c:135 #1 0x00005555555cd790 in ecma_new_ecma_string_from_utf8 ( string_p=0x555500100002 <error: Cannot access memory at address 0x555500100002>, string_size=1) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:285 #2 0x0000555555559815 in parser_parse_export_statement (context_p=0x7fffffffd7e0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1924 #3 0x0000555555559f7f in parser_parse_statements (context_p=0x7fffffffd7e0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2217 #4 0x000055555558f55f in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x555555800100 <buffer.lto_priv> "export function $() {var $, b}", source_size=30, parse_opts=0, error_location_p=0x7fffffffda04) at jerryscript/jerry-core/parser/js/js-parser.c:2468 #5 0x0000555555590220 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x555555800100 <buffer.lto_priv> "export function $() {var $, b}", source_size=30, parse_opts=0, bytecode_data_p=0x7fffffffda80) at jerryscript/jerry-core/parser/js/js-parser.c:2927 #6 0x00005555555c21bd in jerry_parse (resource_name_p=0x7fffffffe19e "test2.js", resource_name_length=8, source_p=0x555555800100 <buffer.lto_priv> "export function $() {var $, b}", source_size=30, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:407 #7 0x00005555555c0d14 in main (argc=2, argv=0x7fffffffddb8) at jerryscript/jerry-main/main-unix.c:733 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-use-after-free in parser_parse_export_statement
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2842/comments
1
2019-04-27T08:04:41Z
2019-04-30T08:53:48Z
https://github.com/jerryscript-project/jerryscript/issues/2842
437,919,320
2,842
[ "jerryscript-project", "jerryscript" ]
### Jerry Version: Checked revision: 40f7b1c27fa79568deb5a473b60397ea52b787f7 Build: debug.linux ### OS: Ubuntu 16.04, x86_64 ### Testcase: [https://github.com/yeguixin/testcases/blob/master/0/0bee07592a100236e9b99c722c3388f1-0.js](url) ### Exception: When I execute the testcase using jerry, I find that jerry cannot execute the js file. Maybe it's a bug of Jerry.
Testcase that Jerry cannot execute
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2832/comments
7
2019-04-16T14:32:55Z
2019-04-17T07:00:36Z
https://github.com/jerryscript-project/jerryscript/issues/2832
433,814,576
2,832
[ "jerryscript-project", "jerryscript" ]
what does the "size of snapshot" mean here? Do you mean it's the byte length of the "buffer_p" array? Actually it must the integral times of uint32, corresponding to 4 bytes. But what I got is not. ![image](https://user-images.githubusercontent.com/8282020/56102005-ddd69100-5f5b-11e9-96fe-93009a68469a.png)
The size of snapshot from "jerry_generate_snapshot".
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2826/comments
2
2019-04-15T01:00:01Z
2019-05-24T03:55:56Z
https://github.com/jerryscript-project/jerryscript/issues/2826
433,056,129
2,826
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: e944cdaa Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js var $; function f() {} var B = class extends f { constructor() { eval(); super($) $(this.g()) } } C = class extends B { g() { () => {} } } D = class extends C { constructor() { super() } g() { eval('super["g"]') } } new D ``` ###### Backtrace: ``` ICE: Assertion 'property_p' failed at jerryscript/jerry-core/ecma/operations/ecma-function-object.c(ecma_op_is_super_called):586. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de0832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de1cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c852 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0518 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0552 in jerry_assert_fail (assertion=0x565e55d7 "property_p", file=0x565e41c0 "jerryscript/jerry-core/ecma/operations/ecma-function-object.c", function=0x565d2708 <__func__.5461.lto_priv.572> "ecma_op_is_super_called", line=586) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565ad68a in ecma_op_is_super_called (lex_env_p=0x566fb8a0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:586 #7 0x5658f11b in vm_loop (frame_ctx_p=0xffffbfac) at jerryscript/jerry-core/vm/vm.c:1509 #8 0x56592dcf in vm_execute (frame_ctx_p=0xffffbfac, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3477 #9 0x56592ffc in vm_run (bytecode_header_p=0x566fb870, this_binding_value=1450162003, lex_env_p=0x566fb8a0, parse_opts=15, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #10 0x5658cf1d in vm_run_eval (bytecode_data_p=0x566fb870, parse_opts=15) at jerryscript/jerry-core/vm/vm.c:337 #11 0x565ac75e in ecma_op_eval_chars_buffer (code_p=0x566fac88 "super[\"g\"]", code_buffer_size=10, parse_opts=15) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:116 #12 0x565ac657 in ecma_op_eval (code_p=0x566fac80, parse_opts=3) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #13 0x56578f6e in ecma_builtin_global_object_eval (this_arg=72, x=1450159233) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:83 #14 0x56578da1 in ecma_builtin_global_dispatch_routine (builtin_routine_id=64, this_arg_value=72, arguments_list=0xffffc144, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.inc.h:218 #15 0x565a5306 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_GLOBAL, builtin_routine_id=64, this_arg_value=72, arguments_list_p=0xffffc144, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #16 0x565a5451 in ecma_builtin_dispatch_call (obj_p=0x566fb700, this_arg_value=72, arguments_list_p=0xffffc314, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #17 0x565adbcb in ecma_op_function_call (func_obj_p=0x566fb700, this_arg_value=72, arguments_list_p=0xffffc314, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:715 #18 0x5658d3a5 in opfunc_call (frame_ctx_p=0xffffc32c) at jerryscript/jerry-core/vm/vm.c:572 #19 0x56592df9 in vm_execute (frame_ctx_p=0xffffc32c, arg_p=0xffffc500, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3483 #20 0x56592ffc in vm_run (bytecode_header_p=0x566fac50, this_binding_value=1450162003, lex_env_p=0x566fb7d0, parse_opts=0, arg_list_p=0xffffc500, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #21 0x565adda5 in ecma_op_function_call (func_obj_p=0x566fb180, this_arg_value=1450162003, arguments_list_p=0xffffc500, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:791 #22 0x5658d3a5 in opfunc_call (frame_ctx_p=0xffffc52c) at jerryscript/jerry-core/vm/vm.c:572 #23 0x56592df9 in vm_execute (frame_ctx_p=0xffffc52c, arg_p=0xffffc764, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3483 #24 0x56592ffc in vm_run (bytecode_header_p=0x566fa870, this_binding_value=1450161619, lex_env_p=0x566fb630, parse_opts=0, arg_list_p=0xffffc764, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #25 0x565adda5 in ecma_op_function_call (func_obj_p=0x566faf70, this_arg_value=1450161619, arguments_list_p=0xffffc764, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:791 #26 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566faf70, this_arg_value=1450161619, arguments_list_p=0xffffc765, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118 #27 0x5658d168 in vm_super_call (frame_ctx_p=0xffffc77c) at jerryscript/jerry-core/vm/vm.c:486 #28 0x56592e09 in vm_execute (frame_ctx_p=0xffffc77c, arg_p=0xffffc9a4, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3489 #29 0x56592ffc in vm_run (bytecode_header_p=0x566fabf0, this_binding_value=1450161619, lex_env_p=0x566fb5f0, parse_opts=0, arg_list_p=0xffffc9a4, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #30 0x565adda5 in ecma_op_function_call (func_obj_p=0x566fb120, this_arg_value=1450161619, arguments_list_p=0xffffc9a4, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:791 #31 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566fb120, this_arg_value=1450161619, arguments_list_p=0xffffc9a5, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118 #32 0x5658d581 in opfunc_construct (frame_ctx_p=0xffffc9cc) at jerryscript/jerry-core/vm/vm.c:656 #33 0x56592e19 in vm_execute (frame_ctx_p=0xffffc9cc, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3495 #34 0x56592ffc in vm_run (bytecode_header_p=0x566faca0, this_binding_value=1450156419, lex_env_p=0x566fa1b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #35 0x5658ce48 in vm_run_global (bytecode_p=0x566faca0) at jerryscript/jerry-core/vm/vm.c:273 #36 0x565b4eb4 in jerry_run (func_val=1450159731) at jerryscript/jerry-core/api/jerry.c:549 #37 0x565b3847 in main (argc=3, argv=0xffffcc74) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'property_p' failed in ecma_op_is_super_called
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2825/comments
0
2019-04-13T17:12:53Z
2019-04-24T12:40:09Z
https://github.com/jerryscript-project/jerryscript/issues/2825
432,873,415
2,825
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: e944cdaa Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js var $ = Function("import { c } from 'tests/jerry/es2015/module-imported.js';") var c ``` ###### Backtrace: ``` ICE: Assertion 'ecma_find_named_property (object_p, name_p) == NULL' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_create_named_data_property):535. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de0832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de1cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c852 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0518 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0552 in jerry_assert_fail (assertion=0x565e83c8 "ecma_find_named_property (object_p, name_p) == NULL", file=0x565e7ffc "jerryscript/jerry-core/ecma/base/ecma-helpers.c", function=0x565d0940 <__func__.4933.lto_priv.668> "ecma_create_named_data_property", line=535) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565c7bf3 in ecma_create_named_data_property (object_p=0x566fa180, name_p=0x566fa6a0, prop_attributes=0 '\000', out_prop_p=0xffffca48) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:535 #7 0x56593423 in ecma_module_connect_properties (scope_p=0x566fab70) at jerryscript/jerry-core/ecma/base/ecma-module.c:143 #8 0x5659360a in ecma_parser_module_run (file_path_p=0x566fa6c0 "tests/jerry/es2015/module-imported.js", path_size=38, source_p=0x566fb720 "/* Copyright JS Foundation and other contributors, http://js.foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the"..., source_size=793, module_node_p=0x566fa6f0) at jerryscript/jerry-core/ecma/base/ecma-module.c:213 #9 0x565936ab in ecma_module_load_modules (context_p=0xffffcb5c) at jerryscript/jerry-core/ecma/base/ecma-module.c:241 #10 0x56588f00 in parser_parse_source (arg_list_p=0x565e5b34 "", arg_list_size=0, source_p=0x566fa518 "import { c } from 'tests/jerry/es2015/module-imported.js';", source_size=58, parse_opts=0, error_location_p=0xffffccd8) at jerryscript/jerry-core/parser/js/js-parser.c:2486 #11 0x56589936 in parser_parse_script (arg_list_p=0x565e5b34 "", arg_list_size=0, source_p=0x566fa518 "import { c } from 'tests/jerry/es2015/module-imported.js';", source_size=58, parse_opts=0, bytecode_data_p=0xffffcd3c) at jerryscript/jerry-core/parser/js/js-parser.c:2937 #12 0x56578c18 in ecma_builtin_function_dispatch_construct (arguments_list_p=0xffffcf44, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:168 #13 0x5657895d in ecma_builtin_function_dispatch_call (arguments_list_p=0xffffcf44, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:59 #14 0x565a54bd in ecma_builtin_dispatch_call (obj_p=0x566fa660, this_arg_value=72, arguments_list_p=0xffffcf44, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1051 #15 0x565adbcb in ecma_op_function_call (func_obj_p=0x566fa660, this_arg_value=72, arguments_list_p=0xffffcf44, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:715 #16 0x5658d3a5 in opfunc_call (frame_ctx_p=0xffffcf5c) at jerryscript/jerry-core/vm/vm.c:572 #17 0x56592df9 in vm_execute (frame_ctx_p=0xffffcf5c, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3483 #18 0x56592ffc in vm_run (bytecode_header_p=0x566fa560, this_binding_value=1450156419, lex_env_p=0x566fa1b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #19 0x5658ce48 in vm_run_global (bytecode_p=0x566fa560) at jerryscript/jerry-core/vm/vm.c:273 #20 0x565b4eb4 in jerry_run (func_val=1450157603) at jerryscript/jerry-core/api/jerry.c:549 #21 0x565b3847 in main (argc=3, argv=0xffffd204) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'ecma_find_named_property (object_p, name_p) == NULL' failed in ecma_create_named_data_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2824/comments
1
2019-04-13T17:09:47Z
2019-04-25T13:06:30Z
https://github.com/jerryscript-project/jerryscript/issues/2824
432,872,988
2,824
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: e944cdaa Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js class myArray extends Array {} print(undefined instanceof myArray) ``` ###### Backtrace: ``` ICE: Assertion 'ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):774. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de0832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de1cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c852 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0518 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0552 in jerry_assert_fail (assertion=0x565e5efd "ecma_is_value_object (value)", file=0x565e7a98 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x565d067c <__func__.3448.lto_priv.687> "ecma_get_object_from_value", line=774) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565c5b2f in ecma_get_object_from_value (value=72) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:774 #7 0x565ad0e5 in ecma_op_implicit_class_constructor_has_instance (func_obj_p=0x566faa40, value=72) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:344 #8 0x565ad28c in ecma_op_function_has_instance (func_obj_p=0x566faa40, value=72) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:415 #9 0x565982ff in ecma_op_object_has_instance (obj_p=0x566faa40, value=72) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1344 #10 0x5658c8a8 in opfunc_instanceof (left_value=72, right_value=1450158659) at jerryscript/jerry-core/vm/opcodes-ecma-relational-equality.c:113 #11 0x56591880 in vm_loop (frame_ctx_p=0xffffc9ec) at jerryscript/jerry-core/vm/vm.c:2741 #12 0x56592dcf in vm_execute (frame_ctx_p=0xffffc9ec, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3477 #13 0x56592ffc in vm_run (bytecode_header_p=0x566fa720, this_binding_value=1450156419, lex_env_p=0x566fa1b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #14 0x5658ce48 in vm_run_global (bytecode_p=0x566fa720) at jerryscript/jerry-core/vm/vm.c:273 #15 0x565b4eb4 in jerry_run (func_val=1450158467) at jerryscript/jerry-core/api/jerry.c:549 #16 0x565b3847 in main (argc=3, argv=0xffffcc94) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'ecma_is_value_object (value)' failed in ecma_get_object_from_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2823/comments
0
2019-04-13T17:07:07Z
2019-04-24T12:39:05Z
https://github.com/jerryscript-project/jerryscript/issues/2823
432,872,576
2,823
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: e944cdaa Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js class Animal { constructor() { $ = eval() } explain() { } } class Dog extends Animal { constructor() { super() } } class Doge extends Dog { whoAmI() {} } new Doge ``` ###### Backtrace: ``` ICE: Assertion 'lex_env_p != NULL' failed at jerryscript/jerry-core/ecma/operations/ecma-reference.c(ecma_op_resolve_super_reference_value):81. Error: ERR_FAILED_INTERNAL_ASSERTION bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de0832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de1cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c852 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0518 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0552 in jerry_assert_fail (assertion=0x565e2391 "lex_env_p != NULL", file=0x565e1738 "jerryscript/jerry-core/ecma/operations/ecma-reference.c", function=0x565d3020 <__func__.3439.lto_priv.522> "ecma_op_resolve_super_reference_value", line=81) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5659ac09 in ecma_op_resolve_super_reference_value (lex_env_p=0x0) at jerryscript/jerry-core/ecma/operations/ecma-reference.c:81 #7 0x565ad482 in ecma_op_find_super_declerative_lex_env (lex_env_p=0x566fb970) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:539 #8 0x565ad60b in ecma_op_get_class_this_binding_property (lex_env_p=0x566fb970) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:570 #9 0x565ad790 in ecma_op_set_class_this_binding (lex_env_p=0x566fb970, this_binding=1450162387) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:612 #10 0x565add89 in ecma_op_function_call (func_obj_p=0x566fb420, this_arg_value=1450162387, arguments_list_p=0xffffca8c, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:786 #11 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566fb420, this_arg_value=1450162387, arguments_list_p=0xffffca8d, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118 #12 0x5658d168 in vm_super_call (frame_ctx_p=0xffffcaac) at jerryscript/jerry-core/vm/vm.c:486 #13 0x56592e09 in vm_execute (frame_ctx_p=0xffffcaac, arg_p=0xffffccf0, arg_list_len=2) at jerryscript/jerry-core/vm/vm.c:3489 #14 0x56592ffc in vm_run (bytecode_header_p=0x566fa900, this_binding_value=1450162387, lex_env_p=0x566fb930, parse_opts=0, arg_list_p=0xffffccf0, arg_list_len=2) at jerryscript/jerry-core/vm/vm.c:3595 #15 0x565adda5 in ecma_op_function_call (func_obj_p=0x566fb610, this_arg_value=1450162387, arguments_list_p=0xffffccf0, arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:791 #16 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566fb610, this_arg_value=1450162387, arguments_list_p=0xffffccf1, arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118 #17 0x5658d168 in vm_super_call (frame_ctx_p=0xffffcd0c) at jerryscript/jerry-core/vm/vm.c:486 #18 0x56592e09 in vm_execute (frame_ctx_p=0xffffcd0c, arg_p=0xffffcf34, arg_list_len=3) at jerryscript/jerry-core/vm/vm.c:3489 #19 0x56592ffc in vm_run (bytecode_header_p=0x566fac40, this_binding_value=1450162387, lex_env_p=0x566fb8f0, parse_opts=0, arg_list_p=0xffffcf34, arg_list_len=3) at jerryscript/jerry-core/vm/vm.c:3595 #20 0x565adda5 in ecma_op_function_call (func_obj_p=0x566fb790, this_arg_value=1450162387, arguments_list_p=0xffffcf34, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:791 #21 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566fb790, this_arg_value=1450162387, arguments_list_p=0xffffcf35, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118 #22 0x5658d581 in opfunc_construct (frame_ctx_p=0xffffcf5c) at jerryscript/jerry-core/vm/vm.c:656 #23 0x56592e19 in vm_execute (frame_ctx_p=0xffffcf5c, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3495 #24 0x56592ffc in vm_run (bytecode_header_p=0x566fafd0, this_binding_value=1450156419, lex_env_p=0x566fa1b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595 #25 0x5658ce48 in vm_run_global (bytecode_p=0x566fafd0) at jerryscript/jerry-core/vm/vm.c:273 #26 0x565b4eb4 in jerry_run (func_val=1450161027) at jerryscript/jerry-core/api/jerry.c:549 #27 0x565b3847 in main (argc=3, argv=0xffffd204) at jerryscript/jerry-main/main-unix.c:742 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'lex_env_p != NULL' failed in ecma_op_resolve_super_reference_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2822/comments
0
2019-04-13T17:04:05Z
2019-04-26T11:34:03Z
https://github.com/jerryscript-project/jerryscript/issues/2822
432,872,152
2,822
[ "jerryscript-project", "jerryscript" ]
###### JerryScipt version: ``` Checked revision: e944cdaa Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: [Test case](https://github.com/pando-project/jerryscript/files/3074420/test.txt) ###### Backtrace: ```text Program received signal SIGSEGV, Segmentation fault. 0x5658493d in lit_is_valid_cesu8_string (cesu8_buf_p=0x5671c000 <error: Cannot access memory at address 0x5671c000>, buf_size=4096) at jerryscript/jerry-core/lit/lit-strings.c:135 135 lit_utf8_byte_t c = cesu8_buf_p[idx++]; (gdb) bt #0 0x5658493d in lit_is_valid_cesu8_string (cesu8_buf_p=0x5671c000 <error: Cannot access memory at address 0x5671c000>, buf_size=4096) at jerryscript/jerry-core/lit/lit-strings.c:135 #1 0x565c080f in ecma_new_ecma_string_from_utf8 (string_p=0x5671c000 <error: Cannot access memory at address 0x5671c000>, string_size=4096) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:249 #2 0x565704d6 in parser_module_add_item_to_node (context_p=0xffffcb7c, module_node_p=0xffffca9c, import_name_p=0x566fa4a4, local_name_p=0x566fa4a4, is_import_item=false) at jerryscript/jerry-core/parser/js/js-parser-module.c:246 #3 0x56570920 in parser_module_parse_export_item_list (context_p=0xffffcb7c) at jerryscript/jerry-core/parser/js/js-parser-module.c:422 #4 0x56557232 in parser_parse_export_statement (context_p=0xffffcb7c) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1758 #5 0x5655789c in parser_parse_statements (context_p=0xffffcb7c) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2077 #6 0x56588d8a in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x565f90e0 <buffer.lto_priv> "export {}\n", source_size=10, parse_opts=0, error_location_p=0xffffccf8) at jerryscript/jerry-core/parser/js/js-parser.c:2468 #7 0x56589936 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x565f90e0 <buffer.lto_priv> "export {}\n", source_size=10, parse_opts=0, bytecode_data_p=0xffffcd50) at jerryscript/jerry-core/parser/js/js-parser.c:2937 #8 0x565b4be0 in jerry_parse (resource_name_p=0xffffd178 "/home/reni/work/fuzzer/data/fuzzinator-configs/test.js", resource_name_length=54, source_p=0x565f90e0 <buffer.lto_priv> "export {}\n", source_size=10, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:406 #9 0x565b3810 in main (argc=2, argv=0xffffcf54) at jerryscript/jerry-main/main-unix.c:733 ``` If JerryScript was built with: ``` ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` the test causes an assertion failure: ```text ICE: Assertion 'string_p != NULL || string_size == 0' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c(ecma_new_ecma_string_from_utf8):248. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff7a24801 in __GI_abort () at abort.c:79 #2 0x000055555555f6e3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x0000555555588ce2 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x0000555555588d34 in jerry_assert_fail (assertion=0x5555555ee228 "string_p != NULL || string_size == 0", file=0x5555555ee0d8 "jerryscript/jerry-core/ecma/base/ecma-helpers-string.c", function=0x5555555d4cb0 <__func__.3360.lto_priv.716> "ecma_new_ecma_string_from_utf8", line=248) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x00005555555cd88e in ecma_new_ecma_string_from_utf8 (string_p=0x0, string_size=4096) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:248 #6 0x0000555555574794 in parser_module_add_item_to_node (context_p=0x7fffffffd7b0, module_node_p=0x7fffffffd650, import_name_p=0x5555558ff558 <jerry_global_heap+352>, local_name_p=0x5555558ff558 <jerry_global_heap+352>, is_import_item=false) at jerryscript/jerry-core/parser/js/js-parser-module.c:246 #7 0x0000555555574c41 in parser_module_parse_export_item_list (context_p=0x7fffffffd7b0) at jerryscript/jerry-core/parser/js/js-parser-module.c:422 #8 0x0000555555559acc in parser_parse_export_statement (context_p=0x7fffffffd7b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1758 #9 0x000055555555a23f in parser_parse_statements (context_p=0x7fffffffd7b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2077 #10 0x000055555558f204 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557fe100 <buffer.lto_priv> "export {}\n", source_size=10, parse_opts=0, error_location_p=0x7fffffffd9dc) at jerryscript/jerry-core/parser/js/js-parser.c:2468 #11 0x000055555558fef2 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557fe100 <buffer.lto_priv> "export {}\n", source_size=10, parse_opts=0, bytecode_data_p=0x7fffffffda50) at jerryscript/jerry-core/parser/js/js-parser.c:2937 #12 0x00005555555c289d in jerry_parse (resource_name_p=0x7fffffffe174 "/home/reni/work/fuzzer/data/fuzzinator-configs/test.js", resource_name_length=54, source_p=0x5555557fe100 <buffer.lto_priv> "export {}\n", source_size=10, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:406 #13 0x00005555555c13f4 in main (argc=3, argv=0x7fffffffdd88) at jerryscript/jerry-main/main-unix.c:733 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Segmentation fault in lit_is_valid_cesu8_string
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2820/comments
1
2019-04-12T17:21:03Z
2019-04-25T13:07:30Z
https://github.com/jerryscript-project/jerryscript/issues/2820
432,666,466
2,820
[ "jerryscript-project", "jerryscript" ]
### Version Revision: 40f7b1c2 Build command: `./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=off --logging=on --linker-flag=-fuse-ld=gold --linker-flag=-fsanitize=address --linker-flag=-static-libasan --error-messages=on --profile=es2015-subset` Operating system: `Linux-4.9.0-8-amd64-x86_64-with-debian-9.8` ## Input ```js for ( this << class extends this {} in this ){} ``` ### Backtrace ``` #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff6f2a42a in __GI_abort () at abort.c:89 #2 0x0000555555599f9d in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-port/default/default-fatal.c:71 #3 0x0000555555620b21 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-core/jrt/jrt-fatals.c:58 #4 0x0000555555620b78 in jerry_assert_fail (assertion=0x5555557943a0 "frame_ctx_p->registers_p + register_end + frame_ctx_p->context_depth == stack_top_p", file=0x555555793fe0 "jerryscript//jerry-core/vm/vm.c", function=0x5555557644c0 <__func__.6033.lto_priv.453> "vm_loop", line=1343) at jerryscript//jerry-core/jrt/jrt-fatals.c:82 #5 0x00005555555fe39b in vm_loop.lto_priv.450 (frame_ctx_p=0x7fffffffd8f0) at jerryscript//jerry-core/vm/vm.c:1343 #6 0x00005555555f820a in vm_execute (frame_ctx_p=0x7fffffffd8f0, arg_p=0x0, arg_list_len=0) at jerryscript//jerry-core/vm/vm.c:3477 #7 0x00005555555f88ae in vm_run (bytecode_header_p=0x5555559063e0 <jerry_global_heap+512>, this_binding_value=27, lex_env_p=0x555555906210 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript//jerry-core/vm/vm.c:3595 #8 0x000055555560e29e in vm_run_global (bytecode_p=0x5555559063e0 <jerry_global_heap+512>) at jerryscript//jerry-core/vm/vm.c:273 #9 0x000055555567ace7 in jerry_run (func_val=203) at jerryscript//jerry-core/api/jerry.c:549 #10 0x000055555567e7cf in main (argc=3, argv=0x7fffffffde08) at jerryscript//jerry-main/main-unix.c:742 ```
Assertion 'frame_ctx_p->registers_p + register_end + frame_ctx_p->context_depth == stack_top_p' failed at jerryscript//jerry-core/vm/vm.c(vm_loop):1343
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2819/comments
1
2019-04-12T15:14:35Z
2019-04-24T12:36:20Z
https://github.com/jerryscript-project/jerryscript/issues/2819
432,616,639
2,819
[ "jerryscript-project", "jerryscript" ]
### Jerry Version: Checked revision: 40f7b1c27fa79568deb5a473b60397ea52b787f7 Build: debug.linux ### OS: Ubuntu 16.04, x86_64 ### Testcase: `var a = function(f) { function f() {} function f() {} return arguments; }; a(6);` ### Backtrace: execve("build/bin/jerry", ["build/bin/jerry", "testcase1.js"], [/* 73 vars */]) = 0 brk(NULL) = 0x1818000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=100849, ...}) = 0 mmap(NULL, 100849, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fca08a9a000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fca08a99000 mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fca084c4000 mprotect(0x7fca08684000, 2097152, PROT_NONE) = 0 mmap(0x7fca08884000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7fca08884000 mmap(0x7fca0888a000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fca0888a000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fca08a98000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fca08a97000 arch_prctl(ARCH_SET_FS, 0x7fca08a98700) = 0 mprotect(0x7fca08884000, 16384, PROT_READ) = 0 mprotect(0x633000, 4096, PROT_READ) = 0 mprotect(0x7fca08ab3000, 4096, PROT_READ) = 0 munmap(0x7fca08a9a000, 100849) = 0 brk(NULL) = 0x1818000 brk(0x1839000) = 0x1839000 open("testcase1.js", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0664, st_size=147, ...}) = 0 read(3, "var a = function(f) {\n printf"..., 1048576) = 147 read(3, "", 1044480) = 0 close(3) = 0 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x87a5820} --- +++ killed by SIGSEGV (core dumped) +++ Segmentation fault (core dumped)
Find a Segmentation fault bug
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2817/comments
3
2019-04-11T15:10:31Z
2019-04-11T16:06:27Z
https://github.com/jerryscript-project/jerryscript/issues/2817
432,077,845
2,817
[ "jerryscript-project", "jerryscript" ]
Hi there, as jerryscript already has support for Promises I was curious how much work it would be to support async/await. Currently I am looking into using generators but as generators seem to create relatively simple code I was wondering if this was achievable with a moderate amount of work. Best regards, Paul
async/await support
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2815/comments
6
2019-04-09T05:52:18Z
2020-08-27T12:08:04Z
https://github.com/jerryscript-project/jerryscript/issues/2815
430,779,130
2,815
[ "jerryscript-project", "jerryscript" ]
## Context As part of the new [OpenJS Foundation's bylaws](https://github.com/openjs-foundation/bootstrap/blob/master/artifacts/OpenJS-Foundation-Initial-Merged-Bylaws.pdf), the Cross Project Council (CPC) has been [chartered](https://github.com/openjs-foundation/bootstrap/tree/master/proposals/stage-2/CPC_CHARTER) to serve as the primary governing body for programs and regular support of Foundation projects. For example, it will be responsible for things like infrastructure, travel assistance, CoC support, accepting new projects into the foundation, and mentorship programs to name a few. It will also be responsible for electing board representative(s) to the OpenJS Foundation board of directors. **Any interested person from our project communities can attend CPC meetings and volunteer to participate in tasks.** For most programs, the CPC is expected to operate on the consensus of OpenJS Foundation project members. Issues that require a vote - namely the election of Board representatives and accepting a new project - will be memorialized by a voting CPC membership comprised of up to 2 representatives from Impact level projects and 2 representatives from Growth and At-Large stages. If you'd like more info/context on the governance of the OpenJS Foundation, please let me know or follow this repo. The main point I hope you take away is that the foundation is to be run by and for the projects, and to do that we need participants from the project community. ## Request As an At Large stage project, JerryScript is encouraged to send representatives to participate in CPC meetings, to advise on programs and support that will be helpful to it, and to nominate someone from the project community to serve in a voting capacity. We anticipate having our first 'official' CPC meeting on May 30 or 31 at the Collaborator Summit in Berlin (sidebar, you should come!). In the interim, we would love for project members to participate in the Bootstrap CPC meetings which are currently held on Mondays (watch [this repo](https://github.com/openjs-foundation/bootstrap/issues/150) for meeting details). If this is not the correct forum to raise this, please let me know and I will close the issue and post it in the preferred channel. Note that I'm posting essentially the same message to all OpenJS Foundation project repos, because I want to get the word out and make sure we all have the same information. your pal, Jory
Elect / Nominate representative(s) to the OpenJS Foundation CPC
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2813/comments
1
2019-04-07T19:50:24Z
2020-04-21T10:03:00Z
https://github.com/jerryscript-project/jerryscript/issues/2813
430,184,812
2,813
[ "jerryscript-project", "jerryscript" ]
I have tried to build the Jerryscript mbedOS for NRF52840 platform by using the command "gulp --target=NRF52840_DK". But i have have faced the "core_cm4.h" header file not visible to "nrf52840.h" file. So i have copied the cmsis path header files into "./build/jerryscript/targets/mbedos5/mbed-os/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_14_2/device/" path and then the "core_cm4.h" file issue get resolved. Now i have faced below error, /repel/mbed-js-repl-example$ gulp --target=NRF52840_DK [17:14:11] Using gulpfile ~/repel/mbed-js-repl-example/Gulpfile.js [17:14:11] Starting 'make-build-dir'... [17:14:11] Finished 'make-build-dir' after 135 μs [17:14:11] Starting 'makefile'... [17:14:11] Starting 'bundle'... [17:14:11] Starting 'ignorefile'... [17:14:11] Finished 'ignorefile' after 25 ms [17:14:11] Finished 'makefile' after 44 ms [17:14:11] Starting 'get-jerryscript'... [17:14:11] Finished 'get-jerryscript' after 116 μs [17:14:11] Starting 'getlibs'... [17:14:11] Finished 'getlibs' after 12 ms $ make getlibs make: Nothing to be done for 'getlibs'. [17:14:11] Finished 'bundle' after 99 ms [17:14:11] Starting 'cppify'... [17:14:11] Finished 'cppify' after 25 ms [17:14:11] Starting 'build'... [17:14:12] Found native packages: mbed-js-repl $ make BOARD=NRF52840_DK EXTRAS=/home/pc/repel/mbed-js-repl-example/node_modules/mbed-js-repl/. [17:14:13] build/make [17:14:13] Finished 'build' after 1.72 s [17:14:13] Starting 'default'... [17:14:13] Finished 'default' after 29 μs cd jerryscript/targets/mbedos5 && pip install -r tools/requirements.txt && rm -f source/js_encoded.cpp && rm -f source/pins.cpp && rm -f source/main.cpp && make BOARD=NRF52840_DK EXTRA_SRC="/home/pc/repel/mbed-js-repl-example/node_modules/mbed-js-repl/.:../../../source" EXTERN_BUILD_DIR=../../../out/NRF52840_DK NO_JS=1 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Requirement already satisfied: pycparser<=2.17 in /usr/local/lib/python2.7/dist-packages (from -r tools/requirements.txt (line 1)) (2.17) Requirement already satisfied: simpleeval in /usr/local/lib/python2.7/dist-packages (from -r tools/requirements.txt (line 2)) (0.9.8) Requirement already satisfied: pycparserext in /usr/local/lib/python2.7/dist-packages (from -r tools/requirements.txt (line 3)) (2016.2) Requirement already satisfied: ply>=3.4 in /usr/local/lib/python2.7/dist-packages (from pycparserext->-r tools/requirements.txt (line 3)) (3.11) make[1]: Entering directory '/home/pc/repel/mbed-js-repl-example/build/jerryscript/targets/mbedos5' python tools/generate_pins.py NRF52840_DK Traceback (most recent call last): File "tools/generate_pins.py", line 247, in <module> main() File "tools/generate_pins.py", line 237, in main pins = enumerate_pins(pins_file, ['./tools'] + list(includes), defines) File "tools/generate_pins.py", line 154, in enumerate_pins parser=GnuCParser()) File "/usr/local/lib/python2.7/dist-packages/pycparser/__init__.py", line 93, in parse_file return parser.parse(text, filename) File "/usr/local/lib/python2.7/dist-packages/pycparserext/ext_c_parser.py", line 64, in parse return self.cparser.parse(text, lexer=self.clex, debug=debuglevel) File "/usr/local/lib/python2.7/dist-packages/pycparser/ply/yacc.py", line 331, in parse return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) File "/usr/local/lib/python2.7/dist-packages/pycparser/ply/yacc.py", line 1106, in parseopt_notrack p.callable(pslice) File "/usr/local/lib/python2.7/dist-packages/pycparser/c_parser.py", line 654, in p_decl_body typedef_namespace=True) File "/usr/local/lib/python2.7/dist-packages/pycparser/c_parser.py", line 394, in _build_declarations self._parse_error('Invalid declaration', coord) File "/usr/local/lib/python2.7/dist-packages/pycparser/plyparser.py", line 55, in _parse_error raise ParseError("%s: %s" % (coord, msg)) pycparser.plyparser.ParseError: /home/pc/gcc-arm-none-eabi-6_2-2016q4/arm-none-eabi/include/sys/_stdint.h:48: Invalid declaration Makefile:72: recipe for target 'source/pins.cpp' failed make[1]: Leaving directory '/home/pc/repel/mbed-js-repl-example/build/jerryscript/targets/mbedos5' make[1]: *** [source/pins.cpp] Error 1 Makefile:14: recipe for target 'all' failed make: *** [all] Error 2 events.js:183 throw er; // Unhandled 'error' event ^ Error: Command `make BOARD=NRF52840_DK EXTRAS=/home/pc/repel/mbed-js-repl-example/node_modules/mbed-js-repl/.` exited with code 2 at ChildProcess.handleSubShellExit (/home/pc/repel/mbed-js-repl-example/node_modules/gulp-run/command.js:166:13) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) i have attached "_stdint.h" for reference[_stdint.h.zip](https://github.com/pando-project/jerryscript/files/3043344/_stdint.h.zip) From the file i understood the __uint32_t is invalid. Could you help to resolve this issue. Please note the same source successfully compiled for NRF52832 by using the "NRF52_DK" command. Environment details: Host OS: Ubuntu 16.04 LTS Target : nRF52840 CC Version: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 6.2.1 20161205 Jerryscript Source Repository: https://github.com/ARMmbed/mbed-js-repl-example
Jerryscript not build for NRF52840 target
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2812/comments
9
2019-04-04T12:30:56Z
2019-04-19T14:58:47Z
https://github.com/jerryscript-project/jerryscript/issues/2812
429,251,955
2,812
[ "jerryscript-project", "jerryscript" ]
Function `ecma_utf8_string_to_number("2e23",4) ` result is 200000000000000016777216 ''. It is not correct. The correct result is 199999999999999983222784
ecma_utf8_string_to_number error for "2e23"
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2802/comments
4
2019-03-22T13:33:37Z
2019-05-31T06:31:37Z
https://github.com/jerryscript-project/jerryscript/issues/2802
424,211,377
2,802
[ "jerryscript-project", "jerryscript" ]
I would like to nominate Robert Fancsik to become a JerryScript reviewer. I trust him to follow our process. He has already 60 informal reviews: #2793 Rework usages/naming of configuration macros #2796 Increase branch coverage: Array.prototype functions #2797 Split the Travis checks into two test calls #2789 Make jerryx_port_handler_print_char truly a port function #2715 [Proposal] Introduce new jerry-ext methods to ease method/property registration #2753 Implement handle scope API in jerry-ext #2764 Separate the debugger-client to support the later usage of other communication protocols #2599 Implement ES2015 module system #2754 Compile with clang-7.0 #2759 Fix JSON.stringify #2752 Allow build artifacts on AppVeyor #2751 Added 'instanceof' binary operation to the API #2633 Support Bluetooth communcation JerryScript debugger #2723 Added new 'jerry_value_instanceof' API function. #2746 Added new 'jerry_binary_operation' API function #2717 Increase test coverage: Array.prototype.toString #2725 Added new 'jerry_value_strict_equal' API function. #2682 Increase test coverage: Array.prototype.splice #2722 Fixed unreachable jump statements. #2716 Increase test coverage: Array.prototype.toLocaleString #2718 Use union to convert between jerryx_arg_int_option_t and uintptr_t #2674 Increase test coverage: Array.prototype.sort #2680 Add pkg-config metadata files for libraries #2714 Fix out-of-bounds writes (buffer overflows) in unit tests #2710 Fix buffer overflow while printing unhandled exception #2707 Use logical operators for bool converions. #2706 Fix some type conversions in ecma-builtins. #2684 Update the debugger to work on Windows #2705 Style fix in the lexer.h #2703 Fix api example in the documentation #2697 Bump ESP8266 target to SDK v2.1.0 #2685 Increase test coverage: Array.prototype.indexOf #2688 Increase test coverage: Array.prototype.lastIndexOf #2543 Add RegExp recursion depth limit #2634 Fix named function expression creation. #2628 Fix floating number parsing. #2578 Add new test #2571 Add support for function argument initializers. #2567 Support methods for object initializers. #2572 Fix type conversion errors in case of TizenRT. #2540 Change jerry_port interface to allow for a correct implementation of timezones. #2550 Remove the JERRY_SNAPSHOT_FOUR_BYTE_CPOINTER snapshot flag. #2547 Rework op_construct. #2481 Implement computed properties for object literals. #2432 Support for shorthand object literal notation. #2447 Implement the core of the map object. #2442 Fix a few parser style issues. #2440 Fix for null pointer dereference in jmem_heap_free_block #2419 Migration Guide #2406 Splitting the debugger and console part of the python debugger #2430 Reduce "with" stack consumption by 1. #2424 Fixes for ES2015 classes. #2414 Rework function call. #2410 Add %TypedArray%.prototype.subarray([ begin [, end ] ]) support. #2350 Merge jerry_get_value_without_error and jerry_value_clear_error_flag #2275 Reduce code duplication between Array.forEach, some, and every #2255 Implement toString and join for TypedArrays. #2214 Modified ecma string to utf8 string conversion to reduce binary size. #2165 Add TypedArray C API #2144 Bugfix: add missing stdlib.h include for rand() usage in ecma-builtin-math.c Seconds are welcome.
Nominating Robert Fancsik (@rerobika) to become a JerryScript reviewer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2799/comments
6
2019-03-19T12:25:38Z
2019-03-27T11:48:57Z
https://github.com/jerryscript-project/jerryscript/issues/2799
422,703,562
2,799
[ "jerryscript-project", "jerryscript" ]
Jerry version: Checked revision: 85e0509 OS: ubuntu-14.04.5-desktop-amd64 Build command: python tools/build.py There are two errors show in the file `/jerryscript/build/CMakeFiles/CMakeError.log` as following: Performing C SOURCE FILE Test HAVE_TM_GMTOFF failed with the following output: Change Dir: /home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec1239510574/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec1239510574.dir/build.make CMakeFiles/cmTryCompileExec1239510574.dir/build make[1]: Entering directory `/home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1239510574.dir/src.c.o /usr/bin/cc -D_BSD_SOURCE -D_DEFAULT_SOURCE -flto -fno-fat-lto-objects -std=c99 -pedantic -fno-builtin -fno-stack-protector -Wall -Werror=all -Wextra -Werror=extra -Wformat-nonliteral -Werror=format-nonliteral -Winit-self -Werror=init-self -Wconversion -Werror=conversion -Wsign-conversion -Werror=sign-conversion -Wformat-security -Werror=format-security -Wmissing-declarations -Werror=missing-declarations -Wshadow -Werror=shadow -Wstrict-prototypes -Werror=strict-prototypes -Wundef -Werror=undef -Wold-style-definition -Werror=old-style-definition -Wno-stack-protector -Wno-attributes -Werror -Wlogical-op -Werror=logical-op -DHAVE_TM_GMTOFF -Wno-error=strict-prototypes -Wno-error=old-style-definition -o CMakeFiles/cmTryCompileExec1239510574.dir/src.c.o -c /home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp/src.c /home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp/src.c:4:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes] int main() ^ /home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp/src.c: In function ‘main’: /home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp/src.c:4:5: warning: old-style function definition [-Wold-style-definition] /home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp/src.c:7:4: error: statement with no effect [-Werror=unused-value] tmp->tm_gmtoff; ^ cc1: all warnings being treated as errors make[1]: *** [CMakeFiles/cmTryCompileExec1239510574.dir/src.c.o] Error 1 make[1]: Leaving directory `/home/nisl/yhy/jerryscript/build/CMakeFiles/CMakeTmp' make: *** [cmTryCompileExec1239510574/fast] Error 2 Source file was: #include <time.h> int main() { struct tm* tmp; tmp->tm_gmtoff; return 0; } Maybe for this reason, i have same problem as [issue](https://github.com/pando-project/jerryscript/issues/2193). Although i tried the solution, it still failed.
Performing C SOURCE FILE Test HAVE_TM_GMTOFF failed
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2791/comments
7
2019-03-06T07:47:24Z
2020-10-17T09:32:48Z
https://github.com/jerryscript-project/jerryscript/issues/2791
417,666,172
2,791
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 6d490c72 Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js var id_0; $(encodeURIComponent); function $ ( ) { } array = [ $, $, $, $, $, $, $] ; [0, 0, 0].forEach(function(e) {Object.defineProperty(array, e, {'get' : Int32Array})}) iterator = array.entries(); var id_2 = [ ]; var id_3 = [ ]; var id_4 ; for (var i ; ;) { try { array = iterator.next(); $(Uint8ClampedArray.$[$]) } catch (e) { $(e instanceof ReferenceError) } } ``` ###### Backtrace: ``` ICE: Assertion '!ecma_is_lexical_environment (object_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_get_object_type):228. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c7bb in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56585bbf in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56585bf9 in jerry_assert_fail (assertion=0x565d8410 "!ecma_is_lexical_environment (object_p)", file=0x565e25b4 "jerryscript/jerry-core/ecma/base/ecma-helpers.c", function=0x565ce1d4 <__func__.4001.lto_priv.637> "ecma_get_object_type", line=228) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565abb0c in ecma_get_object_type (object_p=0x566f7980) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:228 #7 0x56584c65 in ecma_is_typedarray (value=1450146179) at jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:750 #8 0x56595e5d in ecma_builtin_array_iterator_prototype_object_next (this_val=1450146371) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c:88 #9 0x56595d65 in ecma_builtin_array_iterator_prototype_dispatch_routine (builtin_routine_id=64, this_arg_value=1450146371, arguments_list=0xffffce64, arguments_number=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.inc.h:30 #10 0x565b57f4 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE, builtin_routine_id=64, this_arg_value=1450146371, arguments_list_p=0xffffce64, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #11 0x565b593f in ecma_builtin_dispatch_call (obj_p=0x566f7ae0, this_arg_value=1450146371, arguments_list_p=0xffffd044, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #12 0x5659aafd in ecma_op_function_call (func_obj_p=0x566f7ae0, this_arg_value=1450146371, arguments_list_p=0xffffd044, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:717 #13 0x5658fefd in opfunc_call (frame_ctx_p=0xffffd06c) at jerryscript/jerry-core/vm/vm.c:541 #14 0x565959a3 in vm_execute (frame_ctx_p=0xffffd06c, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3463 #15 0x56595ba6 in vm_run (bytecode_header_p=0x566f7720, this_binding_value=1450144131, lex_env_p=0x566f71b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3575 #16 0x5658f9a0 in vm_run_global (bytecode_p=0x566f7720) at jerryscript/jerry-core/vm/vm.c:242 #17 0x565bc872 in jerry_run (func_val=1450145923) at jerryscript/jerry-core/api/jerry.c:547 #18 0x565bb23a in main (argc=3, argv=0xffffd304) at jerryscript/jerry-main/main-unix.c:676 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion '!ecma_is_lexical_environment (object_p)' failed in ecma_get_object_type
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2783/comments
0
2019-03-02T14:03:14Z
2019-03-06T17:23:58Z
https://github.com/jerryscript-project/jerryscript/issues/2783
416,400,324
2,783
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 6d490c72 Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js array = [a]; iterator = array.keys(); for (var a;;) { try { array = iterator.next(); a(); } catch (a) { } } ``` ###### Backtrace: ``` ICE: Assertion 'ecma_get_object_type (array_object_p) == ECMA_OBJECT_TYPE_ARRAY' failed at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c(ecma_builtin_array_iterator_prototype_object_next):95. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c7bb in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56585bbf in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56585bf9 in jerry_assert_fail (assertion=0x565de2d8 "ecma_get_object_type (array_object_p) == ECMA_OBJECT_TYPE_ARRAY", file=0x565de270 "jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c", function=0x565d26a0 <__func__.3701.lto_priv.374> "ecma_builtin_array_iterator_prototype_object_next", line=95) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56595eae in ecma_builtin_array_iterator_prototype_object_next (this_val=1450145667) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c:95 #7 0x56595d65 in ecma_builtin_array_iterator_prototype_dispatch_routine (builtin_routine_id=64, this_arg_value=1450145667, arguments_list=0xffffca84, arguments_number=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.inc.h:30 #8 0x565b57f4 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE, builtin_routine_id=64, this_arg_value=1450145667, arguments_list_p=0xffffca84, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #9 0x565b593f in ecma_builtin_dispatch_call (obj_p=0x566f77a0, this_arg_value=1450145667, arguments_list_p=0xffffcc64, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #10 0x5659aafd in ecma_op_function_call (func_obj_p=0x566f77a0, this_arg_value=1450145667, arguments_list_p=0xffffcc64, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:717 #11 0x5658fefd in opfunc_call (frame_ctx_p=0xffffcc7c) at jerryscript/jerry-core/vm/vm.c:541 #12 0x565959a3 in vm_execute (frame_ctx_p=0xffffcc7c, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3463 #13 0x56595ba6 in vm_run (bytecode_header_p=0x566f75b0, this_binding_value=1450144131, lex_env_p=0x566f71b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3575 #14 0x5658f9a0 in vm_run_global (bytecode_p=0x566f75b0) at jerryscript/jerry-core/vm/vm.c:242 #15 0x565bc872 in jerry_run (func_val=1450145363) at jerryscript/jerry-core/api/jerry.c:547 #16 0x565bb23a in main (argc=3, argv=0xffffcf14) at jerryscript/jerry-main/main-unix.c:676 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'ecma_get_object_type (array_object_p) == ECMA_OBJECT_TYPE_ARRAY' failed in ecma_builtin_array_iterator_prototype_object_next
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2782/comments
0
2019-03-01T19:59:07Z
2019-03-13T12:56:02Z
https://github.com/jerryscript-project/jerryscript/issues/2782
416,257,189
2,782
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: 6d490c72 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js var typedArrayTypes = [Int8Array]; typedArrayTypes.forEach(function(){ Map.prototype.toString()} ); ``` ###### Backtrace: ``` ICE: Assertion 'ecma_object_check_class_name_is_object (obj_p)' failed at jerryscript/jerry-core/ecma/operations/ecma-objects.c(ecma_object_get_class_name):1939. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff7a24801 in __GI_abort () at abort.c:79 #2 0x000055555555f7d3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x000055555558aef0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x000055555558af42 in jerry_assert_fail (assertion=0x5555555e6158 "ecma_object_check_class_name_is_object (obj_p)", file=0x5555555e5cc8 "jerryscript/jerry-core/ecma/operations/ecma-objects.c", function=0x5555555d56b0 <__func__.4491.lto_priv.502> "ecma_object_get_class_name", line=1939) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x00005555555a79b3 in ecma_object_get_class_name (obj_p=0x5555558fc568 <jerry_global_heap+384>) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1939 #6 0x00005555555b61e6 in ecma_builtin_helper_object_to_string (this_arg=387) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:141 #7 0x00005555555874f4 in ecma_builtin_object_prototype_object_to_string (this_arg=387) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:59 #8 0x000055555558746f in ecma_builtin_object_prototype_dispatch_routine (builtin_routine_id=64, this_arg_value=387, arguments_list=0x7fffffffd4c4, arguments_number=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.inc.h:32 #9 0x00005555555bb90d in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, builtin_routine_id=64, this_arg_value=387, arguments_list_p=0x7fffffffd4c4, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #10 0x00005555555bba5f in ecma_builtin_dispatch_call (obj_p=0x5555558fc588 <jerry_global_heap+416>, this_arg_value=387, arguments_list_p=0x7fffffffd76c, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #11 0x000055555559fa9e in ecma_op_function_call (func_obj_p=0x5555558fc588 <jerry_global_heap+416>, this_arg_value=387, arguments_list_p=0x7fffffffd76c, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:717 #12 0x0000555555595c48 in opfunc_call.lto_priv.386 (frame_ctx_p=0x7fffffffd7a0) at jerryscript/jerry-core/vm/vm.c:541 #13 0x000055555557775b in vm_execute (frame_ctx_p=0x7fffffffd7a0, arg_p=0x7fffffffd9b0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3463 #14 0x0000555555577a0b in vm_run (bytecode_header_p=0x5555558fc6a0 <jerry_global_heap+696>, this_binding_value=27, lex_env_p=0x5555558fc418 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x7fffffffd9b0, arg_list_len=3) at jerryscript/jerry-core/vm/vm.c:3575 #15 0x000055555559fd07 in ecma_op_function_call (func_obj_p=0x5555558fc548 <jerry_global_heap+352>, this_arg_value=72, arguments_list_p=0x7fffffffd9b0, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:793 #16 0x000055555557b431 in ecma_builtin_array_apply (arg1=355, arg2=72, mode=ARRAY_ROUTINE_FOREACH, obj_p=0x5555558fc4d8 <jerry_global_heap+240>, len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:1627 #17 0x000055555557c4f4 in ecma_builtin_array_prototype_dispatch_routine (builtin_routine_id=80, this_arg=243, arguments_list_p=0x7fffffffda84, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2277 #18 0x00005555555bb90d in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_ARRAY_PROTOTYPE, builtin_routine_id=80, this_arg_value=243, arguments_list_p=0x7fffffffda84, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #19 0x00005555555bba5f in ecma_builtin_dispatch_call (obj_p=0x5555558fc528 <jerry_global_heap+320>, this_arg_value=243, arguments_list_p=0x7fffffffdd2c, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #20 0x000055555559fa9e in ecma_op_function_call (func_obj_p=0x5555558fc528 <jerry_global_heap+320>, this_arg_value=243, arguments_list_p=0x7fffffffdd2c, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:717 #21 0x0000555555595c48 in opfunc_call.lto_priv.386 (frame_ctx_p=0x7fffffffdd70) at jerryscript/jerry-core/vm/vm.c:541 #22 0x000055555557775b in vm_execute (frame_ctx_p=0x7fffffffdd70, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3463 #23 0x0000555555577a0b in vm_run (bytecode_header_p=0x5555558fc5e8 <jerry_global_heap+512>, this_binding_value=27, lex_env_p=0x5555558fc418 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3575 #24 0x00005555555956e9 in vm_run_global (bytecode_p=0x5555558fc5e8 <jerry_global_heap+512>) at jerryscript/jerry-core/vm/vm.c:242 #25 0x00005555555c2483 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:547 #26 0x00005555555c0d7f in main (argc=3, argv=0x7fffffffe1a8) at jerryscript/jerry-main/main-unix.c:676 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'ecma_object_check_class_name_is_object (obj_p)' failed in ecma_object_get_class_name
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2779/comments
0
2019-02-27T21:24:48Z
2019-03-06T17:19:00Z
https://github.com/jerryscript-project/jerryscript/issues/2779
415,333,733
2,779
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: d4e27d30 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```js var $ = function (a, b, ...argArr0) { if (arguments); } ``` ###### Backtrace: ``` ICE: Assertion 'argument_count == context_p->argument_count' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_generate_initializers):604. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff7a24801 in __GI_abort () at abort.c:79 #2 0x000055555555f7d3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x000055555558aef0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x000055555558af42 in jerry_assert_fail (assertion=0x5555555e1c80 "argument_count == context_p->argument_count", file=0x5555555e1aa0 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x5555555d7270 <__func__.5176.lto_priv.411> "parser_generate_initializers", line=604) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x000055555558ee08 in parser_generate_initializers (context_p=0x7fffffffd710, dst_p=0x5555558fc682 <jerry_global_heap+666> "", literal_pool_p=0x5555558fc660 <jerry_global_heap+632>, uninitialized_var_end=3, initialized_var_end=6, literal_one_byte_limit=254) at jerryscript/jerry-core/parser/js/js-parser.c:604 #6 0x0000555555590264 in parser_post_processing (context_p=0x7fffffffd710) at jerryscript/jerry-core/parser/js/js-parser.c:1837 #7 0x0000555555591b05 in parser_parse_function (context_p=0x7fffffffd710, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser.c:2688 #8 0x000055555556fabd in lexer_construct_function_object (context_p=0x7fffffffd710, extra_status_flags=14) at jerryscript/jerry-core/parser/js/js-lexer.c:2004 #9 0x00005555555722c8 in parser_parse_function_expression (context_p=0x7fffffffd710, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser-expr.c:957 #10 0x0000555555572bf4 in parser_parse_unary_expression (context_p=0x7fffffffd710, grouping_level_p=0x7fffffffd5a8) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1327 #11 0x0000555555574934 in parser_parse_expression (context_p=0x7fffffffd710, options=5) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2174 #12 0x00005555555765df in parser_parse_var_statement.lto_priv.184 (context_p=0x7fffffffd710) at jerryscript/jerry-core/parser/js/js-parser-statm.c:352 #13 0x000055555555a39c in parser_parse_statements (context_p=0x7fffffffd710) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1889 #14 0x00005555555913a7 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557fb100 <buffer.lto_priv> "var $ = function (a, b, ...argArr0) {\n if (arguments);\n}", source_size=59, parse_opts=0, error_location_p=0x7fffffffd92c) at jerryscript/jerry-core/parser/js/js-parser.c:2445 #15 0x0000555555592039 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557fb100 <buffer.lto_priv> "var $ = function (a, b, ...argArr0) {\n if (arguments);\n}", source_size=59, parse_opts=0, bytecode_data_p=0x7fffffffd9a0) at jerryscript/jerry-core/parser/js/js-parser.c:2896 #16 0x00005555555c21a8 in jerry_parse ( resource_name_p=0x7fffffffe0c3 "jerryscript/reduce/test15.js.20190226_093911/test15.js", resource_name_length=74, source_p=0x5555557fb100 <buffer.lto_priv> "var $ = function (a, b, ...argArr0) {\n if (arguments);\n}", source_size=59, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:404 #17 0x00005555555c0d4a in main (argc=3, argv=0x7fffffffdcc8) at jerryscript/jerry-main/main-unix.c:667 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
Assertion 'argument_count == context_p->argument_count' failed in parser_generate_initializers
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2777/comments
0
2019-02-26T08:43:10Z
2019-03-06T17:16:11Z
https://github.com/jerryscript-project/jerryscript/issues/2777
414,492,674
2,777
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: d4e27d30 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: [Download](https://github.com/pando-project/jerryscript/files/2899704/test.txt) ###### Backtrace: ``` Script Error: TypeError: The structure is cyclical. ICE: Assertion 'ECMA_PROPERTY_GET_NAME_TYPE (property) == ECMA_DIRECT_STRING_MAGIC && property_pair_p->names_cp[index] >= LIT_FIRST_INTERNAL_MAGIC_STRING' failed at jerryscript/jerry-core/ecma/base/ecma-gc.c(ecma_gc_mark_property):198. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff7a24801 in __GI_abort () at abort.c:79 #2 0x000055555555f7d3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x000055555558aef0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x000055555558af42 in jerry_assert_fail ( assertion=0x5555555eadc8 "ECMA_PROPERTY_GET_NAME_TYPE (property) == ECMA_DIRECT_STRING_MAGIC && property_pair_p->names_cp[index] >= LIT_FIRST_INTERNAL_MAGIC_STRING", file=0x5555555eacd0 "jerryscript/jerry-core/ecma/base/ecma-gc.c", function=0x5555555d1fd0 <__func__.4689.lto_priv.716> "ecma_gc_mark_property", line=198) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x00005555555c6de2 in ecma_gc_mark_property (property_pair_p=0x5555558fc558 <jerry_global_heap+368>, index=0) at jerryscript/jerry-core/ecma/base/ecma-gc.c:197 #6 0x00005555555c7425 in ecma_gc_mark (object_p=0x5555558fc638 <jerry_global_heap+592>) at jerryscript/jerry-core/ecma/base/ecma-gc.c:474 #7 0x00005555555c7f9e in ecma_gc_run (severity=JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW) at jerryscript/jerry-core/ecma/base/ecma-gc.c:880 #8 0x00005555555b3f6d in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:66 #9 0x00005555555c1e73 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:213 #10 0x00005555555c1292 in main (argc=3, argv=0x7fffffffdcc8) at jerryscript/jerry-main/main-unix.c:874 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'ECMA_PROPERTY_GET_NAME_TYPE (property) == ECMA_DIRECT_STRING_MAGIC && property_pair_p->names_cp[index] >= LIT_FIRST_INTERNAL_MAGIC_STRING' failed in ecma_gc_mark_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2775/comments
0
2019-02-25T09:18:03Z
2019-03-06T17:11:01Z
https://github.com/jerryscript-project/jerryscript/issues/2775
414,004,666
2,775
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: d4e27d30 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: [Download](https://github.com/pando-project/jerryscript/files/2899642/test.txt) ###### Backtrace: ``` Script Error: TypeError: The structure is cyclical. Program received signal SIGSEGV, Segmentation fault. 0x000055555558ae34 in jmem_pools_collect_empty () at jerryscript/jerry-core/jmem/jmem-poolman.c:158 158 jmem_pools_chunk_t *const next_p = chunk_p->next_p; (gdb) bt #0 0x000055555558ae34 in jmem_pools_collect_empty () at jerryscript/jerry-core/jmem/jmem-poolman.c:158 #1 0x000055555558acd7 in jmem_pools_finalize () at jerryscript/jerry-core/jmem/jmem-poolman.c:40 #2 0x000055555558a146 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:161 #3 0x00005555555c1eff in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:228 #4 0x00005555555c1292 in main (argc=2, argv=0x7fffffffdcf8) at jerryscript/jerry-main/main-unix.c:874 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Segmentation fault in jmem_pools_collect_empty
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2774/comments
0
2019-02-25T08:59:40Z
2019-03-06T17:11:01Z
https://github.com/jerryscript-project/jerryscript/issues/2774
413,996,925
2,774
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: d4e27d30 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript Object.defineProperty(Array.prototype, 0, {set: function() { return Array.prototype.push(), Object.freeze(Array.prototype)}}); Promise.all([0]); ``` ###### Backtrace: ``` ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff7a24801 in __GI_abort () at abort.c:79 #2 0x000055555555f7d3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x000055555558aef0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x000055555558af42 in jerry_assert_fail (assertion=0x5555555e1188 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x5555555e1108 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5555555d5dc0 <__func__.3887.lto_priv.467> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x000055555558a4d6 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143 #6 0x000055555558a14b in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #7 0x00005555555c1eff in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:228 #8 0x00005555555c1292 in main (argc=3, argv=0x7fffffffe1a8) at jerryscript/jerry-main/main-unix.c:874 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2770/comments
0
2019-02-23T09:14:23Z
2019-03-07T07:04:20Z
https://github.com/jerryscript-project/jerryscript/issues/2770
413,676,225
2,770
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: d4e27d30 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript delete JSON[Symbol.toStringTag]; JSON[Symbol.toStringTag ] = "𖠀"; Map.prototype.toString.call(JSON); ``` ###### Backtrace: ``` ICE: Assertion 'lit_is_valid_cesu8_string (string_p, string_size)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c(ecma_new_ecma_string_from_utf8):247. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff7a24801 in __GI_abort () at abort.c:79 #2 0x000055555555f7d3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x000055555558aef0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x000055555558af42 in jerry_assert_fail (assertion=0x5555555eb990 "lit_is_valid_cesu8_string (string_p, string_size)", file=0x5555555e7328 "jerryscript/jerry-core/ecma/base/ecma-helpers-string.c", function=0x5555555d2490 <__func__.3354.lto_priv.688> "ecma_new_ecma_string_from_utf8", line=247) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x00005555555cd17e in ecma_new_ecma_string_from_utf8 (string_p=0x5555558fc5a8 <jerry_global_heap+448> "[object 𖠀]\004\005\005\330\002", string_size=13) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:247 #6 0x00005555555b6082 in ecma_builtin_helper_object_to_string_tag_helper (tag_value=641) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:92 #7 0x00005555555b6244 in ecma_builtin_helper_object_to_string (this_arg=219) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:155 #8 0x00005555555874f4 in ecma_builtin_object_prototype_object_to_string (this_arg=219) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:59 #9 0x000055555558746f in ecma_builtin_object_prototype_dispatch_routine (builtin_routine_id=64, this_arg_value=219, arguments_list=0x7fffffffd844, arguments_number=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.inc.h:32 #10 0x00005555555bb90d in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, builtin_routine_id=64, this_arg_value=219, arguments_list_p=0x7fffffffd844, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #11 0x00005555555bba5f in ecma_builtin_dispatch_call (obj_p=0x5555558fc568 <jerry_global_heap+384>, this_arg_value=219, arguments_list_p=0x7fffffffda88, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #12 0x000055555559fa9e in ecma_op_function_call (func_obj_p=0x5555558fc568 <jerry_global_heap+384>, this_arg_value=219, arguments_list_p=0x7fffffffda88, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:717 #13 0x000055555557fc14 in ecma_builtin_function_prototype_object_call (this_arg=387, arguments_list_p=0x7fffffffda84, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:219 #14 0x000055555557f7fe in ecma_builtin_function_prototype_dispatch_routine (builtin_routine_id=66, this_arg_value=387, arguments_list=0x7fffffffda84, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.inc.h:42 #15 0x00005555555bb90d in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, builtin_routine_id=66, this_arg_value=387, arguments_list_p=0x7fffffffda84, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #16 0x00005555555bba5f in ecma_builtin_dispatch_call (obj_p=0x5555558fc588 <jerry_global_heap+416>, this_arg_value=387, arguments_list_p=0x7fffffffdd2c, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #17 0x000055555559fa9e in ecma_op_function_call (func_obj_p=0x5555558fc588 <jerry_global_heap+416>, this_arg_value=387, arguments_list_p=0x7fffffffdd2c, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:717 #18 0x0000555555595c48 in opfunc_call.lto_priv.386 (frame_ctx_p=0x7fffffffdd70) at jerryscript/jerry-core/vm/vm.c:541 #19 0x000055555557775b in vm_execute (frame_ctx_p=0x7fffffffdd70, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3463 #20 0x0000555555577a0b in vm_run (bytecode_header_p=0x5555558fc680 <jerry_global_heap+664>, this_binding_value=27, lex_env_p=0x5555558fc418 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3575 #21 0x00005555555956e9 in vm_run_global (bytecode_p=0x5555558fc680 <jerry_global_heap+664>) at jerryscript/jerry-core/vm/vm.c:242 #22 0x00005555555c2483 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:547 #23 0x00005555555c0d7f in main (argc=3, argv=0x7fffffffe1a8) at jerryscript/jerry-main/main-unix.c:676 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'lit_is_valid_cesu8_string (string_p, string_size)' failed in ecma_new_ecma_string_from_utf8
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2769/comments
0
2019-02-23T09:09:57Z
2019-03-06T17:45:51Z
https://github.com/jerryscript-project/jerryscript/issues/2769
413,675,919
2,769
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: d4e27d30 Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript new Object(Symbol()); ``` ###### Backtrace: ``` ICE: Assertion 'ecma_is_value_undefined (value) || ecma_is_value_null (value)' failed at jerryscript/jerry-core/ecma/operations/ecma-objects-general.c(ecma_op_create_object_object_arg):92. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff7a24801 in __GI_abort () at abort.c:79 #2 0x000055555555f7d3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #3 0x000055555558aef0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #4 0x000055555558af42 in jerry_assert_fail (assertion=0x5555555e5818 "ecma_is_value_undefined (value) || ecma_is_value_null (value)", file=0x5555555e57c0 "jerryscript/jerry-core/ecma/operations/ecma-objects-general.c", function=0x5555555d5400 <__func__.3859.lto_priv.139> "ecma_op_create_object_object_arg", line=92) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #5 0x00005555555a393e in ecma_op_create_object_object_arg (value=268) at jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:91 #6 0x0000555555587d13 in ecma_builtin_object_dispatch_construct (arguments_list_p=0x7fffffffdd34, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object.c:92 #7 0x00005555555bbbe9 in ecma_builtin_dispatch_construct (obj_p=0x5555558fc4c0 <jerry_global_heap+216>, arguments_list_p=0x7fffffffdd34, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1075 #8 0x00005555555a0589 in ecma_op_function_construct (func_obj_p=0x5555558fc4c0 <jerry_global_heap+216>, this_arg_value=72, arguments_list_p=0x7fffffffdd34, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1048 #9 0x0000555555595e26 in opfunc_construct.lto_priv.384 (frame_ctx_p=0x7fffffffdd70) at jerryscript/jerry-core/vm/vm.c:625 #10 0x0000555555577777 in vm_execute (frame_ctx_p=0x7fffffffdd70, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3475 #11 0x0000555555577a0b in vm_run (bytecode_header_p=0x5555558fc5e8 <jerry_global_heap+512>, this_binding_value=27, lex_env_p=0x5555558fc418 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3575 #12 0x00005555555956e9 in vm_run_global (bytecode_p=0x5555558fc5e8 <jerry_global_heap+512>) at jerryscript/jerry-core/vm/vm.c:242 #13 0x00005555555c2483 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:547 #14 0x00005555555c0d7f in main (argc=3, argv=0x7fffffffe1a8) at jerryscript/jerry-main/main-unix.c:676 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'ecma_is_value_undefined (value) || ecma_is_value_null (value)' failed in ecma_op_create_object_object_arg
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2768/comments
0
2019-02-23T09:05:34Z
2019-03-06T16:12:04Z
https://github.com/jerryscript-project/jerryscript/issues/2768
413,675,583
2,768
[ "jerryscript-project", "jerryscript" ]
I'm attempting to build for the Particle Argon. Jerryscript compiles but I get an error while linking. ``` /tmp/cczdc53K.ltrans0.ltrans.o: In function `jerry_fatal': /wrk/jerryscript/jerry-core/jrt/jrt-fatals.c:58: undefined reference to `jerry_port_fatal' ``` I'm using a modified copy of `targets/particle/Makefile.particle` to get this going: * Updated `EXT_CFLAGS` to match Particle's firmware [v0.8.0-rc.27 makefile](https://github.com/particle-iot/device-os/blob/v0.8.0-rc.27/build/arm-tools.mk#L30-L51). ``` EXT_CFLAGS += -g3 -gdwarf-2 -Os -mcpu=cortex-m4 -mthumb -mabi=aapcs EXT_CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -flto ``` * Updated `PLATFORM`, added `ARM_CPU`, and removed `LDFLAGS`. ``` PARTICLE_BUILD_CONFIG = \ INCLUDE_DIRS=$(JERRYDIR)/jerry-core/include \ LIBS=jerry-core \ PLATFORM=argon \ LIB_DIRS=$(BUILD_DIR)/lib \ APPDIR=$(JERRYDIR)/targets/particle/source \ TARGET_FILE=jerry_main \ TARGET_DIR=$(BUILD_DIR) \ ARM_CPU=cortex-m4 ``` * Updated jerrycore build options: ``` -DCMAKE_SYSTEM_PROCESSOR=cortex-m4 ```
Building for Particle Argon
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2763/comments
10
2019-02-19T02:53:15Z
2019-06-28T17:24:07Z
https://github.com/jerryscript-project/jerryscript/issues/2763
411,721,291
2,763
[ "jerryscript-project", "jerryscript" ]
Why function 'jerry_fatal' just terminate the program instead of doing jerry clean and exits normally?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2762/comments
1
2019-02-18T11:44:45Z
2019-02-28T08:40:55Z
https://github.com/jerryscript-project/jerryscript/issues/2762
411,436,812
2,762
[ "jerryscript-project", "jerryscript" ]
Hello friends, I want to run Jerryscript on stm32l452re with Zephyr as os. is there any successful implementation guide for it? because I searched and could not find one. if there is any please respond. Thank you
jerryscript on stm32l452re
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2761/comments
2
2019-02-17T21:09:11Z
2019-02-18T08:42:51Z
https://github.com/jerryscript-project/jerryscript/issues/2761
411,235,300
2,761
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: f22eea5c Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --linker-flag=-fuse-ld=gold --error-messages=on --logging=on --profile=es2015-subset ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript var v0 = Function('return this;')( ); var v1 = (new Int8Array(149)).subarray(78); var $ = $(v1.set(v1)); ``` ###### Backtrace: ``` ================================================================= ==11818==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5b03934 at pc 0xf79ef7b2 bp 0xffee67f8 sp 0xffee63c8 WRITE of size 71 at 0xf5b03934 thread T0 #0 0xf79ef7b1 in memmove (/usr/lib32/libasan.so.4+0x7a7b1) #1 0x566482e6 in ecma_op_typedarray_set_with_typedarray jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:773 #2 0x566484da in ecma_builtin_typedarray_prototype_set jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:814 #3 0x566461fb in ecma_builtin_typedarray_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:67 #4 0x56644f67 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1016 #5 0x566451c8 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1041 #6 0x566529b6 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:716 #7 0x56613697 in opfunc_call jerryscript/jerry-core/vm/vm.c:541 #8 0x56623b1d in vm_execute jerryscript/jerry-core/vm/vm.c:3491 #9 0x56624393 in vm_run jerryscript/jerry-core/vm/vm.c:3603 #10 0x5661292e in vm_run_global jerryscript/jerry-core/vm/vm.c:242 #11 0x56660fb2 in jerry_run jerryscript/jerry-core/api/jerry.c:546 #12 0x5665dad4 in main jerryscript/jerry-main/main-unix.c:676 #13 0xf7793e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #14 0x56594c40 (jerryscript/gcc_asan_debug/bin/jerry+0x14c40) 0xf5b03934 is located 7 bytes to the right of 173-byte region [0xf5b03880,0xf5b0392d) allocated by thread T0 here: #0 0xf7a5af34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x5663b47c in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:286 #2 0x5663b54a in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:320 #3 0x5663b61e in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:366 #4 0x566244b9 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:112 #5 0x566815f2 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x5664c3af in ecma_arraybuffer_new_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x5663860b in ecma_typedarray_create_object_with_length jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:246 #8 0x56639bf3 in ecma_op_create_typedarray jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:624 #9 0x56645ca2 in ecma_typedarray_helper_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.c:219 #10 0x56645944 in ecma_builtin_int8array_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c:68 #11 0x5664544e in ecma_builtin_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1075 #12 0x56653806 in ecma_op_function_construct jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1047 #13 0x56613c0f in opfunc_construct jerryscript/jerry-core/vm/vm.c:625 #14 0x56623b3d in vm_execute jerryscript/jerry-core/vm/vm.c:3503 #15 0x56624393 in vm_run jerryscript/jerry-core/vm/vm.c:3603 #16 0x5661292e in vm_run_global jerryscript/jerry-core/vm/vm.c:242 #17 0x56660fb2 in jerry_run jerryscript/jerry-core/api/jerry.c:546 #18 0x5665dad4 in main jerryscript/jerry-main/main-unix.c:676 #19 0xf7793e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.4+0x7a7b1) in memmove Shadow bytes around the buggy address: 0x3eb606d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eb606e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eb606f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eb60700: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eb60710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x3eb60720: 00 00 00 00 00 05[fa]fa fa fa fa fa fa fa fd fd 0x3eb60730: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x3eb60740: fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eb60750: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eb60760: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eb60770: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==11818==ABORTING ``` When creating a non-ASAN binary with build command: ``` ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on ``` Then we get an invalid free issue with this trace: ``` free(): invalid pointer Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0xf7e23bd3 in ?? () from /lib/i386-linux-gnu/libc.so.6 #4 0xf7e2a7ed in ?? () from /lib/i386-linux-gnu/libc.so.6 #5 0xf7e2bf0b in ?? () from /lib/i386-linux-gnu/libc.so.6 #6 0x565a6e28 in jmem_heap_free_block (ptr=0x566f5830, size=16) at jerryscript/jerry-core/jmem/jmem-heap.c:490 #7 0x565a7074 in jmem_pools_collect_empty () at jerryscript/jerry-core/jmem/jmem-poolman.c:175 #8 0x565a6c44 in jmem_run_free_unused_memory_callbacks (severity=JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW) at jerryscript/jerry-core/jmem/jmem-allocator.c:270 #9 0x565a6d0d in jmem_heap_gc_and_alloc_block (size=24, ret_null_on_error=false) at jerryscript/jerry-core/jmem/jmem-heap.c:317 #10 0x565a6de3 in jmem_heap_alloc_block (size=24) at jerryscript/jerry-core/jmem/jmem-heap.c:366 #11 0x565939f9 in ecma_alloc_extended_object (size=24) at jerryscript/jerry-core/ecma/base/ecma-alloc.c:112 #12 0x565a99f6 in ecma_create_object (prototype_object_p=0x566f5160, ext_object_size=24, type=ECMA_OBJECT_TYPE_GENERAL) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #13 0x565b2b97 in ecma_instantiate_builtin (obj_builtin_id=ECMA_BUILTIN_ID_ERROR_PROTOTYPE) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:382 #14 0x565b2ac3 in ecma_instantiate_builtin (obj_builtin_id=ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:357 #15 0x565b290b in ecma_builtin_get (builtin_id=ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:297 #16 0x56597d6f in ecma_new_standard_error (error_type=ECMA_ERROR_TYPE) at jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:135 #17 0x56597ee5 in ecma_raise_standard_error (error_type=ECMA_ERROR_TYPE, msg_p=0x0) at jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:235 #18 0x56597fbd in ecma_raise_type_error (msg_p=0x0) at jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:405 #19 0x5658dbe5 in opfunc_call (frame_ctx_p=0xffffccec) at jerryscript/jerry-core/vm/vm.c:535 #20 0x5659374f in vm_execute (frame_ctx_p=0xffffccec, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3491 #21 0x56593952 in vm_run (bytecode_header_p=0x566f5560, this_binding_value=1450135939, lex_env_p=0x566f51b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3603 #22 0x5658d6b7 in vm_run_global (bytecode_p=0x566f5560) at jerryscript/jerry-core/vm/vm.c:242 #23 0x565bbc11 in jerry_run (func_val=1450137171) at jerryscript/jerry-core/api/jerry.c:546 #24 0x565ba5e8 in main (argc=2, argv=0xffffcf84) at jerryscript/jerry-main/main-unix.c:676 ``` Commenting out the first line of the test (the declaration of `v0`) and executing it with the non-ASAN build results in an assertion failure: ``` ICE: Assertion 'object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE' failed at jerryscript/jerry-core/ecma/base/ecma-gc.c(ecma_deref_object):151. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c778 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0bc4 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0bfe in jerry_assert_fail (assertion=0x565e547c "object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE", file=0x565e53bc "jerryscript/jerry-core/ecma/base/ecma-gc.c", function=0x565cee2c <__func__.4279.lto_priv.128> "ecma_deref_object", line=151) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565b9108 in ecma_deref_object (object_p=0x566f9790) at jerryscript/jerry-core/ecma/base/ecma-gc.c:151 #7 0x565c5c91 in ecma_free_value (value=1450153875) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1049 #8 0x5658e485 in opfunc_call (frame_ctx_p=0xffffccdc) at jerryscript/jerry-core/vm/vm.c:557 #9 0x56593f98 in vm_execute (frame_ctx_p=0xffffccdc, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3491 #10 0x5659419b in vm_run (bytecode_header_p=0x566f9560, this_binding_value=1450152323, lex_env_p=0x566f91b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3603 #11 0x5658dec9 in vm_run_global (bytecode_p=0x566f9560) at jerryscript/jerry-core/vm/vm.c:242 #12 0x565b47aa in jerry_run (func_val=1450153459) at jerryscript/jerry-core/api/jerry.c:546 #13 0x565b3172 in main (argc=3, argv=0xffffcf74) at jerryscript/jerry-main/main-unix.c:676 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
heap-buffer-overflow in ecma_op_typedarray_set_with_typedarray
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2757/comments
0
2019-02-12T19:03:48Z
2019-02-21T12:24:53Z
https://github.com/jerryscript-project/jerryscript/issues/2757
409,453,194
2,757
[ "jerryscript-project", "jerryscript" ]
###### Jerry version: ``` Checked revision: f22eea5c Build command: ./tools/build.py --clean --debug ``` ###### OS: ``` Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic ``` ###### Test case: ```javascript var v0 = Object.freeze(RegExp($, "g")).exec(); var $ = v0.every(Function("a1,a2,a3", "this.shifted=a3+a2+a1.length;"), v0.hasOwnProperty); ``` ###### Backtrace: ``` ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5655c778 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565a0bc4 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565a0bfe in jerry_assert_fail (assertion=0x565e7a48 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", file=0x565e79fc "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x565cfda8 <__func__.3836.lto_priv.626> "ecma_free_string_list", line=43) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565c9976 in ecma_free_string_list (string_list_p=0x566f96c0) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43 #7 0x565c9a12 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:63 #8 0x565c91ba in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:67 #9 0x565b41dc in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:212 #10 0x565b368f in main (argc=3, argv=0xffffcf74) at jerryscript/jerry-main/main-unix.c:874 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2755/comments
0
2019-02-11T10:22:09Z
2019-02-13T11:50:02Z
https://github.com/jerryscript-project/jerryscript/issues/2755
408,713,359
2,755
[ "jerryscript-project", "jerryscript" ]
I found a memory leak when loading and releasing dynamic function snapshot. My code looks like that: ``` jerry_value_t return_value; return_value = jerry_load_function_snapshot(snapshot, snapshot_size, 0, JERRY_SNAPSHOT_EXEC_ALLOW_STATIC); // The current allocated heap increase 3984 bytes jerry_release_value(return_value); jerry_gc(JERRY_GC_SEVERITY_HIGH); // The current allocated heap decrease 2224 bytes return_value = jerry_load_function_snapshot(snapshot, snapshot_size, 0, JERRY_SNAPSHOT_EXEC_ALLOW_STATIC); // The current allocated heap increase 2112 bytes jerry_release_value(return_value); jerry_gc(JERRY_GC_SEVERITY_HIGH); // The current allocated heap decrease 2224 bytes ``` The issue was not happened if I use static snapshot instead of dynamic snapshot (the heap always increases and decreases by exactly 24 bytes). I just want to know where does this leak come from, and is there anyway to remove a loaded dynamic snapshot completely?
Question: How to remove dynamic function snapshot completely?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2749/comments
8
2019-02-02T16:47:07Z
2019-07-01T07:51:13Z
https://github.com/jerryscript-project/jerryscript/issues/2749
405,999,390
2,749
[ "jerryscript-project", "jerryscript" ]
Are there any plans to support Set() defined by ES6? And report a bug: Map() did not support forEach() method.
Are there any plans to support Set() defined by ES6?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/2745/comments
5
2019-01-31T14:01:50Z
2019-09-26T23:06:58Z
https://github.com/jerryscript-project/jerryscript/issues/2745
405,259,452
2,745