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" ]
###### JerryScript revision da5b058 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` function f1(actual, expected) { if (this.mark = 0) throw new Error('bad value: ' + actual); } function f2(a, b, c) { } Object.defineProperty(f2, "length", { writable: true, configurable: true, value: 175577867 }); f1(f2.bind().length, 4); ``` ###### Output ``` ICE: Assertion 'ECMA_IS_INTEGER_NUMBER (integer_value)' failed at /home/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_make_integer_value):474. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
ICE: Assertion 'ECMA_IS_INTEGER_NUMBER (integer_value)' in ecma_make_integer_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4043/comments
0
2020-07-25T11:05:51Z
2020-07-28T08:45:02Z
https://github.com/jerryscript-project/jerryscript/issues/4043
665,565,840
4,043
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision da5b058 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` var f1 = ([].length = { valueOf: function() { count++; return 1; } }) => {} ``` ###### Output ``` ICE: Assertion 'context_p->token.type == LEXER_ARROW' failed at /home/jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_arrow_function):2626. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->token.type == LEXER_ARROW' in parser_parse_arrow_function
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4042/comments
0
2020-07-25T10:56:31Z
2020-07-28T08:53:09Z
https://github.com/jerryscript-project/jerryscript/issues/4042
665,564,623
4,042
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 04f0a7a670d41deeff426770c0e104f4109c30f2 ###### Build platform Ubuntu 18.04.3 LTS (Linux 5.0.0-37-generic x86_64) ###### 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 --lto=off ``` Note that this bug crash can be triggered on even 64-bit builds of the Jerry intepreter and using default profiles as well. ###### Test case ``` f=Math.max(Object.setPrototypeOf(this,[this])); ``` ###### Output ``` Error: ERR_REF_COUNT_LIMIT [1] 6720 abort (core dumped) ./build/bin/jerry poc.js ``` ###### Backtrace ``` #0 0xf7fd5939 in __kernel_vsyscall () #1 0xf7843452 in raise () from /lib32/libc.so.6 #2 0xf7844871 in abort () from /lib32/libc.so.6 #3 0x566d4349 in jerry_port_fatal (code=ERR_REF_COUNT_LIMIT) at /tmp/jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56601bcf in jerry_fatal (code=ERR_REF_COUNT_LIMIT) at /tmp/jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x565824c7 in ecma_ref_object (object_p=0xf5f00b50) at /tmp/jerryscript/jerry-core/ecma/base/ecma-gc.c:137 #6 0x5659b720 in ecma_copy_value (value=4126149459) at /tmp/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:854 #7 0x565cb089 in ecma_op_to_object (value=4126149459) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-conversion.c:562 #8 0x565df8c2 in ecma_op_get_method (value=4126149459, prop_name_p=0xf5d00710) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-objects.c:948 #9 0x565df9da in ecma_op_get_method_by_symbol_id (value=4126149459, symbol_id=LIT_GLOBAL_SYMBOL_TO_PRIMITIVE) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1000 #10 0x565da6f5 in ecma_op_general_object_default_value (obj_p=0xf5f00b50, hint=ECMA_PREFERRED_TYPE_STRING) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:238 #11 0x565e17db in ecma_op_object_default_value (obj_p=0xf5f00b50, hint=ECMA_PREFERRED_TYPE_STRING) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1698 #12 0x565caef5 in ecma_op_to_string (value=4126149459) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-conversion.c:477 #13 0x56666654 in ecma_op_array_get_to_string_at_index (obj_p=0xf5f00b50, index=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:324 #14 0x56666757 in ecma_builtin_array_prototype_join (separator_arg=72, obj_p=0xf5f00b50, length=1) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:361 #15 0x5666db31 in ecma_builtin_array_prototype_dispatch_routine (builtin_routine_id=91, this_arg=4126149459, arguments_list_p=0xfff5d4e0, arguments_number=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2755 #16 0x565b3969 in ecma_builtin_dispatch_routine (func_obj_p=0xf5f005b0, this_arg_value=4126149459, arguments_list_p=0xfff5d4e0, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1214 #17 0x565b3b41 in ecma_builtin_dispatch_call (obj_p=0xf5f005b0, this_arg_value=4126149459, arguments_list_p=0x0, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1238 #18 0x565d0e7a in ecma_op_function_call_simple (func_obj_p=0xf5f005b0, this_arg_value=4126149459, arguments_list_p=0x0, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:844 #19 0x565d1dae in ecma_op_function_call (func_obj_p=0xf5f005b0, this_arg_value=4126149459, arguments_list_p=0x0, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1141 #20 0x56665fac in ecma_builtin_array_prototype_object_to_string (this_arg=4126149459, obj_p=0xf5f00b50) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:152 #21 0x5666d87f in ecma_builtin_array_prototype_dispatch_routine (builtin_routine_id=88, this_arg=4126149459, arguments_list_p=0xfff5d790, arguments_number=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2698 #22 0x565b3969 in ecma_builtin_dispatch_routine (func_obj_p=0xf5f00610, this_arg_value=4126149459, arguments_list_p=0xfff5d790, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1214 #23 0x565b3b41 in ecma_builtin_dispatch_call (obj_p=0xf5f00610, this_arg_value=4126149459, arguments_list_p=0x0, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1238 #24 0x565d0e7a in ecma_op_function_call_simple (func_obj_p=0xf5f00610, this_arg_value=4126149459, arguments_list_p=0x0, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:844 #25 0x565d1dae in ecma_op_function_call (func_obj_p=0xf5f00610, this_arg_value=4126149459, arguments_list_p=0x0, arguments_list_len=0) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1141 #26 0x565da9d1 in ecma_op_general_object_ordinary_value (obj_p=0xf5f00b50, hint=ECMA_PREFERRED_TYPE_STRING) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:324 #27 0x565da891 in ecma_op_general_object_default_value (obj_p=0xf5f00b50, hint=ECMA_PREFERRED_TYPE_STRING) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:289 #28 0x565e17db in ecma_op_object_default_value (obj_p=0xf5f00b50, hint=ECMA_PREFERRED_TYPE_STRING) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1698 #29 0x565caef5 in ecma_op_to_string (value=4126149459) at /tmp/jerryscript/jerry-core/ecma/operations/ecma-conversion.c:477 #30 0x56666654 in ecma_op_array_get_to_string_at_index (obj_p=0xf5f00b50, index=0) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:324 #31 0x56666757 in ecma_builtin_array_prototype_join (separator_arg=72, obj_p=0xf5f00b50, length=1) at /tmp/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:361 ... ``` <The backtrace contains 5804 more stack frames> ###### Authors Prashast Srivastava (Purdue University), Mathias Payer (EPFL)
Jerry interpreter crashes due to ERR_REF_COUNT_LIMIT
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4029/comments
1
2020-07-22T01:32:20Z
2020-07-27T14:25:54Z
https://github.com/jerryscript-project/jerryscript/issues/4029
663,407,752
4,029
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dfd9d44 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` function a ([{ catch (e) { eval("var e"); } }]) ``` ###### Output ``` ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER' failed at /home/jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_pattern_get_target):3070. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER' in parser_pattern_get_target
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4019/comments
0
2020-07-18T09:17:42Z
2020-07-28T08:41:46Z
https://github.com/jerryscript-project/jerryscript/issues/4019
660,029,319
4,019
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dfd9d44 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` [ '"\\ubad', ].forEach(function(result = JSON.parse (str, function (k, v) { return v; })) { r = eval ('"use ' + 's' + 't' + 'r' + 'i' + 'c' + 't"; va' + 'r x = 1;'); }); ``` ###### Output ``` ICE: Assertion 'prev_lex_env_p != NULL && ecma_get_lex_env_type (prev_lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE' failed at /home/jerryscript/jerry-core/vm/vm.c(vm_loop):1420. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'prev_lex_env_p != NULL && ecma_get_lex_env_type (prev_lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE' in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4018/comments
1
2020-07-18T09:09:56Z
2020-11-16T14:04:22Z
https://github.com/jerryscript-project/jerryscript/issues/4018
660,025,402
4,018
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dfd9d44 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` var v0 = Object.freeze (RegExp ($, "g")).compile (); var $ = v0.every (Function ("", ""), v0.hasOwnProperty); ``` ###### Output ``` ICE: Assertion 'ecma_is_value_true (status)' failed at /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c(ecma_builtin_regexp_prototype_compile):394. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'ecma_is_value_true (status)' in ecma_builtin_regexp_prototype_compile
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4017/comments
0
2020-07-18T08:53:51Z
2020-07-21T14:06:36Z
https://github.com/jerryscript-project/jerryscript/issues/4017
660,017,350
4,017
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dfd9d44 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` function a ({ catch (e) { eval("var e"); }}) ``` ###### Output ``` ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER' failed at /home/jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_function_arguments):1857. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER' in parser_parse_function_arguments
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4016/comments
0
2020-07-18T08:34:51Z
2020-07-28T08:41:46Z
https://github.com/jerryscript-project/jerryscript/issues/4016
660,008,196
4,016
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dfd9d44 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` eval(('function f (') + "{} + {}" ); ``` ###### Output ``` ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at /home/jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2275. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4015/comments
0
2020-07-18T08:23:02Z
2020-07-28T08:53:09Z
https://github.com/jerryscript-project/jerryscript/issues/4015
660,002,507
4,015
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dfd9d44 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` function a ([] + {} == "[object Object]") { function b() { return (typeof c === "function"); } ``` ###### Output ``` ICE: Assertion 'literal_p->type == LEXER_UNUSED_LITERAL && literal_p->status_flags == LEXER_FLAG_FUNCTION_ARGUMENT' failed at /home/jerryscript/jerry-core/parser/js/js-parser.c(parser_compute_indicies):199. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'literal_p->type == LEXER_UNUSED_LITERAL && literal_p->status_flags == LEXER_FLAG_FUNCTION_ARGUMENT' in parser_compute_indicies
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4014/comments
0
2020-07-18T08:16:15Z
2020-07-28T08:53:09Z
https://github.com/jerryscript-project/jerryscript/issues/4014
659,999,309
4,014
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dfd9d44 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` var a = "\ud800".toUpperCase(); ``` ###### Output ``` ================================================================= ==18731==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf600071f at pc 0x080c4e9c bp 0xffd56088 sp 0xffd56078 READ of size 1 at 0xf600071f thread T0 #0 0x80c4e9b in lit_read_code_unit_from_utf8 /home/jerryscript/jerry-core/lit/lit-strings.c:431 #1 0x80c5457 in lit_cesu8_peek_next /home/jerryscript/jerry-core/lit/lit-strings.c:522 #2 0x8137d08 in ecma_builtin_string_prototype_object_conversion_helper /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1005 #3 0x8138a9a in ecma_builtin_string_prototype_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1360 #4 0x8081845 in ecma_builtin_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1214 #5 0x80819eb in ecma_builtin_dispatch_call /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1238 #6 0x8097f0e in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:844 #7 0x8098d15 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1141 #8 0x80f965c in opfunc_call /home/jerryscript/jerry-core/vm/vm.c:778 #9 0x810c3fa in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4690 #10 0x810c93e in vm_run /home/jerryscript/jerry-core/vm/vm.c:4792 #11 0x80f7e64 in vm_run_global /home/jerryscript/jerry-core/vm/vm.c:339 #12 0x804def4 in jerry_run /home/jerryscript/jerry-core/api/jerry.c:579 #13 0x804acbf in main /home/jerryscript/jerry-main/main-unix.c:759 #14 0xf77c5646 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18646) #15 0x8048fb0 (/home/jerryscript/build/bin/jerry+0x8048fb0) 0xf600071f is located 0 bytes to the right of 15-byte region [0xf6000710,0xf600071f) allocated by thread T0 here: #0 0xf79fadee in malloc (/usr/lib32/libasan.so.2+0x96dee) #1 0x80c0a22 in jmem_heap_alloc /home/jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x80c0af2 in jmem_heap_gc_and_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x80c0b71 in jmem_heap_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:323 #4 0x810ca7d in ecma_alloc_string_buffer /home/jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x80621f8 in ecma_new_ecma_string_from_utf8_buffer /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:269 #6 0x80621f8 in ecma_new_ecma_string_from_utf8 /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:353 #7 0x807456c in ecma_find_or_create_literal_string /home/jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:134 #8 0x80c6e8d in parser_compute_indicies /home/jerryscript/jerry-core/parser/js/js-parser.c:146 #9 0x80c8db6 in parser_post_processing /home/jerryscript/jerry-core/parser/js/js-parser.c:1040 #10 0x80ce773 in parser_parse_source /home/jerryscript/jerry-core/parser/js/js-parser.c:2282 #11 0x80d1ab0 in parser_parse_script /home/jerryscript/jerry-core/parser/js/js-parser.c:2896 #12 0x804db7c in jerry_parse /home/jerryscript/jerry-core/api/jerry.c:441 #13 0x804ac76 in main /home/jerryscript/jerry-main/main-unix.c:750 #14 0xf77c5646 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18646) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/jerryscript/jerry-core/lit/lit-strings.c:431 lit_read_code_unit_from_utf8 Shadow bytes around the buggy address: 0x3ec00090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000d0: fa fa fa fa fa fa fa fa fa fa 00 04 fa fa 00 05 =>0x3ec000e0: fa fa 00[07]fa fa fd fa fa fa fd fa fa fa fd fd 0x3ec000f0: fa fa 00 00 fa fa 00 00 fa fa 00 06 fa fa 00 00 0x3ec00100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00130: 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==18731==ABORTING ``` Credits: This vulnerability is detected by chong from OWL337.
heap-buffer-overflow in lit_read_code_unit_from_utf8
https://api.github.com/repos/jerryscript-project/jerryscript/issues/4013/comments
0
2020-07-18T08:03:48Z
2020-07-28T13:53:18Z
https://github.com/jerryscript-project/jerryscript/issues/4013
659,993,305
4,013
[ "jerryscript-project", "jerryscript" ]
Hi, I'm having hard time for getting the correct "this" context from the native callback by calling jerry_call_function, it always returned "global". ```javascript export class ClassA { print() { console.log("This is from Class A\n"); } set cb_event(cb) { native_driver_timer.setTimeoutEvent(cb); } constructor(){} } ``` ```c static jerry_value_t function_native_driver_timer_setTimeoutEvent(const jerry_value_t func_value, /**< function object */ const jerry_value_t this_value, /**< this arg */ const jerry_value_t args[], /**< function arguments */ const jerry_length_t args_cnt) /**< number of function arguments */ { jerry_release_value(jerry_call_function(args[0], this_val, NULL, 0)); return jerry_create_undefined(); } ``` ```javascript let ca = new ClassA(); ca.cb_event = (() => { this.print(); // Undefined. console.log(JSON.stringify(this)); //Always returning "global", wondering how to make "this" as a context of variable "ca". }); ```
Question about this_val of jerry_call_function
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3994/comments
2
2020-07-10T06:03:25Z
2020-07-27T14:32:45Z
https://github.com/jerryscript-project/jerryscript/issues/3994
654,534,552
3,994
[ "jerryscript-project", "jerryscript" ]
I have several questions about the heap allocator which jerry is using, hope someone can help. * the allocator have 2 different strategies, one is for 8bytes chunk allocation, the other is for large size chunk allocation. why jerry choose 8bytes alignment, not 4, 5 or 7. Is there any special consideration about this? * In some scenario, i have found some memory fragment issue with jerry. In the future is there any plan that a compacting gc algorithm will be implemented?
questions about the heap allocator
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3984/comments
5
2020-07-07T03:23:02Z
2020-07-13T11:01:24Z
https://github.com/jerryscript-project/jerryscript/issues/3984
651,963,434
3,984
[ "jerryscript-project", "jerryscript" ]
### JerryScript revision git hash: 392ee717128f6daaf0b94e54fc9512eb26d680e2 ### Test case ```javascript function a() { new new Proxy(a, {}) } JSON.parse("[]", a) ``` ### Execution steps ./jerry poc.js ### Build cmd python tools/build.py --compile-flag="-fsanitize=address" Stack dump: --- ``` ASAN:DEADLYSIGNAL ================================================================= ==180140==ERROR: AddressSanitizer: stack-overflow on address 0x7fff1ed99fe8 (pc 0x5632f4db5751 bp 0x7fff1ed9a000 sp 0x7fff1ed99fe0 T0) #0 0x5632f4db5750 in ecma_is_lexical_environment /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/base/ecma-helpers.c:174 #1 0x5632f4db5c78 in ecma_get_lex_env_type /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/base/ecma-helpers.c:274 #2 0x5632f4ca68fa in ecma_op_resolve_reference_value /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-reference.c:276 #3 0x5632f4d219de in vm_loop.lto_priv.485 /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:1036 #4 0x5632f4cf8723 in vm_execute /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4670 #5 0x5632f4cf8d17 in vm_run /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4778 #6 0x5632f4da077e in ecma_op_function_call_simple /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:942 #7 0x5632f4da17ea in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1366 #8 0x5632f4d7a201 in ecma_proxy_object_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-proxy-object.c:1779 #9 0x5632f4da1459 in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1264 #10 0x5632f4d20f37 in opfunc_construct.lto_priv.481 /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:863 #11 0x5632f4cf87d8 in vm_execute /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4697 #12 0x5632f4cf8d17 in vm_run /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4778 #13 0x5632f4da077e in ecma_op_function_call_simple /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:942 #14 0x5632f4da17ea in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1366 #15 0x5632f4d7a201 in ecma_proxy_object_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-proxy-object.c:1779 #16 0x5632f4da1459 in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1264 #17 0x5632f4d20f37 in opfunc_construct.lto_priv.481 /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:863 #18 0x5632f4cf87d8 in vm_execute /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4697 #19 0x5632f4cf8d17 in vm_run /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4778 #20 0x5632f4da077e in ecma_op_function_call_simple /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:942 #21 0x5632f4da17ea in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1366 #22 0x5632f4d7a201 in ecma_proxy_object_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-proxy-object.c:1779 #23 0x5632f4da1459 in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1264 #24 0x5632f4d20f37 in opfunc_construct.lto_priv.481 /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:863 #25 0x5632f4cf87d8 in vm_execute /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4697 #26 0x5632f4cf8d17 in vm_run /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4778 #27 0x5632f4da077e in ecma_op_function_call_simple /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:942 #28 0x5632f4da17ea in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1366 #29 0x5632f4d7a201 in ecma_proxy_object_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-proxy-object.c:1779 #30 0x5632f4da1459 in ecma_op_function_construct /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-function-object.c:1264 #31 0x5632f4d20f37 in opfunc_construct.lto_priv.481 /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:863 #32 0x5632f4cf87d8 in vm_execute /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4697 #33 0x5632f4cf8d17 in vm_run /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c:4778 ``` ---
Stack overflow in ecma_is_lexical_environment
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3977/comments
1
2020-07-06T05:01:36Z
2020-07-06T13:02:51Z
https://github.com/jerryscript-project/jerryscript/issues/3977
651,247,064
3,977
[ "jerryscript-project", "jerryscript" ]
### JerryScript revision git hash: 392ee717128f6daaf0b94e54fc9512eb26d680e2 ### Test case ```javascript ( function ( { a = arguments }) { const arguments } ) ``` In debug build, it triggers an assertion 'scope_stack_p > context_p->scope_stack_p' failed ### Execution steps ./jerry poc.js ### Build cmd python tools/build.py --compile-flag="-fsanitize=address" Stack dump: --- ``` ================================================================= ==59856==ERROR: AddressSanitizer: global-buffer-overflow on address 0x5581992ba27c at pc 0x558198ef79cd bp 0x7ffffcf5f490 sp 0x7ffffcf5f480 READ of size 2 at 0x5581992ba27c thread T0 #0 0x558198ef79cc (/home/yongheng/jerry_clean/build/bin/jerry+0x2d9cc) #1 0x558198f263d7 (/home/yongheng/jerry_clean/build/bin/jerry+0x5c3d7) #2 0x558198f81326 (/home/yongheng/jerry_clean/build/bin/jerry+0xb7326) #3 0x558198f34f6c (/home/yongheng/jerry_clean/build/bin/jerry+0x6af6c) #4 0x558198eff1a3 (/home/yongheng/jerry_clean/build/bin/jerry+0x351a3) #5 0x558198f030ca (/home/yongheng/jerry_clean/build/bin/jerry+0x390ca) #6 0x558198f3dbcb (/home/yongheng/jerry_clean/build/bin/jerry+0x73bcb) #7 0x558198f3f19c (/home/yongheng/jerry_clean/build/bin/jerry+0x7519c) #8 0x558198f2f238 (/home/yongheng/jerry_clean/build/bin/jerry+0x65238) #9 0x558198f33ac8 (/home/yongheng/jerry_clean/build/bin/jerry+0x69ac8) #10 0x558198f3c101 (/home/yongheng/jerry_clean/build/bin/jerry+0x72101) #11 0x558198f0484d (/home/yongheng/jerry_clean/build/bin/jerry+0x3a84d) #12 0x558198f0515a (/home/yongheng/jerry_clean/build/bin/jerry+0x3b15a) #13 0x558198f745c0 (/home/yongheng/jerry_clean/build/bin/jerry+0xaa5c0) #14 0x558198ee044e (/home/yongheng/jerry_clean/build/bin/jerry+0x1644e) #15 0x7f2eec31db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #16 0x558198ee1219 (/home/yongheng/jerry_clean/build/bin/jerry+0x17219) ``` ---
Heap overflow in jerry-core
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3976/comments
14
2020-07-05T20:43:50Z
2021-06-16T09:03:07Z
https://github.com/jerryscript-project/jerryscript/issues/3976
651,142,365
3,976
[ "jerryscript-project", "jerryscript" ]
### JerryScript revision git hash: 392ee717128f6daaf0b94e54fc9512eb26d680e2 ### Test case ```javascript a = 10 b = new Uint8Array(a) function c() { d } b.sort(c) ``` ### Execution steps ./jerry poc.js ### Build cmd python tools/build.py --debug
Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3975/comments
0
2020-07-05T19:59:58Z
2020-07-06T11:42:28Z
https://github.com/jerryscript-project/jerryscript/issues/3975
651,135,585
3,975
[ "jerryscript-project", "jerryscript" ]
after calling Date.setFullYear interface, the date object returns incorrect day numbers ###### JerryScript revision 2.1 ###### Build platform Ubuntu 18.04.3 LTS ###### unexpected behavior ```diff jerry> date = new Date("1960-11-19"); + Sat Nov 19 1960 08:00:00 GMT+08:00 jerry> date.setFullYear(1961) -256262400000 jerry> date - Sat Nov 18 1961 08:00:00 GMT+08:00 ```
Date.setFullYear works incorrectly
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3973/comments
4
2020-07-03T01:48:20Z
2020-07-06T09:28:55Z
https://github.com/jerryscript-project/jerryscript/issues/3973
650,288,007
3,973
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 0b404ea8 ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 --stack-limit=16 \ ``` ###### Test case ```javascript var $ = new Function($, "[PqaCZlWQUT]{0}", $) ``` ###### Output ```text ICE: Assertion 'context.next_scanner_info_p->type == SCANNER_TYPE_END_ARGUMENTS' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2219. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==69476==ERROR: AddressSanitizer: ABRT on unknown address 0x00010f64 (pc 0xf7f66b49 bp 0xff8f412c sp 0xff8f4110 T0) #0 0xf7f66b48 (linux-gate.so.1+0xb48) #1 0xf77594c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf77413f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x56767a26 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5669b10d in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x5669b14e in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x566a9f7f in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2219 #7 0x566ae0a0 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2884 #8 0x5666b225 in ecma_op_create_dynamic_function jerryscript/jerry-core/ecma/operations/ecma-function-object.c:356 #9 0x5670aa9a in ecma_builtin_function_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:70 #10 0x5664fd16 in ecma_builtin_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1279 #11 0x5666d3f3 in ecma_op_function_construct jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1265 #12 0x566d9e76 in opfunc_construct jerryscript/jerry-core/vm/vm.c:878 #13 0x566eeaa5 in vm_execute jerryscript/jerry-core/vm/vm.c:4510 #14 0x566ef00e in vm_run jerryscript/jerry-core/vm/vm.c:4591 #15 0x566d806a in vm_run_global jerryscript/jerry-core/vm/vm.c:339 #16 0x56616f8c in jerry_run jerryscript/jerry-core/api/jerry.c:579 #17 0x56613b00 in main jerryscript/jerry-main/main-unix.c:759 #18 0xf7742ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #19 0x56611204 in _start (jerryscript/build/bin/jerry+0x19204) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==69476==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator).</sup>
Assertion context.next_scanner_info_p->type == SCANNER_TYPE_END_ARGUMENTS in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3951/comments
0
2020-06-29T10:11:56Z
2020-07-28T08:53:09Z
https://github.com/jerryscript-project/jerryscript/issues/3951
647,256,961
3,951
[ "jerryscript-project", "jerryscript" ]
### JerryScript revision git hash: 0b404ea893c801a46b90d83ab1c6983d4d55646d ### Test case ```javascript function a() { this[2] = new Proxy(new function() { return new Array }, {}) return {} } JSON.parse("[1, 2, []]", a) ``` ### Execution steps ./jerry poc.js
ICE: Assertion 'ecma_is_value_boolean (completion_value)' failed
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3950/comments
2
2020-06-28T18:28:31Z
2020-07-10T14:06:28Z
https://github.com/jerryscript-project/jerryscript/issues/3950
646,980,109
3,950
[ "jerryscript-project", "jerryscript" ]
### JerryScript revision git hash: 0b404ea893c801a46b90d83ab1c6983d4d55646d build with `python tools/build.py --debug` ### Test case ```javascript function a() { this[2] = { b : new Proxy(Function, {}) } } JSON.parse("[1, 2, []]", a) ``` ### Execution steps ./jerry poc.js ### Backtrace ICE: Assertion '!ECMA_OBJECT_IS_PROXY (object_p)' failed at /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/ecma/operations/ecma-objects.c(ecma_op_object_get_own_property):80. Error: ERR_FAILED_INTERNAL_ASSERTION [1] 198185 abort ~/SQLFuzzer/jerry_clean/build/bin/jerry jerry_poc2.js
ICE: Assertion '!ECMA_OBJECT_IS_PROXY (object_p)' failed
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3945/comments
0
2020-06-27T21:53:58Z
2020-07-10T14:06:28Z
https://github.com/jerryscript-project/jerryscript/issues/3945
646,773,719
3,945
[ "jerryscript-project", "jerryscript" ]
### JerryScript revision git hash: 0b404ea893c801a46b90d83ab1c6983d4d55646d ### Test case ```javascript [function(a, a) { (function() { a }) }()] ``` ### Execution steps ./jerry poc.js ### Backtrace ICE: Assertion 'ecma_find_named_property (frame_ctx_p->lex_env_p, name_p) == NULL' failed at /home/yongheng/SQLFuzzer/jerry_clean/jerry-core/vm/vm.c(vm_loop):1508. Error: ERR_FAILED_INTERNAL_ASSERTION [1] 109505 abort ~/SQLFuzzer/jerry_clean/build/bin/jerry jerry_poc1.js
ICE: Assertion 'ecma_find_named_property (frame_ctx_p->lex_env_p, name_p) == NULL'
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3944/comments
0
2020-06-27T19:21:56Z
2020-06-30T12:00:36Z
https://github.com/jerryscript-project/jerryscript/issues/3944
646,743,804
3,944
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c12c60c ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` var v = [,]; new Function ('b', 'b', 'var q = a; b++; function f (k) {return q + k + b++;}; return f;')(v, "0", { }); ``` ###### Output ``` ICE: Assertion 'ECMA_PROPERTY_VALUE_PTR (property_p)->value == ECMA_VALUE_UNINITIALIZED' failed at /home/jerryscript-master/jerry-core/vm/vm.c(vm_loop):1605. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'ECMA_PROPERTY_VALUE_PTR (property_p)->value == ECMA_VALUE_UNINITIALIZED' in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3936/comments
1
2020-06-25T15:05:26Z
2020-07-06T13:05:15Z
https://github.com/jerryscript-project/jerryscript/issues/3936
645,638,569
3,936
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c12c60c ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` var literal = "a" assert(eval("var " + literal + " = 42; " + literal) === 42)= { toString : (o) = 1 } = undefined ``` ###### Output ``` ICE: Assertion 'context_p->stack_top_uint8 == LEXER_EXPRESSION_START' failed at /home/jerryscript-master/jerry-core/parser/js/js-parser-expr.c(parser_parse_expression):3576. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->stack_top_uint8 == LEXER_EXPRESSION_START' in parser_parse_expression
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3935/comments
0
2020-06-25T14:53:28Z
2020-07-10T06:35:33Z
https://github.com/jerryscript-project/jerryscript/issues/3935
645,629,490
3,935
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c12c60c ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` var r; r = new RegExp ("(?:(?:^b?)*)*a"); assert (r.exec ("bbba") == "bbba"); ``` ###### Output ``` ASAN:SIGSEGV ================================================================= ==31778==ERROR: AddressSanitizer: stack-overflow on address 0xff569f6c (pc 0x080b1586 bp 0xff56a128 sp 0xff569f00 T0) #0 0x80b1585 in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:610 #1 0x80b30fe in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:888 #2 0x80b1f57 in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:728 #3 0x80b30fe in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:888 #4 0x80b336e in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:906 #5 0x80b4651 in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:1123 #6 0x80b30fe in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:888 #7 0x80b4651 in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:1123 #8 0x80b30fe in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:888 ... #249 0x80b4651 in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:1123 #250 0x80b30fe in ecma_regexp_run /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:888 SUMMARY: AddressSanitizer: stack-overflow /home/jerryscript-master/jerry-core/ecma/operations/ecma-regexp-object.c:610 ecma_regexp_run ==31778==ABORTING ``` Credits: This vulnerability is detected by chong from OWL337.
stack-overflow in ecma_regexp_run
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3934/comments
0
2020-06-25T14:43:39Z
2020-07-20T10:47:45Z
https://github.com/jerryscript-project/jerryscript/issues/3934
645,621,854
3,934
[ "jerryscript-project", "jerryscript" ]
Hello. I am creating a new issue as I haven't found a better contact. I implemented an integration for JerryScript for Fuzzilli fuzzer https://github.com/googleprojectzero/fuzzilli/pull/79 . It contains also an easy-to-use docker container or it could be invoked directly, as described in the [readme](https://github.com/googleprojectzero/fuzzilli/tree/master/Targets/Jerryscript) file. If you decide to give it a try, I believe it could still find some valuable bugs.
Implemented Fuzzilli Integration
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3931/comments
2
2020-06-25T10:15:59Z
2020-07-23T08:00:17Z
https://github.com/jerryscript-project/jerryscript/issues/3931
645,441,934
3,931
[ "jerryscript-project", "jerryscript" ]
When executing the testcase below, jerry throws a RangeError when the third argument is present and the value is undefined. According to ES6.0, the expected output should be 0. The value of [[ByteLength]] internal slot may not satisfy the spec. This is an issue about DataView constructor. #### version `bd1c4df` #### testcase ```javascript var NISLFuzzingFunc = function(){ var a = DataView(new ArrayBuffer(256),0,undefined); print(a.getInt16(0)); }; var result = NISLFuzzingFunc(); ``` #### output ``` RangeError: Start offset is outside the bounds of the buffer. ``` #### expected output ``` 0 ``` Contributor:[@YuanWangC](https://github.com/YuanWangC)
an issue about DataView constructor
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3927/comments
1
2020-06-24T13:47:51Z
2020-06-25T12:05:09Z
https://github.com/jerryscript-project/jerryscript/issues/3927
644,629,715
3,927
[ "jerryscript-project", "jerryscript" ]
When executing the testcase below, the result when the second argument of `JSON.stringify` is `[]` is different from when the parameter is a non-empty array. According to the ES6.0, the expected output should be `{}`. And when executing this testcase on other engines, (like chakraCore, v8, and spiderMonkey) I get the expected output. This may be an issue about `JSON.stringify`. #### version `bd1c4df` #### testcase ```javascript var NISLFuzzingFunc = function (nislMutationParameter0, nislMutationParameter1, nislMutationParameter2) { return JSON.stringify(nislMutationParameter0, nislMutationParameter1, nislMutationParameter2); }; var nislMutationArgument0 = {"4664":false,"18836":true}; var nislMutationArgument1 = []; var nislMutationArgument2 = "abc"; var NISLCallingResult = NISLFuzzingFunc(nislMutationArgument0, nislMutationArgument1, nislMutationArgument2); print(NISLCallingResult); ``` #### output ``` { abc“4664":false, abc”18836":true } ``` #### expected output ``` {} ``` Contributor:[@YuanWangC](https://github.com/YuanWangC)
An issue about JSON.stringify
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3926/comments
1
2020-06-24T13:31:20Z
2020-07-01T10:41:35Z
https://github.com/jerryscript-project/jerryscript/issues/3926
644,617,752
3,926
[ "jerryscript-project", "jerryscript" ]
According to the usage of `^`, the `/^A/` will match the beginning of the string. But jerry matches the character that is not at the beginning of the string. When executing this testcase on other engines, (like chakraCore, v8, and spiderMonkey) I get the expected output. #### version `996bf76` #### testcase ```javascript var NISLFuzzingFunc = function(){ var a = "anA".split(/^A/); print(a); }; NISLFuzzingFunc(); ``` #### output ``` an, ``` #### expected output ``` anA ``` Contributor:[@YuanWangC](https://github.com/YuanWangC)
An issue about RegExp Assertions
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3914/comments
1
2020-06-18T09:52:52Z
2020-06-18T10:02:15Z
https://github.com/jerryscript-project/jerryscript/issues/3914
641,071,364
3,914
[ "jerryscript-project", "jerryscript" ]
The postponed async literal is not dropped from the scanner stack when the "possible arrow bracket" state is changed to "normal bracket". ###### JerryScript revision 8719f72e612f3a41ad72c1d59d1d8fb962da4fd6 ###### Test case async(a,b+)
Scanner crash for async(a,b+)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3908/comments
0
2020-06-17T10:20:22Z
2020-06-17T17:00:11Z
https://github.com/jerryscript-project/jerryscript/issues/3908
640,323,644
3,908
[ "jerryscript-project", "jerryscript" ]
According to ES6.0, the return value of`String.prototype.indexOf(searchString, fromIndex)` is the smallest possible integer which is not smaller than `fromIndex` . And When executing this testcase on other engines, (like chakraCore, v8 and spiderMonkey) I get the expected output. A similar situation also occurs when using `String.prototype.lastIndexOf (searchString [, position] )`. When executing testcase2, the output of other engines are all `1`, but the output of jerry is `5`. #### version `996bf76` #### testcase1 ```javascript var NISLFuzzingFunc = function(){ var a = "abcde".indexOf("",1); print(a); }; NISLFuzzingFunc(); ``` #### output1 ``` 0 ``` #### expected output1 ``` 1 ``` #### testcase2 ```javascript var NISLFuzzingFunc = function () { var a = 'abcde'.lastIndexOf("", 1); print(a); }; NISLFuzzingFunc(); ``` #### output2 ``` 5 ``` #### expected output2 ``` 1 ``` Contributor:[@YuanWangC](https://github.com/YuanWangC); [@Wen Yi](https://github.com/YiWen-y)
An issue about String.prototype.indexOf and String.prototype.lastIndexOf
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3903/comments
3
2020-06-15T09:27:20Z
2020-09-29T09:09:22Z
https://github.com/jerryscript-project/jerryscript/issues/3903
638,690,685
3,903
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision commit: cae6cd08fb3dc8d2ded58177f997f8e3b3747b28 ###### Build platform Debian GNU/Linux 10 (buster) (Linux 4.19.0-8-amd64 x86_64) ###### Build steps `python tools/build.py --profile=es2015-subset` ###### Test case Run following code with the CLI bin/jerry: ``` async function foo (promise) { let v = await promise; print('value:', v); } let r = null let bar = new Promise(resolver => r = resolver) foo(bar) ``` ###### Output `value: [object Promise]` ###### Expected behavior It should not print until `r('some value')`
Incorrect await behavior?
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3894/comments
3
2020-06-11T10:44:48Z
2020-06-17T13:01:02Z
https://github.com/jerryscript-project/jerryscript/issues/3894
636,912,749
3,894
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 01e96703 ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 --stack-limit=16 ``` ###### Test case ```javascript var id_0 = Object.prototype.toString; Object.prototype.toString= function ( ) { function getStr ( ) { return str `foo` ; } }; ``` ###### Output ```text Script Error: 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):75. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==3184474==ERROR: AddressSanitizer: ABRT on unknown address 0x0030975a (pc 0xf7f38b49 bp 0xfffa8c8c sp 0xfffa8c70 T0) #0 0xf7f38b48 (linux-gate.so.1+0xb48) #1 0xf772b4c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf77133f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x567a644a in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x566dd3d9 in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x566dd41a in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x56683d14 in ecma_free_string_list jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:75 #7 0x56683ee1 in ecma_finalize_lit_storage jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:121 #8 0x56682af6 in ecma_finalize jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:92 #9 0x5665a044 in jerry_cleanup jerryscript/jerry-core/api/jerry.c:238 #10 0x5665803b in main jerryscript/jerry-main/main-unix.c:994 #11 0xf7714ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #12 0x56654d04 in _start (jerryscript/build/bin/jerry+0x18d04) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==3184474==ABORTING ``` <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/3893/comments
1
2020-06-11T07:33:35Z
2020-06-12T11:01:45Z
https://github.com/jerryscript-project/jerryscript/issues/3893
636,789,496
3,893
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 6d9d2328 ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 --stack-limit=16 ``` ###### Test case ```javascript function i(id_0, b = (eval("var x"))) { function x() {} eval(!eval("var x = {}; x instanceof assert;")) } i() ``` ###### Output ```text ICE: Assertion 'ecma_find_named_property (prev_lex_env_p, name_p) == NULL' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):1424. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==1710529==ERROR: AddressSanitizer: ABRT on unknown address 0x001a19c1 (pc 0xf7efcb49 bp 0xff90df2c sp 0xff90df10 T0) #0 0xf7efcb48 (linux-gate.so.1+0xb48) #1 0xf76ef4c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf76d73f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x566b96d2 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565f19db in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x565f1a1c in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x5662ef1d in vm_loop jerryscript/jerry-core/vm/vm.c:1424 #7 0x5663ee3a in vm_execute jerryscript/jerry-core/vm/vm.c:4304 #8 0x5663f445 in vm_run jerryscript/jerry-core/vm/vm.c:4412 #9 0x566298b9 in vm_run_eval jerryscript/jerry-core/vm/vm.c:411 #10 0x565c128f in ecma_op_eval_chars_buffer jerryscript/jerry-core/ecma/operations/ecma-eval.c:116 #11 0x565c0fca in ecma_op_eval jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #12 0x5665b810 in ecma_builtin_global_object_eval jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:111 #13 0x5665d853 in ecma_builtin_global_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:792 #14 0x565a7416 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1195 #15 0x565a75e8 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1219 #16 0x565c3dfc in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:830 #17 0x565c4b2f in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1133 #18 0x5662af6d in opfunc_call jerryscript/jerry-core/vm/vm.c:781 #19 0x5663ee9e in vm_execute jerryscript/jerry-core/vm/vm.c:4310 #20 0x5663f445 in vm_run jerryscript/jerry-core/vm/vm.c:4412 #21 0x565c4241 in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:934 #22 0x565c4b2f in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1133 #23 0x5662af6d in opfunc_call jerryscript/jerry-core/vm/vm.c:781 #24 0x5663ee9e in vm_execute jerryscript/jerry-core/vm/vm.c:4310 #25 0x5663f445 in vm_run jerryscript/jerry-core/vm/vm.c:4412 #26 0x56629683 in vm_run_global jerryscript/jerry-core/vm/vm.c:338 #27 0x5656f33e in jerry_run jerryscript/jerry-core/api/jerry.c:595 #28 0x5656e2fa in main jerryscript/jerry-main/jerry-loop.c:30 #29 0xf76d8ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #30 0x5656e104 in _start (jerryscript/build/bin/jerry-loop+0x18104) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==1710529==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'ecma_find_named_property (prev_lex_env_p, name_p) == NULL' in ecma_op_eval_chars_buffer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3888/comments
0
2020-06-10T08:00:14Z
2020-06-11T09:36:38Z
https://github.com/jerryscript-project/jerryscript/issues/3888
636,024,443
3,888
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision ba4e3a402fce722ea752243c60c009307438d97f ###### Build platform Ubuntu 18.04 LTS ###### Build steps python tools/build.py --profile=es2015-subset --lto=off --error-messages=on --strip=off --compile-flag=-fsanitize=address ###### Test case ``` function main() { function v0() { const v1 = new v0(); } const v2 = v0(); } main(); ``` ###### Execution steps build/bin/jerry testcase.js ###### Output Program received signal SIGABRT, Aborted. ###### Backtrace Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 (gdb) bt ``` #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff6e43801 in __GI_abort () at abort.c:79 #2 0x00000000005acae2 in jerry_port_fatal () #3 0x000000000053bedf in jerry_fatal () #4 0x00000000004f90d3 in ecma_ref_object () #5 0x00000000005042cd in ecma_copy_value () #6 0x000000000055cfca in vm_loop () #7 0x000000000055b5e6 in vm_execute () #8 0x000000000055b183 in vm_run () #9 0x000000000051f650 in ecma_op_function_call_simple () #10 0x000000000051fafa in ecma_op_function_construct () #11 0x000000000055bd22 in vm_execute () #12 0x000000000055b183 in vm_run () #13 0x000000000051f650 in ecma_op_function_call_simple () #14 0x000000000051fafa in ecma_op_function_construct () #15 0x000000000055bd22 in vm_execute () #16 0x000000000055b183 in vm_run () #17 0x000000000051f650 in ecma_op_function_call_simple () #18 0x000000000051fafa in ecma_op_function_construct () #19 0x000000000055bd22 in vm_execute () #20 0x000000000055b183 in vm_run () #21 0x000000000051f650 in ecma_op_function_call_simple () #22 0x000000000051fafa in ecma_op_function_construct () #23 0x000000000055bd22 in vm_execute () #24 0x000000000055b183 in vm_run () …… ```
Reaching ERR_REF_COUNT_LIMIT lead to a crash in ecma_ref_object
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3886/comments
6
2020-06-10T02:01:44Z
2020-06-15T09:57:08Z
https://github.com/jerryscript-project/jerryscript/issues/3886
635,869,863
3,886
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 585332f0 ###### Build platform Linux-5.3.0-53-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 if($``())try{ }catch($‌){for(let{[function(){}]:{}}=()=>{}in[]^null) ``` ###### Output ```text ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' failed at jerryscript//jerry-core/parser/js/js-parser.c(parser_parse_function_arguments):1710. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5b59 in __kernel_vsyscall () #1 0xf781b832 in __libc_signal_restore_set (set=0xffffb35c) at ../sysdeps/unix/sysv/linux/nptl-signals.h:80 #2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xf781ccc1 in __GI_abort () at abort.c:79 #4 0x5657c4b3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-port/default/default-fatal.c:30 #5 0x5663288c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-core/jrt/jrt-fatals.c:63 #6 0x566328cd in jerry_assert_fail (assertion=0x5670d380 "context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION", file=0x5670c900 "jerryscript//jerry-core/parser/js/js-parser.c", function=0x566e10c0 <__func__.5975.lto_priv.512> "parser_parse_function_arguments", line=1710) at jerryscript//jerry-core/jrt/jrt-fatals.c:87 #7 0x5663ecf5 in parser_parse_function_arguments (context_p=0xffffc150, end_type=LEXER_RIGHT_PAREN) at jerryscript//jerry-core/parser/js/js-parser.c:1710 #8 0x56644177 in parser_parse_function (context_p=0xffffc150, status_flags=14) at jerryscript//jerry-core/parser/js/js-parser.c:2444 #9 0x565d67a8 in lexer_construct_function_object (context_p=0xffffc150, extra_status_flags=14) at jerryscript//jerry-core/parser/js/js-lexer.c:2665 #10 0x565919b7 in parser_parse_function_expression (context_p=0xffffc150, status_flags=14) at jerryscript//jerry-core/parser/js/js-parser-expr.c:1348 #11 0x56593fd4 in parser_parse_unary_expression (context_p=0xffffc150, grouping_level_p=0xffffb970) at jerryscript//jerry-core/parser/js/js-parser-expr.c:1818 #12 0x5659baf8 in parser_parse_expression (context_p=0xffffc150, options=4) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3479 #13 0x5658ab77 in lexer_expect_object_literal_id (context_p=0xffffc150, ident_opts=8) at jerryscript//jerry-core/parser/js/js-lexer.c:3045 #14 0x5659a216 in parser_parse_object_initializer (context_p=0xffffc150, flags=(PARSER_PATTERN_BINDING | PARSER_PATTERN_TARGET_ON_STACK | PARSER_PATTERN_LET)) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3192 #15 0x5659ab4e in parser_parse_initializer_by_next_char (context_p=0xffffc150, flags=(PARSER_PATTERN_BINDING | PARSER_PATTERN_TARGET_ON_STACK | PARSER_PATTERN_LET)) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3302 #16 0x565a7a25 in parser_parse_for_statement_start (context_p=0xffffc150) at jerryscript//jerry-core/parser/js/js-parser-statm.c:1357 #17 0x565af2f1 in parser_parse_statements (context_p=0xffffc150) at jerryscript//jerry-core/parser/js/js-parser-statm.c:2913 #18 0x56641a16 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56757d00 <buffer.lto_priv> "if(new0xD2&&{}++^this``().package)try{}catch($‌){for(let{[function(){}]:class{},ற,}=_+()=>{}in[,,,,,,]^null)for({},[,,],class{},{};;){};}finally{}const[,,]=void++$‌=>{}``&--functionଢ︴(){},[."..., source_size=728, parse_opts=0, error_location_p=0xffffc380) at jerryscript//jerry-core/parser/js/js-parser.c:2182 #19 0x5664584e in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56757d00 <buffer.lto_priv> "if(new0xD2&&{}++^this``().package)try{}catch($‌){for(let{[function(){}]:class{},ற,}=_+()=>{}in[,,,,,,]^null)for({},[,,],class{},{};;){};}finally{}const[,,]=void++$‌=>{}``&--functionଢ︴(){},[."..., source_size=728, parse_opts=0, bytecode_data_p=0xffffc440) at jerryscript//jerry-core/parser/js/js-parser.c:2818 #20 0x5669bd2b in jerry_parse (resource_name_p=0xffffca85 "/home/fancsikrobi/harmony/fuzzinator-configs/.fuzzinator-14169/jerryscript/picireny/674.js", resource_name_length=90, source_p=0x56757d00 <buffer.lto_priv> "if(new0xD2&&{}++^this``().package)try{}catch($‌){for(let{[function(){}]:class{},ற,}=_+()=>{}in[,,,,,,]^null)for({},[,,],class{},{};;){};}finally{}const[,,]=void++$‌=>{}``&--functionଢ︴(){},[."..., source_size=728, parse_opts=0) at jerryscript//jerry-core/api/jerry.c:447 #21 0x5669893b in main (argc=2, argv=0xffffc834) at jerryscript//jerry-main/main-unix.c:750 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3882/comments
1
2020-06-09T09:05:23Z
2020-06-10T10:37:53Z
https://github.com/jerryscript-project/jerryscript/issues/3882
635,249,667
3,882
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 585332f ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` this.RegExp.prototype.constructor = /'(detailForm:j_id\d+)'[^>]+>[^>]+Export to XLS format/; assert(!!"xabcxabcx".replace (/abc/g, "[$&][$`][$']")(r) && !!bad.match(r)); ``` ###### Output ``` ICE: Assertion 'ecma_object_is_constructor (ctor_obj_p)' failed at /home/JerryScript/jerry-core/ecma/operations/ecma-function-object.c(ecma_op_get_prototype_from_constructor):787. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'ecma_object_is_constructor (ctor_obj_p)' in ecma_op_get_prototype_from_constructor
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3881/comments
1
2020-06-09T04:13:10Z
2020-06-09T10:33:42Z
https://github.com/jerryscript-project/jerryscript/issues/3881
635,095,757
3,881
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 585332f ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` this.RegExp.prototype.constructor = "'detailForm','detailForm:j_id166', []);\" ><img alt=\"Export to XLS format\" />\n</a>" r = /'(detailForm:j_id\d+)'[^>]+>[^>]+Export to XLS format/; ``` ###### Output ``` ICE: Assertion 'ecma_is_value_object (value)' failed at /home/JerryScript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):793. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'ecma_is_value_object (value)' in ecma_get_object_from_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3880/comments
0
2020-06-09T03:55:56Z
2020-06-09T10:33:42Z
https://github.com/jerryscript-project/jerryscript/issues/3880
635,090,599
3,880
[ "jerryscript-project", "jerryscript" ]
According to the output of line 6, we can know that the value of hours is `NaN`, so its type should be number instead of string. ###### JerryScript version [9ab4872](https://github.com/jerryscript-project/jerryscript/commits/9ab4872) ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-55-generic x86_64) ###### Build steps python tools/build.py --clean --debug --logging=on --line-info=on --error-messages=on --cpointer-32bit=on --mem-heap=1572864 --profile=es2015-subset ###### Test case ``` var NISLFuzzingFunc=function (nislMutationParameter0){ var date = new Date(); var a = date.setHours(nislMutationParameter0); print(a); var hours = date.getHours(); print(hours); print(typeof hours); }; var nislMutationArgumenter0 = "-"; NISLFuzzingFunc(nislMutationArgumenter0); ``` ###### Execution steps build/bin/jerry testcase.js ###### Output ``` NaN NaN string ``` ###### Expected behavior ``` NaN NaN number ```
An issue about type of NaN
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3878/comments
0
2020-06-08T14:27:33Z
2020-06-09T05:27:33Z
https://github.com/jerryscript-project/jerryscript/issues/3878
634,665,155
3,878
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision cae6cd0 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` new RegExp('"\\u', 'u').exec(1) ``` ###### Output ``` ================================================================= ==105443==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf600073f at pc 0x080e94ba bp 0xffe285a8 sp 0xffe28598 READ of size 1 at 0xf600073f thread T0 #0 0x80e94b9 in re_parse_char_escape /home/jerryscript/jerry-core/parser/regexp/re-parser.c:615 #1 0x80ea114 in re_parse_next_token /home/jerryscript/jerry-core/parser/regexp/re-parser.c:753 #2 0x80eba19 in re_parse_alternative /home/jerryscript/jerry-core/parser/regexp/re-parser.c:1152 #3 0x80e642e in re_compile_bytecode /home/jerryscript/jerry-core/parser/regexp/re-compiler.c:131 #4 0x80afbd2 in ecma_op_create_regexp_from_pattern /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:347 #5 0x8129048 in ecma_builtin_regexp_dispatch_helper /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:174 #6 0x81290c1 in ecma_builtin_regexp_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:218 #7 0x8080fed in ecma_builtin_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1260 #8 0x809866e in ecma_op_function_construct /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1275 #9 0x80f0e29 in opfunc_construct /home/jerryscript/jerry-core/vm/vm.c:866 #10 0x80ffbd2 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4237 #11 0x81000d5 in vm_run /home/jerryscript/jerry-core/vm/vm.c:4318 #12 0x80eefc0 in vm_run_global /home/jerryscript/jerry-core/vm/vm.c:338 #13 0x804e1ce in jerry_run /home/jerryscript/jerry-core/api/jerry.c:595 #14 0x804acbf in main /home/jerryscript/jerry-main/main-unix.c:759 #15 0xf784a636 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18636) #16 0x8048fb0 (/home/jerryscript/build/bin/jerry+0x8048fb0) 0xf600073f is located 0 bytes to the right of 15-byte region [0xf6000730,0xf600073f) allocated by thread T0 here: #0 0xf7a7edee in malloc (/usr/lib32/libasan.so.2+0x96dee) #1 0x80be178 in jmem_heap_alloc /home/jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x80be248 in jmem_heap_gc_and_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x80be2c7 in jmem_heap_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:323 #4 0x8100214 in ecma_alloc_string_buffer /home/jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x80619da in ecma_new_ecma_string_from_utf8_buffer /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:258 #6 0x80619da in ecma_new_ecma_string_from_utf8 /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:353 #7 0x8073bf5 in ecma_find_or_create_literal_string /home/jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:134 #8 0x80c4501 in parser_compute_indicies /home/jerryscript/jerry-core/parser/js/js-parser.c:130 #9 0x80c61c6 in parser_post_processing /home/jerryscript/jerry-core/parser/js/js-parser.c:973 #10 0x80cbcb9 in parser_parse_source /home/jerryscript/jerry-core/parser/js/js-parser.c:2192 #11 0x80cf05a in parser_parse_script /home/jerryscript/jerry-core/parser/js/js-parser.c:2813 #12 0x804dc81 in jerry_parse /home/jerryscript/jerry-core/api/jerry.c:447 #13 0x804ac76 in main /home/jerryscript/jerry-main/main-unix.c:750 #14 0xf784a636 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18636) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/jerryscript/jerry-core/parser/regexp/re-parser.c:615 re_parse_char_escape Shadow bytes around the buggy address: 0x3ec00090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec000d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ec000e0: fa fa 00 05 fa fa 00[07]fa fa fd fa fa fa fd fd 0x3ec000f0: fa fa 00 00 fa fa 00 00 fa fa 00 06 fa fa 00 00 0x3ec00100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00130: 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==105443==ABORTING ``` Credits: This vulnerability is detected by chong from OWL337.
heap-buffer-overflow in re_parse_char_escape
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3871/comments
0
2020-06-07T10:51:46Z
2020-06-08T09:09:09Z
https://github.com/jerryscript-project/jerryscript/issues/3871
633,297,568
3,871
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision cae6cd0 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` new RegExp("\ud800", "u").exec(1) ``` ###### Output ``` ================================================================= ==100375==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf610073f at pc 0x080c25d2 bp 0xffdaad88 sp 0xffdaad78 READ of size 1 at 0xf610073f thread T0 #0 0x80c25d1 in lit_read_code_unit_from_utf8 /home/jerryscript/jerry-core/lit/lit-strings.c:431 #1 0x80c2b8d in lit_cesu8_peek_next /home/jerryscript/jerry-core/lit/lit-strings.c:522 #2 0x80ea990 in re_parse_next_token /home/jerryscript/jerry-core/parser/regexp/re-parser.c:872 #3 0x80eba19 in re_parse_alternative /home/jerryscript/jerry-core/parser/regexp/re-parser.c:1152 #4 0x80e642e in re_compile_bytecode /home/jerryscript/jerry-core/parser/regexp/re-compiler.c:131 #5 0x80afbd2 in ecma_op_create_regexp_from_pattern /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:347 #6 0x8129048 in ecma_builtin_regexp_dispatch_helper /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:174 #7 0x81290c1 in ecma_builtin_regexp_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:218 #8 0x8080fed in ecma_builtin_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1260 #9 0x809866e in ecma_op_function_construct /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1275 #10 0x80f0e29 in opfunc_construct /home/jerryscript/jerry-core/vm/vm.c:866 #11 0x80ffbd2 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4237 #12 0x81000d5 in vm_run /home/jerryscript/jerry-core/vm/vm.c:4318 #13 0x80eefc0 in vm_run_global /home/jerryscript/jerry-core/vm/vm.c:338 #14 0x804e1ce in jerry_run /home/jerryscript/jerry-core/api/jerry.c:595 #15 0x804acbf in main /home/jerryscript/jerry-main/main-unix.c:759 #16 0xf78a5636 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18636) #17 0x8048fb0 (/home/jerryscript/build/bin/jerry+0x8048fb0) 0xf610073f is located 0 bytes to the right of 15-byte region [0xf6100730,0xf610073f) allocated by thread T0 here: #0 0xf7ad9dee in malloc (/usr/lib32/libasan.so.2+0x96dee) #1 0x80be178 in jmem_heap_alloc /home/jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x80be248 in jmem_heap_gc_and_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x80be2c7 in jmem_heap_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:323 #4 0x8100214 in ecma_alloc_string_buffer /home/jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x8061b1e in ecma_new_ecma_string_from_utf8_buffer /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:269 #6 0x8061b1e in ecma_new_ecma_string_from_utf8 /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:353 #7 0x8073bf5 in ecma_find_or_create_literal_string /home/jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:134 #8 0x80c4501 in parser_compute_indicies /home/jerryscript/jerry-core/parser/js/js-parser.c:130 #9 0x80c61c6 in parser_post_processing /home/jerryscript/jerry-core/parser/js/js-parser.c:973 #10 0x80cbcb9 in parser_parse_source /home/jerryscript/jerry-core/parser/js/js-parser.c:2192 #11 0x80cf05a in parser_parse_script /home/jerryscript/jerry-core/parser/js/js-parser.c:2813 #12 0x804dc81 in jerry_parse /home/jerryscript/jerry-core/api/jerry.c:447 #13 0x804ac76 in main /home/jerryscript/jerry-main/main-unix.c:750 #14 0xf78a5636 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18636) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/jerryscript/jerry-core/lit/lit-strings.c:431 lit_read_code_unit_from_utf8 Shadow bytes around the buggy address: 0x3ec20090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec200a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec200b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec200c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec200d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ec200e0: fa fa 00 05 fa fa 00[07]fa fa fd fa fa fa fd fd 0x3ec200f0: fa fa 00 00 fa fa 00 00 fa fa 00 06 fa fa 00 00 0x3ec20100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec20110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec20120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec20130: 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==100375==ABORTING ``` Credits: This vulnerability is detected by chong from OWL337.
heap-buffer-overflow in lit_read_code_unit_from_utf8
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3870/comments
0
2020-06-06T14:03:56Z
2020-06-08T09:09:09Z
https://github.com/jerryscript-project/jerryscript/issues/3870
632,483,470
3,870
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision cae6cd0 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off ``` ###### Test case ``` function a ({ *=; }) ``` ###### Output ``` ICE: Assertion 'context_p->token.type == LEXER_RIGHT_BRACE || context_p->token.type == LEXER_ASSIGN || context_p->token.type == LEXER_COMMA' failed at /home/JerryScript/jerry-core/parser/js/js-parser-expr.c(parser_parse_object_initializer):3234. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->token.type == LEXER_RIGHT_BRACE || context_p->token.type == LEXER_ASSIGN || context_p->token.type == LEXER_COMMA' in parser_parse_object_initializer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3869/comments
0
2020-06-06T13:55:33Z
2020-06-08T08:27:43Z
https://github.com/jerryscript-project/jerryscript/issues/3869
632,478,665
3,869
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision cae6cd08 ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 a = new Proxy({}, {}); for (var $ in a) ; ``` ###### Output ```text Script Error: TypeError: UNIMPLEMENTED: Proxy support in for-in. ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):107. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==2164289==ERROR: AddressSanitizer: ABRT on unknown address 0x00210641 (pc 0xf7ee5b49 bp 0xffe7f14c sp 0xffe7f130 T0) #0 0xf7ee5b48 (linux-gate.so.1+0xb48) #1 0xf76d84c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf76c03f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x56756146 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5668e39e in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x5668e3df in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x5668db84 in jmem_heap_finalize jerryscript/jerry-core/jmem/jmem-heap.c:107 #7 0x5668d9e2 in jmem_finalize jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5660b20b in jerry_cleanup jerryscript/jerry-core/api/jerry.c:254 #9 0x56608fbb in main jerryscript/jerry-main/main-unix.c:994 #10 0xf76c1ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #11 0x56605c84 in _start (jerryscript/build/bin/jerry+0x18c84) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==2164289==ABORTING ``` <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/3868/comments
0
2020-06-05T16:06:46Z
2020-06-08T08:29:07Z
https://github.com/jerryscript-project/jerryscript/issues/3868
631,717,240
3,868
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1770ccae ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 a; var b; Promise.race([a, b]); Promise.race([b, a]); Promise.race([, b, a]); Promise.race().then(function() {}, function() { let str; function getStr() { return $ `$` } var $ = getStr() }) ``` ###### Output ```text ================================================================= ==2285521==ERROR: AddressSanitizer: heap-use-after-free on address 0xf4700760 at pc 0x565de9ac bp 0xffbba8c8 sp 0xffbba8b8 READ of size 2 at 0xf4700760 thread T0 #0 0x565de9ab in ecma_ref_object jerryscript/jerry-core/ecma/base/ecma-gc.c:133 #1 0x565f6bed in ecma_copy_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:854 #2 0x56698bfe in vm_loop jerryscript/jerry-core/vm/vm.c:2119 #3 0x566a46b3 in vm_execute jerryscript/jerry-core/vm/vm.c:4193 #4 0x566a4cbe in vm_run jerryscript/jerry-core/vm/vm.c:4301 #5 0x5662ab9a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:932 #6 0x5662b465 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #7 0x56691434 in opfunc_call jerryscript/jerry-core/vm/vm.c:764 #8 0x566a4717 in vm_execute jerryscript/jerry-core/vm/vm.c:4199 #9 0x566a4cbe in vm_run jerryscript/jerry-core/vm/vm.c:4301 #10 0x5662ab9a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:932 #11 0x5662b465 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #12 0x5662e5d2 in ecma_process_promise_reaction_job jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:153 #13 0x5662f468 in ecma_process_all_enqueued_jobs jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:338 #14 0x565d5d52 in jerry_run_all_enqueued_jobs jerryscript/jerry-core/api/jerry.c:632 #15 0x565d2e0a in main jerryscript/jerry-main/main-unix.c:957 #16 0xf76d8ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #17 0x565cfc44 in _start (jerryscript/build/bin/jerry+0x18c44) 0xf4700760 is located 0 bytes inside of 24-byte region [0xf4700760,0xf4700778) freed by thread T0 here: #0 0xf79da814 in __interceptor_free (/usr/lib32/libasan.so.5+0x113814) #1 0x56657d98 in jmem_heap_free_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:476 #2 0x56657ed3 in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:685 #3 0x566a4dbc in ecma_dealloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:123 #4 0x565e2df3 in ecma_gc_free_object jerryscript/jerry-core/ecma/base/ecma-gc.c:1336 #5 0x565e3954 in ecma_gc_run jerryscript/jerry-core/ecma/base/ecma-gc.c:1464 #6 0x565e3a68 in ecma_free_unused_memory jerryscript/jerry-core/ecma/base/ecma-gc.c:1508 #7 0x56657bfa in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:286 #8 0x56657c95 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:323 #9 0x566a4d99 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #10 0x565f806e in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:82 #11 0x56627d1e in ecma_new_standard_error jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:137 #12 0x56627f11 in ecma_new_standard_error_with_message jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:203 #13 0x56627fe0 in ecma_raise_standard_error jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:233 #14 0x56628587 in ecma_raise_type_error jerryscript/jerry-core/ecma/operations/ecma-exceptions.c:398 #15 0x5662d66b in ecma_op_iterator_next jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c:261 #16 0x5662de77 in ecma_op_iterator_step jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c:509 #17 0x566cfa7d in ecma_builtin_promise_perform_race jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:141 #18 0x566d10c8 in ecma_builtin_promise_race_or_all jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:545 #19 0x566d1221 in ecma_builtin_promise_race jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:583 #20 0x566cf66a in ecma_builtin_promise_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.inc.h:46 #21 0x5660dd91 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1195 #22 0x5660df63 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1219 #23 0x5662a755 in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:828 #24 0x5662b465 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #25 0x56691434 in opfunc_call jerryscript/jerry-core/vm/vm.c:764 #26 0x566a4717 in vm_execute jerryscript/jerry-core/vm/vm.c:4199 #27 0x566a4cbe in vm_run jerryscript/jerry-core/vm/vm.c:4301 #28 0x5668fb4a in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #29 0x565d5c7c in jerry_run jerryscript/jerry-core/api/jerry.c:595 previously allocated by thread T0 here: #0 0xf79dac17 in __interceptor_malloc (/usr/lib32/libasan.so.5+0x113c17) #1 0x56657b9c in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x56657c08 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x56657c95 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:323 #4 0x566a4d99 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x565f806e in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:82 #6 0x56619221 in ecma_op_new_array_object jerryscript/jerry-core/ecma/operations/ecma-array-object.c:78 #7 0x56713908 in parser_new_tagged_template_literal jerryscript/jerry-core/parser/js/js-parser-tagged-template-literal.c:110 #8 0x566f4c48 in parser_parse_tagged_template_literal jerryscript/jerry-core/parser/js/js-parser-expr.c:1520 #9 0x566f7ccd in parser_process_unary_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:2155 #10 0x566fdba5 in parser_parse_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:3481 #11 0x56711749 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:3030 #12 0x56669ab2 in parser_parse_function jerryscript/jerry-core/parser/js/js-parser.c:2468 #13 0x567065a4 in parser_parse_function_statement jerryscript/jerry-core/parser/js/js-parser-statm.c:832 #14 0x56710e0c in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:2871 #15 0x56669ab2 in parser_parse_function jerryscript/jerry-core/parser/js/js-parser.c:2468 #16 0x566eae1c in lexer_construct_function_object jerryscript/jerry-core/parser/js/js-lexer.c:2662 #17 0x566f3d4e in parser_parse_function_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:1348 #18 0x566f63a3 in parser_parse_unary_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:1818 #19 0x566fdb4e in parser_parse_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:3472 #20 0x566f7d84 in parser_process_unary_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:2176 #21 0x566fdba5 in parser_parse_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:3481 #22 0x566fd587 in parser_parse_block_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:3421 #23 0x56712015 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:3152 #24 0x56667179 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2177 #25 0x5666af83 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2813 #26 0x565d56fd in jerry_parse jerryscript/jerry-core/api/jerry.c:447 #27 0x565d24f7 in main jerryscript/jerry-main/main-unix.c:750 #28 0xf76d8ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/ecma/base/ecma-gc.c:133 in ecma_ref_object Shadow bytes around the buggy address: 0x3e8e0090: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3e8e00a0: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x3e8e00b0: 00 00 00 fa fa fa fd fd fd fa fa fa fd fd fd fa 0x3e8e00c0: fa fa fd fd fd fa fa fa fd fd fd fa fa fa 00 00 0x3e8e00d0: 00 04 fa fa 00 00 02 fa fa fa fd fd fd fa fa fa =>0x3e8e00e0: fd fd fd fa fa fa fd fd fd fa fa fa[fd]fd fd fa 0x3e8e00f0: fa fa 00 00 00 00 fa fa 00 00 00 04 fa fa 00 00 0x3e8e0100: 00 fa fa fa fd fd fd fa fa fa 00 00 00 00 fa fa 0x3e8e0110: 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00 0x3e8e0120: fa fa fd fd fd fa fa fa fd fd fd fd fa fa 00 00 0x3e8e0130: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 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 ==2285521==ABORTING ``` <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/3866/comments
0
2020-06-05T13:08:44Z
2020-06-09T06:20:31Z
https://github.com/jerryscript-project/jerryscript/issues/3866
631,576,888
3,866
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5d ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 o = new Proxy( function() {}, { get() { if ($); } }) Reflect.construct(Function, ['c'], o) ``` ###### Output ```text 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):75. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==3810760==ERROR: AddressSanitizer: ABRT on unknown address 0x003a25c8 (pc 0xf7fa8b49 bp 0xffc6438c sp 0xffc64370 T0) #0 0xf7fa8b48 (linux-gate.so.1+0xb48) #1 0xf779b4c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf77833f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x566f3e05 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5662c35e in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x5662c39f in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x565d2c91 in ecma_free_string_list jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:75 #7 0x565d2e5e in ecma_finalize_lit_storage jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:121 #8 0x565d1a73 in ecma_finalize jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:92 #9 0x565a8f84 in jerry_cleanup jerryscript/jerry-core/api/jerry.c:238 #10 0x565a6f7b in main jerryscript/jerry-main/main-unix.c:994 #11 0xf7784ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #12 0x565a3c44 in _start (jerryscript/build/bin/jerry+0x18c44) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==3810760==ABORTING ``` <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/3862/comments
0
2020-06-05T07:25:26Z
2020-06-08T08:23:27Z
https://github.com/jerryscript-project/jerryscript/issues/3862
631,373,433
3,862
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5d ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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() { function* generatorFn() {} g = generatorFn() ownProto = Object.getPrototypeOf(g) sharedProto = Object.getPrototypeOf(ownProto) propertyIsEnumerable(sharedProto) })() ``` ###### Output ```text 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):2810. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==115352==ERROR: AddressSanitizer: ABRT on unknown address 0x0001c298 (pc 0xf7fbfb49 bp 0xfff6f50c sp 0xfff6f4f0 T0) #0 0xf7fbfb48 (linux-gate.so.1+0xb48) #1 0xf77b24c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf779a3f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x566f5e05 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5662e35e in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x5662e39f in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x56612c56 in ecma_object_get_class_name jerryscript/jerry-core/ecma/operations/ecma-objects.c:2810 #7 0x565d7c4f in ecma_builtin_helper_object_to_string jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:143 #8 0x566a243f in ecma_builtin_object_prototype_object_to_string jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:83 #9 0x566a287e in ecma_builtin_object_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:248 #10 0x565e3d91 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1195 #11 0x565e3f63 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1219 #12 0x56600755 in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:828 #13 0x56601465 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #14 0x56608606 in ecma_op_general_object_ordinary_value jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:324 #15 0x566084c6 in ecma_op_general_object_default_value jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:289 #16 0x5660f570 in ecma_op_object_default_value jerryscript/jerry-core/ecma/operations/ecma-objects.c:1733 #17 0x565f9b03 in ecma_op_to_primitive jerryscript/jerry-core/ecma/operations/ecma-conversion.c:199 #18 0x565fa385 in ecma_op_to_string jerryscript/jerry-core/ecma/operations/ecma-conversion.c:413 #19 0x565fa5d7 in ecma_op_to_prop_name jerryscript/jerry-core/ecma/operations/ecma-conversion.c:496 #20 0x566a2aca in ecma_builtin_object_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:309 #21 0x565e3d91 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1195 #22 0x565e3f63 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1219 #23 0x56600755 in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:828 #24 0x56601465 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #25 0x56667434 in opfunc_call jerryscript/jerry-core/vm/vm.c:764 #26 0x5667a717 in vm_execute jerryscript/jerry-core/vm/vm.c:4199 #27 0x5667acbe in vm_run jerryscript/jerry-core/vm/vm.c:4301 #28 0x56600b9a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:932 #29 0x56601465 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #30 0x56667434 in opfunc_call jerryscript/jerry-core/vm/vm.c:764 #31 0x5667a717 in vm_execute jerryscript/jerry-core/vm/vm.c:4199 #32 0x5667acbe in vm_run jerryscript/jerry-core/vm/vm.c:4301 #33 0x56665b4a in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #34 0x565abc7c in jerry_run jerryscript/jerry-core/api/jerry.c:595 #35 0x565a8540 in main jerryscript/jerry-main/main-unix.c:759 #36 0xf779bee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #37 0x565a5c44 in _start (jerryscript/build/bin/jerry+0x18c44) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==115352==ABORTING ``` <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) in ecma_object_get_class_name
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3861/comments
0
2020-06-05T07:23:54Z
2020-06-08T08:25:05Z
https://github.com/jerryscript-project/jerryscript/issues/3861
631,372,623
3,861
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5dd7144d97b8b32cc2697d5b04bb647e35 ###### Build platform Ubuntu 18.04 LTS ###### Build steps python tools/build.py --profile=es2015-subset --lto=off --error-messages=on --strip=off --compile-flag=-fsanitize=address ###### Test case ``` function main() { const v4 = [13.37,13.37]; const v6 = [1337,1337]; const v7 = [2147483649,13.37,"species"]; const v8 = {a:13.37,length:13.37}; const v9 = {constructor:v7}; let v10 = v6; const v12 = {}; const v13 = [v12,v12,v12,v12]; const v14 = gc(); const v15 = "species".__proto__; let v18 = 0; while (v18 < 4) { const v19 = v18 + 1; v18 = v19; } const v22 = gc(); const v23 = "species".length; const v24 = [13.37,13.37]; const v26 = [1337,1337]; const v27 = [2147483649,13.37,"species"]; const v28 = {a:13.37,length:13.37}; const v29 = {constructor:v27}; const v33 = [13.37,13.37]; const v36 = {get:gc,set:gc}; const v38 = Object.defineProperty(v9,"e",v36); const v39 = !v8; const v40 = [0,v33,"species"]; const v45 = [2147483649,13.37,"species"]; const v46 = {constructor:v45}; const v48 = [1337,1337]; const v51 = Object(); let v52 = 0; const v53 = Object(); const v54 = v52 + 1; const v55 = [1337,1337]; const v56 = [2147483649,1337,"species"]; const v57 = {a:13.37,length:13.37}; const v58 = {constructor:v56}; const v61 = [1337,1337]; let v62 = v61; const v66 = [1337,1337]; const v67 = [2147483649,"species","species"]; const v69 = v66 % v66; const v70 = [1337,1337]; const v71 = !v46; let v74 = 0; do { let v75 = 13.37; try { const v76 = Object(...1,v38); } catch(v77) { const v78 = typeof v56; const v80 = v78 === "number"; let v81 = v80; } } while (v74 < 9); } main(); ``` ###### Execution steps build/bin/jerry testcase.js ###### Output Program received signal SIGABRT, Aborted. ###### Backtrace Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 (gdb) bt ``` #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff6e43801 in __GI_abort () at abort.c:79 #2 0x00000000005ac952 in jerry_port_fatal () #3 0x000000000053beef in jerry_fatal () #4 0x00000000004f90d3 in ecma_ref_object () #5 0x00000000005042cd in ecma_copy_value () #6 0x000000000055cf7c in vm_loop () #7 0x000000000055b5f6 in vm_execute () #8 0x000000000055b193 in vm_run () #9 0x000000000051f650 in ecma_op_function_call_simple () #10 0x000000000051f2d6 in ecma_op_function_call () #11 0x000000000055b9aa in vm_execute () #12 0x000000000055b193 in vm_run () #13 0x00000000004f501e in jerry_run () #14 0x00000000004f25df in main () ```
SIGABRT in jerry_port_fatal
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3860/comments
3
2020-06-05T03:46:21Z
2020-06-06T16:39:41Z
https://github.com/jerryscript-project/jerryscript/issues/3860
631,289,340
3,860
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5dd7144d97b8b32cc2697d5b04bb647e35 ###### Build platform Ubuntu 18.04 LTS ###### Build steps python tools/build.py --profile=es2015-subset --lto=off --error-messages=on --strip=off --compile-flag=-fsanitize=address ###### Test case ``` function main() { const v3 = {a:13.37,length:13.37}; const v6 = [13.37,13.37]; let v9 = 0; const v10 = v6.copyWithin(v9,8,2147483649); const v11 = -9007199254740993 == gc; const v12 = gc(...v11,...v3); } main(); ``` ###### Execution steps build/bin/jerry testcase.js ###### Output AddressSanitizer:DEADLYSIGNAL ###### Backtrace Program received signal SIGSEGV, Segmentation fault. 0x000000000053bd5f in jmem_pools_finalize () (gdb) bt ``` #0 0x000000000053bd5f in jmem_pools_finalize () #1 0x000000000053a7bb in jmem_finalize () #2 0x00000000004f2ba0 in main () ```
SEGV in jmem_pools_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3859/comments
0
2020-06-05T03:41:34Z
2020-06-06T16:39:42Z
https://github.com/jerryscript-project/jerryscript/issues/3859
631,287,983
3,859
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5dd7144d97b8b32cc2697d5b04bb647e35 ###### Build platform Ubuntu 18.04 LTS ###### Build steps python tools/build.py --profile=es2015-subset --lto=off --error-messages=on --strip=off --compile-flag=-fsanitize=address ###### Test case ``` function main() { const v1 = ~2147483649; const v3 = v1 / v1; const v4 = v3 % "species"; function v5(v6,v7,v8,v9) { const v11 = [1337,1337]; return v5; } const v14 = "species".__proto__; "species"[4294967297] = v14; let v17 = 0; while (v17 < 3) { const v18 = gc(...v4,3,v4); } const v19 = "species"[4179111969]; const v20 = v17 == v4; let v21 = 3; if (v19) { const v23 = {set:v19}; const v25 = Object.defineProperty("species","constructor",v23); } else { v21 = 3; } const v26 = [13.37,13.37]; const v27 = {toString:0,length:v3,d:0}; const v28 = v17 - v27; const v29 = v19.__proto__; const v30 = v19(v4,3,2147483649,v29); const v31 = [v21,v29,2147483649,v21]; const v33 = [1337,1337]; const v34 = v29 - 1; const v35 = [2147483649,13.37,"species"]; const v36 = {a:13.37,length:13.37}; const v37 = {constructor:v35}; let v38 = v33; let v41 = 0; while (v41 < 1) { } let v42 = gc; v35.__proto__ = v33; const v44 = Symbol.iterator; const v45 = Symbol[v44]; const v47 = RegExp(v45); } main(); ``` ###### Execution steps build/bin/jerry testcase.js ###### Output AddressSanitizer:DEADLYSIGNAL ###### Backtrace Program received signal SIGSEGV, Segmentation fault. 0x00000000004ffd0c in ecma_deref_ecma_string () (gdb) bt ``` #0 0x00000000004ffd0c in ecma_deref_ecma_string () #1 0x00000000005a95bb in opfunc_spread_arguments () #2 0x0000000000560348 in vm_loop () #3 0x000000000055b5f6 in vm_execute () #4 0x000000000055b193 in vm_run () #5 0x000000000051f650 in ecma_op_function_call_simple () #6 0x000000000051f2d6 in ecma_op_function_call () #7 0x000000000055b9aa in vm_execute () #8 0x000000000055b193 in vm_run () #9 0x00000000004f501e in jerry_run () #10 0x00000000004f25df in main (). ```
SEGV in ecma_deref_ecma_string
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3858/comments
0
2020-06-05T03:38:44Z
2020-06-06T16:39:42Z
https://github.com/jerryscript-project/jerryscript/issues/3858
631,287,137
3,858
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5d ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 --stack-limit=16 ``` ###### Test case ```javascript new async ``` ###### Output ```text ICE: Assertion 'scanner_context_p->mode == SCAN_MODE_PRIMARY_EXPRESSION' failed at jerryscript/jerry-core/parser/js/js-scanner-ops.c(scanner_check_async_function):263. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==142281==ERROR: AddressSanitizer: ABRT on unknown address 0x00022bc9 (pc 0xf7f6ab49 bp 0xffb4c47c sp 0xffb4c460 T0) #0 0xf7f6ab48 (linux-gate.so.1+0xb48) #1 0xf775d4c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf77453f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x566dc184 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x566146ba in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x566146fb in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x566d4f2e in scanner_check_async_function jerryscript/jerry-core/parser/js/js-scanner-ops.c:263 #7 0x56633014 in scanner_scan_primary_expression jerryscript/jerry-core/parser/js/js-scanner.c:184 #8 0x5663c4e2 in scanner_scan_all jerryscript/jerry-core/parser/js/js-scanner.c:2367 #9 0x566229c5 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2077 #10 0x566272df in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2813 #11 0x5659172d in jerry_parse jerryscript/jerry-core/api/jerry.c:447 #12 0x5658e527 in main jerryscript/jerry-main/main-unix.c:750 #13 0xf7746ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #14 0x5658bc74 in _start (jerryscript/build/bin/jerry+0x18c74) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==142281==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion scanner_context_p->mode == SCAN_MODE_PRIMARY_EXPRESSION failed in scanner_check_async_function
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3857/comments
0
2020-06-04T16:57:03Z
2020-06-08T08:25:35Z
https://github.com/jerryscript-project/jerryscript/issues/3857
630,996,175
3,857
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5d ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 --stack-limit=32 ``` ###### Test case ```javascript let str = 'for (let i of id_36) function testcase() { testcase'; async (str); ``` ###### Output ```text ICE: Assertion 'context_p->stack_top_uint8 == SCAN_STACK_TRY_STATEMENT || context_p->stack_top_uint8 == SCAN_STACK_CATCH_STATEMENT' failed at jerryscript/jerry-core/parser/js/js-scanner.c(scanner_scan_statement_end):2128. Error: ERR_FAILED_INTERNAL_ASSERTION AddressSanitizer:DEADLYSIGNAL ================================================================= ==528110==ERROR: AddressSanitizer: ABRT on unknown address 0x00080eee (pc 0xf7f4eb49 bp 0xfffcef0c sp 0xfffceef0 T0) #0 0xf7f4eb48 (linux-gate.so.1+0xb48) #1 0xf77414c5 in raise (/lib/i386-linux-gnu/libc.so.6+0x354c5) #2 0xf77293f6 in abort (/lib/i386-linux-gnu/libc.so.6+0x1d3f6) #3 0x566f8e05 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5663135e in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #5 0x5663139f in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #6 0x56657e5a in scanner_scan_statement_end jerryscript/jerry-core/parser/js/js-scanner.c:2127 #7 0x56659db9 in scanner_scan_all jerryscript/jerry-core/parser/js/js-scanner.c:2545 #8 0x5663f669 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2077 #9 0x56643f83 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2813 #10 0x565ae6fd in jerry_parse jerryscript/jerry-core/api/jerry.c:447 #11 0x565ab4f7 in main jerryscript/jerry-main/main-unix.c:750 #12 0xf772aee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #13 0x565a8c44 in _start (jerryscript/build/bin/jerry+0x18c44) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0xb48) ==528110==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->stack_top_uint8 == SCAN_STACK_TRY_STATEMENT || context_p->stack_top_uint8 == SCAN_STACK_CATCH_STATEMENT in scanner_scan_statement_end
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3856/comments
0
2020-06-04T16:44:10Z
2020-06-08T08:25:35Z
https://github.com/jerryscript-project/jerryscript/issues/3856
630,987,609
3,856
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c09c2c5d ###### Build platform Linux-5.4.0-33-generic-x86_64-with-glibc2.29 ###### 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 --stack-limit=32 ``` ###### Test case ```javascript var a = { valueOf: async function() {} } a--; ``` ###### Output ```text ================================================================= ==354690==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0xff9de46c at pc 0x566c170e bp 0xff9dded8 sp 0xff9ddec8 WRITE of size 4 at 0xff9de46c thread T0 #0 0x566c170d in vm_loop jerryscript/jerry-core/vm/vm.c:1165 #1 0x566d26b3 in vm_execute jerryscript/jerry-core/vm/vm.c:4193 #2 0x566d2cbe in vm_run jerryscript/jerry-core/vm/vm.c:4301 #3 0x56658b9a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:932 #4 0x56659465 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #5 0x56660606 in ecma_op_general_object_ordinary_value jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:324 #6 0x566604c6 in ecma_op_general_object_default_value jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:289 #7 0x56667570 in ecma_op_object_default_value jerryscript/jerry-core/ecma/operations/ecma-objects.c:1733 #8 0x56651b03 in ecma_op_to_primitive jerryscript/jerry-core/ecma/operations/ecma-conversion.c:199 #9 0x56651dff in ecma_op_to_number jerryscript/jerry-core/ecma/operations/ecma-conversion.c:292 #10 0x566c7f6b in vm_loop jerryscript/jerry-core/vm/vm.c:2364 #11 0x566d26b3 in vm_execute jerryscript/jerry-core/vm/vm.c:4193 #12 0x566d2cbe in vm_run jerryscript/jerry-core/vm/vm.c:4301 #13 0x566bdb4a in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #14 0x56603c7c in jerry_run jerryscript/jerry-core/api/jerry.c:595 #15 0x56600540 in main jerryscript/jerry-main/main-unix.c:759 #16 0xf7707ee4 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1eee4) #17 0x565fdc44 in _start (jerryscript/build/bin/jerry+0x18c44) Address 0xff9de46c is located in stack of thread T0 SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow jerryscript/jerry-core/vm/vm.c:1165 in vm_loop Shadow bytes around the buggy address: 0x3ff3bc30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bc40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bc50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bc60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bc70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x3ff3bc80: 00 00 00 00 ca ca ca ca 00 00 00 00 00[04]cb cb 0x3ff3bc90: cb cb cb cb 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bcb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bcc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff3bcd0: 00 00 00 00 00 00 00 00 00 00 00 00 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 Shadow gap: cc ==354690==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
dynamic-stack-buffer-overflow in ecma_op_function_call_simple
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3855/comments
0
2020-06-04T16:42:03Z
2020-06-08T08:25:35Z
https://github.com/jerryscript-project/jerryscript/issues/3855
630,986,164
3,855
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision dc837d23 ###### Build platform Linux-5.3.0-53-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 try{$,[ ]=!$--[``]}catch(\u7c19‍ ``` ###### Output ```text ICE: Assertion 'block_found' failed at jerryscript//jerry-core/parser/js/js-parser-statm.c(parser_parse_try_statement_end):2003. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5b59 in __kernel_vsyscall () #1 0xf781b832 in __libc_signal_restore_set (set=0xffffb9fc) at ../sysdeps/unix/sysv/linux/nptl-signals.h:80 #2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xf781ccc1 in __GI_abort () at abort.c:79 #4 0x5657c31c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-port/default/default-fatal.c:30 #5 0x56633cfa in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-core/jrt/jrt-fatals.c:63 #6 0x56633d3b in jerry_assert_fail (assertion=0x566faea0 "block_found", file=0x566f9f60 "jerryscript//jerry-core/parser/js/js-parser-statm.c", function=0x566e9100 <__func__.6047.lto_priv.209> "parser_parse_try_statement_end", line=2003) at jerryscript//jerry-core/jrt/jrt-fatals.c:87 #7 0x565aab79 in parser_parse_try_statement_end (context_p=0xffffc150) at jerryscript//jerry-core/parser/js/js-parser-statm.c:2003 #8 0x565b02b4 in parser_parse_statements (context_p=0xffffc150) at jerryscript//jerry-core/parser/js/js-parser-statm.c:3211 #9 0x56642ebc in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "try{}catch(_‌ม){}try{letằ‍,[]=!function(){}--[``];}catch(\\u7c19‍){}finally{}exportconstල=nulldebugger", source_size=113, parse_opts=0, error_location_p=0xffffc380) at jerryscript//jerry-core/parser/js/js-parser.c:2177 #10 0x56646ca4 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "try{}catch(_‌ม){}try{letằ‍,[]=!function(){}--[``];}catch(\\u7c19‍){}finally{}exportconstල=nulldebugger", source_size=113, parse_opts=0, bytecode_data_p=0xffffc440) at jerryscript//jerry-core/parser/js/js-parser.c:2808 #11 0x5669ac60 in jerry_parse (resource_name_p=0xffffca85 "/home/fancsikrobi/harmony/fuzzinator-configs/.fuzzinator-17057/jerryscript/picireny/593.js", resource_name_length=90, source_p=0x56755ba0 <buffer.lto_priv> "try{}catch(_‌ม){}try{letằ‍,[]=!function(){}--[``];}catch(\\u7c19‍){}finally{}exportconstල=nulldebugger", source_size=113, parse_opts=0) at jerryscript//jerry-core/api/jerry.c:447 #12 0x56697870 in main (argc=2, argv=0xffffc834) at jerryscript//jerry-main/main-unix.c:750 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion block_found in parser_parse_try_statement_end
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3849/comments
0
2020-06-04T09:26:51Z
2020-06-05T11:25:06Z
https://github.com/jerryscript-project/jerryscript/issues/3849
630,661,901
3,849
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision fe09200 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 ``` typeof (a) = 1 === 'undefined'; ``` ###### Output ``` ICE: Assertion 'context_p->stack_top_uint8 == LEXER_EXPRESSION_START' failed at /home/JerryScript/jerryscript-fe09200/jerry-core/parser/js/js-parser-expr.c(parser_parse_expression):3561. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->stack_top_uint8 == LEXER_EXPRESSION_START' in parser_parse_expression
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3845/comments
0
2020-06-04T07:24:51Z
2020-06-04T11:23:26Z
https://github.com/jerryscript-project/jerryscript/issues/3845
630,577,786
3,845
[ "jerryscript-project", "jerryscript" ]
When executing the below testcase, `{` is not in the range of the regular expression but JerryScript replaces it. How does jerry replace the letter ```{```? Is this a correct behavior for Jerry? JerryScript version [bd1c4d](https://github.com/galpeter/jerryscript/tree/bd1c4df9a608cc7193330944c857ca4f6294b993) Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-55-generic x86_64) Build steps python tools/build.py --clean --debug --logging=on --line-info=on --error-messages=on --cpointer-32bit=on --mem-heap=1572864 --profile=es2015-subset Testcase ```javascript var NISLFuzzingFunc = function(a, nislMutatuionParameter1){ return a.replace(/[#-\w]/g, nislMutatuionParameter1); }; var NISLParameter0 = '{'; var nislMutatuionArgument0 = false; var NISLCallingResult = NISLFuzzingFunc(NISLParameter0, nislMutatuionArgument0); print(NISLCallingResult); ``` Execution steps ./build/bin/jerry testcase.js Output false Expected behavior { Conributor:@QuXing9
A problem about the regular expression
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3844/comments
1
2020-06-04T05:46:06Z
2020-06-04T08:37:44Z
https://github.com/jerryscript-project/jerryscript/issues/3844
630,529,463
3,844
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision fe09200d ###### Build platform Linux-5.3.0-53-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----/$[$]`` ``` ###### Output ```text ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at jerryscript//jerry-core/parser/js/js-parser.c(parser_parse_source):2185. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5b59 in __kernel_vsyscall () #1 0xf781b832 in __libc_signal_restore_set (set=0xffffbddc) at ../sysdeps/unix/sysv/linux/nptl-signals.h:80 #2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xf781ccc1 in __GI_abort () at abort.c:79 #4 0x5657c31c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-port/default/default-fatal.c:30 #5 0x56633cfa in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-core/jrt/jrt-fatals.c:63 #6 0x56633d3b in jerry_assert_fail (assertion=0x5670c640 "context.status_flags & PARSER_SCANNING_SUCCESSFUL", file=0x5670b6e0 "jerryscript//jerry-core/parser/js/js-parser.c", function=0x566dfb00 <__func__.5991.lto_priv.502> "parser_parse_source", line=2185) at jerryscript//jerry-core/jrt/jrt-fatals.c:87 #7 0x566430c9 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "$,[ ]=0----/$[$]``;;", source_size=20, parse_opts=0, error_location_p=0xffffc380) at jerryscript//jerry-core/parser/js/js-parser.c:2185 #8 0x56646ca4 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "$,[ ]=0----/$[$]``;;", source_size=20, parse_opts=0, bytecode_data_p=0xffffc440) at jerryscript//jerry-core/parser/js/js-parser.c:2808 #9 0x5669ac60 in jerry_parse (resource_name_p=0xffffca85 "/home/fancsikrobi/harmony/fuzzinator-configs/.fuzzinator-21731/jerryscript/picireny/589.js", resource_name_length=90, source_p=0x56755ba0 <buffer.lto_priv> "$,[ ]=0----/$[$]``;;", source_size=20, parse_opts=0) at jerryscript//jerry-core/api/jerry.c:447 #10 0x56697870 in main (argc=2, argv=0xffffc834) at jerryscript//jerry-main/main-unix.c:750 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context.status_flags & PARSER_SCANNING_SUCCESSFUL
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3843/comments
0
2020-06-03T14:49:05Z
2020-06-05T11:25:06Z
https://github.com/jerryscript-project/jerryscript/issues/3843
630,062,039
3,843
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision fe09200d ###### Build platform Linux-5.3.0-53-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 try{ }catch(\u6EAe){while(""?_‌:()=>{}|{}) ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at jerryscript//jerry-core/parser/js/js-parser-statm.c(parser_parse_while_statement_start):1060. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5b59 in __kernel_vsyscall () #1 0xf781b832 in __libc_signal_restore_set (set=0xffffba0c) at ../sysdeps/unix/sysv/linux/nptl-signals.h:80 #2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xf781ccc1 in __GI_abort () at abort.c:79 #4 0x5657c31c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-port/default/default-fatal.c:30 #5 0x56633cfa in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-core/jrt/jrt-fatals.c:63 #6 0x56633d3b in jerry_assert_fail (assertion=0x566fa880 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566f9f60 "jerryscript//jerry-core/parser/js/js-parser-statm.c", function=0x566e8f40 <__func__.5965.lto_priv.213> "parser_parse_while_statement_start", line=1060) at jerryscript//jerry-core/jrt/jrt-fatals.c:87 #7 0x565a58c0 in parser_parse_while_statement_start (context_p=0xffffc150) at jerryscript//jerry-core/parser/js/js-parser-statm.c:1060 #8 0x565aee86 in parser_parse_statements (context_p=0xffffc150) at jerryscript//jerry-core/parser/js/js-parser-statm.c:2909 #9 0x56642ebc in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "try{}catch(\\u6EAe){dobreak;while(\"\"?_‌:()=>{}|class{;})}finally{function_‍‌・﹎({,}){exportdebuggerexportvar{}={,},{,}=this,ਐ,_‍=super}}", source_size=148, parse_opts=0, error_location_p=0xffffc380) at jerryscript//jerry-core/parser/js/js-parser.c:2177 #10 0x56646ca4 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "try{}catch(\\u6EAe){dobreak;while(\"\"?_‌:()=>{}|class{;})}finally{function_‍‌・﹎({,}){exportdebuggerexportvar{}={,},{,}=this,ਐ,_‍=super}}", source_size=148, parse_opts=0, bytecode_data_p=0xffffc440) at jerryscript//jerry-core/parser/js/js-parser.c:2808 #11 0x5669ac60 in jerry_parse (resource_name_p=0xffffca85 "/home/fancsikrobi/harmony/fuzzinator-configs/.fuzzinator-21731/jerryscript/picireny/568.js", resource_name_length=90, source_p=0x56755ba0 <buffer.lto_priv> "try{}catch(\\u6EAe){dobreak;while(\"\"?_‌:()=>{}|class{;})}finally{function_‍‌・﹎({,}){exportdebuggerexportvar{}={,},{,}=this,ਐ,_‍=super}}", source_size=148, parse_opts=0) at jerryscript//jerry-core/api/jerry.c:447 #12 0x56697870 in main (argc=2, argv=0xffffc834) at jerryscript//jerry-main/main-unix.c:750 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3842/comments
0
2020-06-03T14:47:59Z
2020-06-04T11:27:33Z
https://github.com/jerryscript-project/jerryscript/issues/3842
630,061,005
3,842
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision fe09200d ###### Build platform Linux-5.3.0-53-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 $?$:$=>{ }?{ }:$ ``` ###### Output ```text ICE: Assertion 'PARSER_ARGS_EQ (opcode, 0)' failed at jerryscript//jerry-core/parser/js/js-parser-util.c(parser_emit_cbc):294. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5b59 in __kernel_vsyscall () #1 0xf781b832 in __libc_signal_restore_set (set=0xffffb8fc) at ../sysdeps/unix/sysv/linux/nptl-signals.h:80 #2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xf781ccc1 in __GI_abort () at abort.c:79 #4 0x5657c31c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-port/default/default-fatal.c:30 #5 0x56633cfa in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-core/jrt/jrt-fatals.c:63 #6 0x56633d3b in jerry_assert_fail (assertion=0x566e9720 "PARSER_ARGS_EQ (opcode, 0)", file=0x566e9440 "jerryscript//jerry-core/parser/js/js-parser-util.c", function=0x566ec300 <__func__.4852.lto_priv.11> "parser_emit_cbc", line=294) at jerryscript//jerry-core/jrt/jrt-fatals.c:87 #7 0x56570e62 in parser_emit_cbc (context_p=0xffffc150, opcode=92) at jerryscript//jerry-core/parser/js/js-parser-util.c:294 #8 0x565980b8 in parser_process_binary_opcodes (context_p=0xffffc150, min_prec_treshold=0 '\000') at jerryscript//jerry-core/parser/js/js-parser-expr.c:2787 #9 0x5659b750 in parser_parse_expression (context_p=0xffffc150, options=2) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3515 #10 0x5659b010 in parser_parse_block_expression (context_p=0xffffc150, options=0) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3425 #11 0x565afe6c in parser_parse_statements (context_p=0xffffc150) at jerryscript//jerry-core/parser/js/js-parser-statm.c:3154 #12 0x56642ebc in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "throw$+-[]?()=>{}:()=>{}?+class{}:[,,,][super]--", source_size=48, parse_opts=0, error_location_p=0xffffc380) at jerryscript//jerry-core/parser/js/js-parser.c:2177 #13 0x56646ca4 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56755ba0 <buffer.lto_priv> "throw$+-[]?()=>{}:()=>{}?+class{}:[,,,][super]--", source_size=48, parse_opts=0, bytecode_data_p=0xffffc440) at jerryscript//jerry-core/parser/js/js-parser.c:2808 #14 0x5669ac60 in jerry_parse (resource_name_p=0xffffca85 "/home/fancsikrobi/harmony/fuzzinator-configs/.fuzzinator-21731/jerryscript/picireny/139.js", resource_name_length=90, source_p=0x56755ba0 <buffer.lto_priv> "throw$+-[]?()=>{}:()=>{}?+class{}:[,,,][super]--", source_size=48, parse_opts=0) at jerryscript//jerry-core/api/jerry.c:447 #15 0x56697870 in main (argc=2, argv=0xffffc834) at jerryscript//jerry-main/main-unix.c:750 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion PARSER_ARGS_EQ (opcode, 0)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3841/comments
0
2020-06-03T14:46:36Z
2020-06-04T11:27:33Z
https://github.com/jerryscript-project/jerryscript/issues/3841
630,059,433
3,841
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision a56e31f194fe52000ed95605ae3c92390cd60ad5 ###### Build platform Ubuntu 18.04.4 LTS (Linux 4.15.0-91-generic x86_64) ###### Build steps - first output ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` - second output ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --strip=off --logging=on --stack-limit=15 ``` ###### Test case ```javascript function main() { var v1 = [1337,1337,1337,1337,1337]; var v5 = {length:"size",d:343661.18346282793,__proto__:13.37}; var v7 = {ownKeys:gc,defineProperty:gc,getPrototypeOf:gc,has:gc,call:gc,apply:gc,getOwnPropertyDescriptor:gc,isExtensible:gc,deleteProperty:v5,construct:gc}; var v9 = new Proxy(gc,v7); var v10 = v9; function v13(v14,v15,v16) { } var v17 = {set:Object,apply:Object,call:v13,get:resourceName,getOwnPropertyDescriptor:v13,deleteProperty:resourceName,isExtensible:v13,construct:resourceName,setPrototypeOf:v13,ownKeys:Object,preventExtensions:v13,defineProperty:Object}; var v19 = new Proxy(v10,v17); delete v19[v1]; } main(); ``` ###### Execution steps ```sh $ ~/jerryscript/build/bin/jerry 01.js AddressSanitizer:DEADLYSIGNAL ================================================================= ==15982==ERROR: AddressSanitizer: SEGV on unknown address 0x006ddfff806d (pc 0x55b637251552 bp 0x7fffa420e420 sp 0x7fffa420e410 T0) ==15982==The signal is caused by a READ memory access. #0 0x55b637251551 in ecma_deref_object /home/jerryscript/jerry-core/ecma/base/ecma-gc.c:149 #1 0x55b63726dd83 in ecma_free_property_descriptor /home/jerryscript/jerry-core/ecma/base/ecma-helpers.c:1204 #2 0x55b6372b3732 in ecma_proxy_object_delete_property /home/jerryscript/jerry-core/ecma/operations/ecma-proxy-object.c:1393 #3 0x55b6372a8eda in ecma_op_object_delete /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1688 #4 0x55b63738190b in vm_op_delete_prop /home/jerryscript/jerry-core/vm/opcodes.c:223 #5 0x55b63730841f in vm_loop /home/jerryscript/jerry-core/vm/vm.c:2533 #6 0x55b637310c9d in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4184 #7 0x55b637311322 in vm_run /home/jerryscript/jerry-core/vm/vm.c:4292 #8 0x55b63729a89c in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:932 #9 0x55b63729b1eb in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1131 #10 0x55b6372ff0dd in opfunc_call /home/jerryscript/jerry-core/vm/vm.c:764 #11 0x55b637310d17 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4190 #12 0x55b637311322 in vm_run /home/jerryscript/jerry-core/vm/vm.c:4292 #13 0x55b6372fd89a in vm_run_global /home/jerryscript/jerry-core/vm/vm.c:321 #14 0x55b6372471d0 in jerry_run /home/jerryscript/jerry-core/api/jerry.c:595 #15 0x55b637243c97 in main /home/jerryscript/jerry-main/main-unix.c:759 #16 0x7fbbd53cf0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #17 0x55b63724174d in _start (/home/jerryscript/build/bin/jerry+0x5274d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/jerryscript/jerry-core/ecma/base/ecma-gc.c:149 in ecma_deref_object ==15982==ABORTING ``` ``` $ gdb -nx -q ~/jerryscript2/build/bin/jerry -ex 'r 01.js' Reading symbols from /home/jerryscript2/build/bin/jerry... Starting program: /home/jerryscript2/build/bin/jerry 01.js Program received signal SIGSEGV, Segmentation fault. ecma_deref_object (object_p=0x55555556ab51 <ecma_op_to_string+104>) at /home/jerryscript2/jerry-core/ecma/base/ecma-gc.c:150 150 object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs - ECMA_OBJECT_REF_ONE); ```
SEGV ecma_deref_object (erry-core/ecma/base/ecma-gc.c:149)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3837/comments
0
2020-06-03T07:44:32Z
2020-06-05T10:28:35Z
https://github.com/jerryscript-project/jerryscript/issues/3837
629,771,826
3,837
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision a56e31f194fe52000ed95605ae3c92390cd60ad5 ###### Build platform Ubuntu 18.04.4 LTS (Linux 4.15.0-91-generic x86_64) ###### Build steps - first output ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` - second output ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --strip=off --logging=on --stack-limit=15 ``` ###### Test case ``` function main() { var v3 = new Float64Array(6); var v4 = v3.buffer; v4.constructor = Uint8Array; var v5 = new Float64Array(v3); } main(); ``` ###### Execution steps ```sh ICE: Assertion 'ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL)' failed at /home/jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c(ecma_arraybuffer_get_buffer):190. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` ``` $ gdb -nx -q ~/jerryscript/build/bin/jerry -ex 'r 01.js' Reading symbols from /home/jerryscript/build/bin/jerry... Starting program: /home/jerryscript/build/bin/jerry 01.js Program received signal SIGSEGV, Segmentation fault. ecma_typedarray_create_object_with_typedarray (typedarray_id=ECMA_FLOAT64_ARRAY, element_size_shift=<optimized out>, proto_p=<optimized out>, typedarray_p=0x5555556bd408 <jerry_global_heap+480>) at /home/jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:655 655 memcpy (dst_buf_p, src_buf_p, array_length << element_size_shift); (gdb) x/i $rip => 0x55555557654e <ecma_op_create_typedarray+346>: rep movsb %ds:(%rsi),%es:(%rdi) (gdb) i r rdi rdi 0x3004100020008 844704103137288 ```
ICE: Assertion 'ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL)' failed at jerry-core/ecma/operations/ecma-arraybuffer-object.c(ecma_arraybuffer_get_buffer):190. Error: ERR_FAILED_INTERNAL_ASSERTION
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3836/comments
1
2020-06-03T07:34:10Z
2020-06-08T08:28:43Z
https://github.com/jerryscript-project/jerryscript/issues/3836
629,765,533
3,836
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision a56e31f ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off --stack-limit=50 ``` ###### Test case ``` fn_expr = { "foo//b", } (function () { var a = [arguments]; })(); ``` ###### Output ``` ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' failed at /home/JerryScript/jerry-core/parser/js/js-parser.c(parser_parse_function_arguments):1705. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' in parser_parse_function_arguments
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3835/comments
0
2020-06-03T04:04:08Z
2020-06-03T13:28:15Z
https://github.com/jerryscript-project/jerryscript/issues/3835
629,674,784
3,835
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision a56e31f ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off --stack-limit=50 ``` ###### Test case ``` function dec(x) { return x - 1 }; for (var i = 11; ((123).toString(37)) = dec (i); i--) {} ``` ###### Output ``` ICE: Assertion '(flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth' failed at /home/JerryScript/jerry-core/parser/js/js-parser-util.c(parser_emit_cbc_backward_branch):669. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion '(flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth' in parser_emit_cbc_backward_branch
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3834/comments
0
2020-06-03T03:42:30Z
2020-06-03T13:29:27Z
https://github.com/jerryscript-project/jerryscript/issues/3834
629,668,362
3,834
[ "jerryscript-project", "jerryscript" ]
First of all, when reporting a bug, give the issue a descriptive title. In the body of the issue, optionally give a free-form text description of the bug. Give the context necessary for others to understand the problem. Then, provide information necessary to reproduce the bug. Omit sections that are irrelevant for the bug report, but note that information like git revision, build platform, build command, and test case are required in almost all cases. ###### JerryScript revision a56e31f194fe52000ed95605ae3c92390cd60ad5 ###### Build platform Windows-10-10.0.18362-SP0 ###### Build steps ```sh cd jerryscript python tools/build.py ``` ###### Build log ###### Test case ###### Execution platform ###### Execution steps ###### Output Traceback (most recent call last): File "tools/build.py", line 295, in <module> main() File "tools/build.py", line 282, in main ret = configure_jerry(arguments) File "tools/build.py", line 254, in configure_jerry return subprocess.call(cmake_cmd) File "C:\Users\EDZ\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 340, in call with Popen(*popenargs, **kwargs) as p: File "C:\Users\EDZ\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\EDZ\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒▒ļ▒▒▒
run build.py failed on windows10
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3833/comments
5
2020-06-03T02:26:36Z
2020-06-05T12:48:45Z
https://github.com/jerryscript-project/jerryscript/issues/3833
629,642,393
3,833
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### 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 --lto=off --stack-limit=50 ``` ###### Test case ``` str = ''; for (j = 0; j < 5; j++) { str += 'A'; b: for (i = 0; i < 5; i++) { str += 'B'; switch (1) { case 1: continue b; function f2() { assert(k > 0); assert(i < 10000); if(--k == 0) { return; } f2(); } k = 17; f2(); } str += 'C'; } str += 'D'; } ``` ###### Output ``` ASAN:SIGSEGV ================================================================= ==35306==ERROR: AddressSanitizer: SEGV on unknown address 0x00001c25 (pc 0x00001c25 bp 0x00001c25 sp 0xfff1b9a0 T0) ASAN:SIGSEGV ==35306==AddressSanitizer: while reporting a bug found another one. Ignoring. ``` Credits: This vulnerability is detected by chong from OWL337.
Switch statement creates incorrect VM context
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3830/comments
3
2020-06-02T12:40:12Z
2020-06-05T12:39:14Z
https://github.com/jerryscript-project/jerryscript/issues/3830
629,170,580
3,830
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` var errorMessage = "toStringThrows" var toStringThrows = { "foo//bar/baz//foo" } try { var obj = {}; obj[toStringThrows] = 3; assert(false); } catch (e) { assert(e.message == errorMessage); } ``` ###### Output ``` ICE: Assertion 'block_found' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_try_statement_end):2003. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'block_found' in parser_parse_try_statement_end
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3825/comments
0
2020-06-01T04:41:43Z
2020-06-03T13:28:15Z
https://github.com/jerryscript-project/jerryscript/issues/3825
628,146,890
3,825
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` var a = { "foo//b", }; ``` ###### Output ``` ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2185. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3824/comments
0
2020-06-01T04:16:48Z
2020-06-03T13:28:14Z
https://github.com/jerryscript-project/jerryscript/issues/3824
628,139,379
3,824
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` function f ({"aba,a"}) { } ``` ###### Output ``` ICE: Assertion 'scope_stack_p > context_p->scope_stack_p' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_literal_is_created):2510. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'scope_stack_p > context_p->scope_stack_p' in scanner_literal_is_created
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3823/comments
0
2020-06-01T03:58:55Z
2020-06-03T13:28:14Z
https://github.com/jerryscript-project/jerryscript/issues/3823
628,134,730
3,823
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` function f ({array, 'a', { value: 'foo', enumerable: true } : 36}) {} ``` ###### Output ``` ICE: Assertion 'context_p->token.type == LEXER_RIGHT_BRACE || context_p->token.type == LEXER_ASSIGN || context_p->token.type == LEXER_COMMA' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_parse_object_initializer):3230. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->token.type == LEXER_RIGHT_BRACE || context_p->token.type == LEXER_ASSIGN || context_p->token.type == LEXER_COMMA' in parser_parse_object_initializer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3822/comments
0
2020-06-01T03:10:23Z
2020-06-03T13:28:14Z
https://github.com/jerryscript-project/jerryscript/issues/3822
628,120,323
3,822
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` function a") { ``` ###### Output ``` ICE: Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_function_statement):733. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION' in parser_parse_function_statement
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3821/comments
0
2020-06-01T03:00:22Z
2020-06-04T09:25:26Z
https://github.com/jerryscript-project/jerryscript/issues/3821
628,117,790
3,821
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` try { (isNaN(parseFloat("."))) = 'abcd'; } catch (e) { } ``` ###### Output ``` ICE: Assertion 'context_p->stack_depth == context_p->context_stack_depth' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_statements):2756. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->stack_depth == context_p->context_stack_depth' in parser_parse_statements
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3820/comments
0
2020-05-31T14:20:41Z
2020-06-03T13:29:27Z
https://github.com/jerryscript-project/jerryscript/issues/3820
627,972,924
3,820
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` typeof (global.v2) = 123; ``` ###### Output ``` ICE: Assertion 'context_p->stack_top_uint8 == LEXER_EXPRESSION_START' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_parse_expression):3565. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion 'context_p->stack_top_uint8 == LEXER_EXPRESSION_START' in parser_parse_expression
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3819/comments
0
2020-05-31T13:53:00Z
2020-06-03T13:29:27Z
https://github.com/jerryscript-project/jerryscript/issues/3819
627,968,037
3,819
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7 ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` (isNaN (Math['min'] (1.0, NaN))) = 123; ``` ###### Output ``` Assertion '(flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth' failed at /home/JerryScript/jerryscript/jerry-core/parser/js/js-parser-util.c(parser_flush_cbc):181. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` Credits: This vulnerability is detected by chong from OWL337.
Assertion '(flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth' in parser_flush_cbc
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3818/comments
0
2020-05-31T13:38:18Z
2020-05-31T14:15:09Z
https://github.com/jerryscript-project/jerryscript/issues/3818
627,965,519
3,818
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision d06c3a7f ###### Build platform Linux-4.15.0-88-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 --stack-limit=32 ``` ###### Test case ```javascript var replace = RegExp.prototype[Symbol.replace]; replace.call({ exec : ( ) => { return { } } }, '^o𓙦һ', "a"); ``` ###### Output ```text ICE: Assertion '(first_byte & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER' failed at jerryscript/jerry-core/lit/lit-strings.c(lit_get_unicode_char_size_by_utf8_first_byte):659. Error: ERR_FAILED_INTERNAL_ASSERTION ASAN:DEADLYSIGNAL ================================================================= ==15823==ERROR: AddressSanitizer: ABRT on unknown address 0x00003dcf (pc 0xf7f09079 bp 0xffbd5b9c sp 0xffbd5b80 T0) #0 0xf7f09078 (linux-gate.so.1+0x1078) #1 0xf7f09078 (linux-gate.so.1+0x1078) #2 0xf7730831 in raise (/lib/i386-linux-gnu/libc.so.6+0x2d831) #3 0xf7731cc0 in abort (/lib/i386-linux-gnu/libc.so.6+0x2ecc0) #4 0x565ae41f in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #5 0x56665c41 in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #6 0x56665c82 in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #7 0x5666911e in lit_get_unicode_char_size_by_utf8_first_byte jerryscript/jerry-core/lit/lit-strings.c:659 #8 0x5666911e in lit_utf8_string_length jerryscript/jerry-core/lit/lit-strings.c:299 #9 0x566e886a in ecma_stringbuilder_finalize jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2663 #10 0x5665e455 in ecma_regexp_replace_helper jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:3182 #11 0x565f1b9e in ecma_builtin_regexp_prototype_symbol_replace jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:647 #12 0x565effea in ecma_builtin_regexp_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h:58 #13 0x566a971a in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1195 #14 0x566a98f2 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1219 #15 0x566c6284 in ecma_op_function_call_simple.lto_priv.683 jerryscript/jerry-core/ecma/operations/ecma-function-object.c:827 #16 0x56681957 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1130 #17 0x56623b39 in ecma_builtin_function_prototype_object_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:191 #18 0x566246c8 in ecma_builtin_function_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:456 #19 0x566a971a in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1195 #20 0x566a98f2 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1219 #21 0x566c6284 in ecma_op_function_call_simple.lto_priv.683 jerryscript/jerry-core/ecma/operations/ecma-function-object.c:827 #22 0x56681957 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1130 #23 0x56647973 in opfunc_call.lto_priv.440 jerryscript/jerry-core/vm/vm.c:764 #24 0x56608ced in vm_execute jerryscript/jerry-core/vm/vm.c:4190 #25 0x56609265 in vm_run jerryscript/jerry-core/vm/vm.c:4292 #26 0x56645fad in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #27 0x566c81f6 in jerry_run jerryscript/jerry-core/api/jerry.c:595 #28 0x566c6e3a in main jerryscript/jerry-main/jerry-loop.c:30 #29 0xf771be80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #30 0x565a2540 (jerryscript/build_gcc_asan_es2015/bin/jerry-loop+0x19540) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0x1078) ==15823==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion (first_byte & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER in lit_get_unicode_char_size_by_utf8_first_byte
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3817/comments
0
2020-05-31T10:10:15Z
2020-06-02T14:15:24Z
https://github.com/jerryscript-project/jerryscript/issues/3817
627,932,632
3,817
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 3b4c2592 ###### Build platform Linux-4.15.0-88-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 --stack-limit=32 ``` ###### Test case ```javascript ($( )) = $ ``` ###### Output ```text ICE: Assertion '(flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth' failed at jerryscript/jerry-core/parser/js/js-parser-util.c(parser_flush_cbc):181. Error: ERR_FAILED_INTERNAL_ASSERTION ASAN:DEADLYSIGNAL ================================================================= ==24536==ERROR: AddressSanitizer: ABRT on unknown address 0x00005fd8 (pc 0xf7fa9079 bp 0xffe9224c sp 0xffe92230 T0) #0 0xf7fa9078 (linux-gate.so.1+0x1078) #1 0xf7fa9078 (linux-gate.so.1+0x1078) #2 0xf77d0831 in raise (/lib/i386-linux-gnu/libc.so.6+0x2d831) #3 0xf77d1cc0 in abort (/lib/i386-linux-gnu/libc.so.6+0x2ecc0) #4 0x565f736b in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #5 0x566aeb8d in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #6 0x566aebce in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #7 0x565eb716 in parser_flush_cbc jerryscript/jerry-core/parser/js/js-parser-util.c:180 #8 0x56616295 in parser_parse_block_expression jerryscript/jerry-core/parser/js/js-parser-expr.c:3431 #9 0x5662ad91 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:3154 #10 0x566bdd2f in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2177 #11 0x566c1b17 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2808 #12 0x5671570e in jerry_parse jerryscript/jerry-core/api/jerry.c:447 #13 0x5671233e in main jerryscript/jerry-main/main-unix.c:750 #14 0xf77bbe80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #15 0x565ea1e0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x1a1e0) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0x1078) ==24536==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator).</sup>
Assertion (flags >> CBC_STACK_ADJUST_SHIFT) >= CBC_STACK_ADJUST_BASE || (CBC_STACK_ADJUST_BASE - (flags >> CBC_STACK_ADJUST_SHIFT)) <= context_p->stack_depth in parser_flush_cbc
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3815/comments
0
2020-05-29T20:18:47Z
2020-06-03T13:29:27Z
https://github.com/jerryscript-project/jerryscript/issues/3815
627,515,602
3,815
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 3b4c2592817dd1484b2291565d47288b48b51bf8 ###### Build platform Ubuntu 18.04.4 LTS (Linux 4.15.0-91-generic x86_64) ###### Build steps - for the first output: ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` - for the second output: ``` ./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 \ --stack-limit=15 ``` ###### Test case ```javascript function main() { var v4 = [1337,1337,1337]; var v5 = [1018825975,1018825975,Number]; var v6 = {constructor:"symbol",toString:"symbol",__proto__:v4,b:v5,e:1018825975}; var v8 = v6.toStringTag; function v9(v10,v11) { var v16 = [1337,1337,1337]; var v17 = [1018825975,1018825975,Number]; var v18 = {constructor:"symbol",toString:"symbol",__proto__:v16,b:v17,e:1018825975}; var v20 = v18.toStringTag; function v21(v22,v23) { var v25 = [1337,1337]; var v26 = v25[-1951730718]; var v28 = {isExtensible:v26,__proto__:this}; var v30 = new Proxy(Function,v28); return v30; } var v31 = {getPrototypeOf:v21,getOwnPropertyDescriptor:v21,isExtensible:v21,length:v20,set:v20,setPrototypeOf:v21,deleteProperty:v20,defineProperty:v21,get:v20,ownKeys:v21,construct:v20}; var v33 = new Proxy(Function,v31); var v34 = v33 instanceof v33; var v35 = v9(); } var v36 = {getPrototypeOf:v9,getOwnPropertyDescriptor:v9,isExtensible:v9,length:v8,set:v8,setPrototypeOf:v9,deleteProperty:v8,defineProperty:v9,get:v8,ownKeys:v9,construct:v8}; var v38 = new Proxy(print,v36); var v39 = v38 instanceof v38; function v40(v41,v42,v43,v44) { } } main(); ``` ###### Execution steps ``` $ /tmp/jerryscript3/build/bin/jerry /tmp/crashes/03.js ================================================================= ==9137==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55b2dd9ed058 at pc 0x55b2dd9678ef bp 0x7fff96087f10 sp 0x7fff96087f00 READ of size 2 at 0x55b2dd9ed058 thread T0 #0 0x55b2dd9678ee in ecma_builtin_try_to_instantiate_property /tmp/jerryscript3/jerry-core/ecma/builtin-objects/ecma-builtins.c:800 #1 0x55b2dd9797dc in ecma_op_object_find_own /tmp/jerryscript3/jerry-core/ecma/operations/ecma-objects.c:608 #2 0x55b2dd979ae9 in ecma_op_object_get_with_receiver /tmp/jerryscript3/jerry-core/ecma/operations/ecma-objects.c:844 #3 0x55b2dd979b7b in ecma_op_object_get /tmp/jerryscript3/jerry-core/ecma/operations/ecma-objects.c:813 #4 0x55b2dd979b7b in ecma_op_get_method /tmp/jerryscript3/jerry-core/ecma/operations/ecma-objects.c:993 #5 0x55b2dd97e8df in ecma_proxy_object_get_prototype_of /tmp/jerryscript3/jerry-core/ecma/operations/ecma-proxy-object.c:303 #6 0x55b2dd973d28 in ecma_op_function_has_instance /tmp/jerryscript3/jerry-core/ecma/operations/ecma-function-object.c:677 ... SUMMARY: AddressSanitizer: global-buffer-overflow /tmp/jerryscript3/jerry-core/ecma/builtin-objects/ecma-builtins.c:800 in ecma_builtin_try_to_instantiate_property ``` ``` $ build/bin/jerry /tmp/crashes/03.js ICE: Assertion 'ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION || ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION' failed at /tmp/jerryscript2/jerry-core/ecma/operations/ecma-function-object.c(ecma_op_function_has_instance):643. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ```
ICE: Assertion 'ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION || ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION' failed at jerry-core/ecma/operations/ecma-function-object.c(ecma_op_function_has_instance):643.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3814/comments
1
2020-05-29T19:06:48Z
2020-06-02T14:16:22Z
https://github.com/jerryscript-project/jerryscript/issues/3814
627,476,946
3,814
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 3b4c2592817dd1484b2291565d47288b48b51bf8 ###### Build platform Ubuntu 18.04.4 LTS (Linux 4.15.0-91-generic x86_64) ###### 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 \ --stack-limit=15 ``` ###### Test case ```javascript function main() { var v2 = "jye5rkxQrX".__proto__; v2.toString = Symbol; var v6 = JSON.stringify(2147483647,constructor); } main(); ``` ###### Execution steps ```sh $ /tmp/jerryscript/build/bin/jerry 01.js ICE: Assertion 'ecma_string_p != NULL' failed at /tmp/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_make_string_value):593. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ```
ICE: Assertion 'ecma_string_p != NULL' failed at jerry-core/ecma/base/ecma-helpers-value.c(ecma_make_string_value):593
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3813/comments
0
2020-05-29T19:01:53Z
2020-05-30T17:46:56Z
https://github.com/jerryscript-project/jerryscript/issues/3813
627,474,657
3,813
[ "jerryscript-project", "jerryscript" ]
#### JerryScript revision 3b4c2592 #### Build platform Linux-5.3.0-42-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 ```js $={[$$`𞹴` ``` #### Backtrace ```text #4 0x56686cf6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-port/default/default-fatal.c:30 #5 0x565dda51 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript//jerry-core/jrt/jrt-fatals.c:63 #6 jerry_assert_fail (assertion=0x566cd6a0 "destination_p == destination_start_p + literal_p->length", file=0x566cce40 "jerryscript//jerry-core/parser/js/js-lexer.c", function=0x566ce6a0 <__func__.6675> "lexer_convert_literal_to_chars", line=2327) at jerryscript//jerry-core/jrt/jrt-fatals.c:87 #7 0x56654a33 in lexer_convert_literal_to_chars (context_p=<optimized out>, literal_p=<optimized out>, local_byte_array_p=<optimized out>, opts=<optimized out>) at jerryscript//jerry-core/parser/js/js-lexer.c:2327 #8 0x5667bf73 in parser_tagged_template_literal_append_strings (context_p=<optimized out>, template_obj_p=<optimized out>, raw_strings_p=<optimized out>, prop_idx=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-tagged-template-literal.c:74 #9 0x5665d972 in parser_parse_tagged_template_literal (context_p=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-expr.c:1514 #10 parser_process_unary_expression (grouping_level=0, context_p=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-expr.c:2146 #11 parser_parse_expression (context_p=<optimized out>, options=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3486 #12 0x566583f0 in lexer_expect_object_literal_id (context_p=0xffffc680, ident_opts=1) at jerryscript//jerry-core/parser/js/js-lexer.c:3042 #13 0x5665f8ed in parser_parse_object_literal (context_p=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-expr.c:930 #14 parser_parse_unary_expression (grouping_level_p=<optimized out>, context_p=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-expr.c:1829 #15 parser_parse_expression (context_p=<optimized out>, options=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3477 #16 0x56666514 in parser_parse_block_expression (context_p=0xffffc680, options=0) at jerryscript//jerry-core/parser/js/js-parser-expr.c:3425 #17 0x5667665c in parser_parse_statements (context_p=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser-statm.c:3154 #18 0x565eb68b in parser_parse_source (arg_list_p=arg_list_p@entry=0x0, arg_list_size=arg_list_size@entry=0, source_p=source_p@entry=0x5670c600 <buffer> "varo={[void[]^this`\\`\\`𞹴`()]:this!==function(){}^[,]+[,]++};Array.prototype.pop.call(o);", source_size=<optimized out>, parse_opts=<optimized out>, error_location_p=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser.c:2177 #19 0x565eccf6 in parser_parse_script (arg_list_p=<optimized out>, arg_list_size=<optimized out>, source_p=<optimized out>, source_size=<optimized out>, parse_opts=<optimized out>, bytecode_data_p=<optimized out>) at jerryscript//jerry-core/parser/js/js-parser.c:2808 #20 0x56577f9d in jerry_parse (resource_name_p=<optimized out>, resource_name_length=<optimized out>, source_p=<optimized out>, source_size=<optimized out>, parse_opts=<optimized out>) at jerryscript//jerry-core/api/jerry.c:447 #21 0x56570abf in main (argc=<optimized out>, argv=<optimized out>) at jerryscript//jerry-main/main-unix.c:750 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion destination_p == destination_start_p + literal_p->length in lexer_convert_literal_to_chars
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3812/comments
0
2020-05-29T13:44:17Z
2020-06-08T09:00:35Z
https://github.com/jerryscript-project/jerryscript/issues/3812
627,279,048
3,812
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 7a20150ae747742c178e7d61bb4b3c71476925e2 ###### Build platform Ubuntu 18.04.4 LTS (Linux 4.15.0-91-generic x86_64) and ProductName: Mac OS X ProductVersion: 10.15.4 BuildVersion: 19E287 ###### Build steps ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ``` python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case - to reproduce the bug for this PoC, keep the same filename length and run the interpreter providing the basename only, as in the Execution steps below. - filename: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js' ```javascript function main() { var v2 = [1337]; var v3 = [13.37,v2]; var v7 = 0; while (v7 < 6) { var v10 = [13.37,13.37,"object"]; var v14 = [13.37]; var v16 = [v14,v10]; var v17 = {e:1337,__proto__:v16,valueOf:-9007199254740991,toString:WeakSet}; var v19 = [Int8Array,v17]; var v21 = new Map(v19); var v22 = v3.unshift(0); } } main(); ``` ###### Execution steps ```sh ~/jerryscript-test/build/bin/jerry xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js ASAN:DEADLYSIGNAL ================================================================= ==15897==ERROR: AddressSanitizer: SEGV on unknown address 0x55e63e629888 (pc 0x55e6393d7f9d bp 0x000004e7ffe3 sp 0x7fff9494ba70 T0) ==15897==The signal is caused by a READ memory access. #0 0x55e6393d7f9c in ecma_gc_set_object_visited /home/jerryscript-test/jerry-core/ecma/base/ecma-gc.c:85 #1 0x55e6393d7707 in ecma_gc_mark_map_object /home/jerryscript-test/jerry-core/ecma/base/ecma-gc.c:330 #2 0x55e6393d7707 in ecma_gc_mark /home/jerryscript-test/jerry-core/ecma/base/ecma-gc.c:594 #3 0x55e6393d88a4 in ecma_gc_run /home/jerryscript-test/jerry-core/ecma/base/ecma-gc.c:1395 #4 0x55e6393d15bd in jmem_heap_realloc_block /home/jerryscript-test/jerry-core/jmem/jmem-heap.c:539 #5 0x55e6393d9da4 in ecma_collection_push_back /home/jerryscript-test/jerry-core/ecma/base/ecma-helpers-collection.c:140 #6 0x55e6393f13ee in ecma_op_internal_buffer_append /home/jerryscript-test/jerry-core/ecma/operations/ecma-container-object.c:71 #7 0x55e6393f13ee in ecma_op_container_set /home/jerryscript-test/jerry-core/ecma/operations/ecma-container-object.c:790 #8 0x55e6393ea3cf in ecma_builtin_dispatch_routine /home/jerryscript-test/jerry-core/ecma/builtin-objects/ecma-builtins.c:1115 #9 0x55e6393ea3cf in ecma_builtin_dispatch_call /home/jerryscript-test/jerry-core/ecma/builtin-objects/ecma-builtins.c:1139 #10 0x55e6393f6491 in ecma_op_function_call /home/jerryscript-test/jerry-core/ecma/operations/ecma-function-object.c:1085 #11 0x55e6393f0ec4 in ecma_op_container_create /home/jerryscript-test/jerry-core/ecma/operations/ecma-container-object.c:516 #12 0x55e6393ea525 in ecma_builtin_dispatch_construct /home/jerryscript-test/jerry-core/ecma/builtin-objects/ecma-builtins.c:1180 #13 0x55e63942fb2e in opfunc_construct /home/jerryscript-test/jerry-core/vm/vm.c:849 #14 0x55e63942fb2e in vm_execute /home/jerryscript-test/jerry-core/vm/vm.c:4151 #15 0x55e63942ff2c in vm_run /home/jerryscript-test/jerry-core/vm/vm.c:4232 #16 0x55e6393f4ffd in ecma_op_function_call_simple /home/jerryscript-test/jerry-core/ecma/operations/ecma-function-object.c:886 #17 0x55e6393f6491 in ecma_op_function_call /home/jerryscript-test/jerry-core/ecma/operations/ecma-function-object.c:1085 #18 0x55e63942ee5b in opfunc_call /home/jerryscript-test/jerry-core/vm/vm.c:764 #19 0x55e63942ee5b in vm_execute /home/jerryscript-test/jerry-core/vm/vm.c:4130 #20 0x55e63942ff2c in vm_run /home/jerryscript-test/jerry-core/vm/vm.c:4232 #21 0x55e6393d3b9d in jerry_run /home/jerryscript-test/jerry-core/api/jerry.c:595 #22 0x55e6393cf64d in main /home/jerryscript-test/jerry-main/main-unix.c:759 #23 0x7fa01742eb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #24 0x55e6393d1969 in _start (/home/jerryscript-test/build/bin/jerry+0x1a969) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/jerryscript-test/jerry-core/ecma/base/ecma-gc.c:85 in ecma_gc_set_object_visited ==15897==ABORTING ``` ``` ~/jerryscript-asan-debug/build/bin/jerry xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js ICE: Assertion '((jmem_cpointer_t) uint_ptr) == uint_ptr' failed at /home/jerryscript-asan-debug/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):219. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` ###### Backtrace ``` $ gdb -nx -q ~/jerryscript-test/build/bin/jerry -ex 'r xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js' Reading symbols from /home/jerryscript-test/build/bin/jerry...done. Starting program: /home/jerryscript-test/build/bin/jerry xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000555555574f9d in ecma_gc_set_object_visited (object_p=0x55555a7c6888) at /home/jerryscript-test/jerry-core/ecma/base/ecma-gc.c:85 85 if (object_p->type_flags_refs >= ECMA_OBJECT_NON_VISITED) (gdb) x/i $rip => 0x555555574f9d <ecma_gc_set_object_visited+35>: mov (%rdi),%ax (gdb) x/g $rdi 0x55555a7c6888: Cannot access memory at address 0x55555a7c6888 ```
Memory corruption in ecma_gc_set_object_visited (jerry-core/ecma/base/ecma-gc.c:85)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3804/comments
0
2020-05-27T18:29:22Z
2020-05-28T05:55:17Z
https://github.com/jerryscript-project/jerryscript/issues/3804
625,930,295
3,804
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision https://github.com/jerryscript-project/jerryscript/commit/6cd309b5252d15f3e3e6481c72a4d8fa7f9557a9 ###### Build platform Ubuntu 20.04 LTS (Linux 5.4.0-31-generic x86_64) ###### Build steps ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` function main() { var v2 = [13.37,13.37]; var v4 = [1337,1337,1337]; var v5 = [parseFloat,parseFloat,v2]; var v8 = new Float64Array(63797); var v10 = "d".constructor; var v12 = [1337,1337,1337,1337]; var v13 = []; var v14 = {constructor:v12,a:v13}; var v15 = v14.a; var v18 = 0; v15.toString = v10; var v20 = new Int16Array(); do { var v25 = String.fromCharCode(1337,128); try { var v26 = eval(v25); } catch(v27) { } var v28 = v18 + 1; v18 = v28; v13[v28] = v20; } while (v18 < 1337); } main(); ``` ###### Output ``` $ build/bin/jerry test.js ICE: Assertion 'context_p->error == PARSER_ERR_NO_ERROR' failed at /tmp/jerryscript/jerry-core/parser/js/js-scanner.c(scanner_scan_all):3196. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ```
Assertion 'context_p->error == PARSER_ERR_NO_ERROR' failed at jerry-core/parser/js/js-scanner.c(scanner_scan_all):3196
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3788/comments
0
2020-05-23T17:56:43Z
2020-05-27T12:40:44Z
https://github.com/jerryscript-project/jerryscript/issues/3788
623,710,199
3,788
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision https://github.com/jerryscript-project/jerryscript/commit/6cd309b5252d15f3e3e6481c72a4d8fa7f9557a9 ###### Build platform Ubuntu 20.04 LTS (Linux 5.4.0-31-generic x86_64) ###### Build steps ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` function main() { var v4 = [13.37,13.37,1337,13.37,13.37]; var v5 = new Proxy(JSON,v4); var v7 = Object.freeze(v5); var v8 = JSON / 13.37; var v9 = JSON.stringify(v7); } main(); ``` ###### Output ``` $ build/bin/jerry test.js ICE: Assertion 'ecma_is_value_string (value)' failed at /tmp/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_string_from_value):742. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ```
Assertion 'ecma_is_value_string (value)' failed at jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_string_from_value):742
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3787/comments
0
2020-05-23T17:53:33Z
2020-05-26T13:22:51Z
https://github.com/jerryscript-project/jerryscript/issues/3787
623,709,607
3,787
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision https://github.com/jerryscript-project/jerryscript/commit/6cd309b5252d15f3e3e6481c72a4d8fa7f9557a9 ###### Build platform Ubuntu 20.04 LTS (Linux 5.4.0-31-generic x86_64) ###### Build steps ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address --stack-limit=15 ``` ###### Test case ``` function main() { var v2 = new Float64Array(63797); var v4 = "d".constructor; var v6 = [1337,1337,1337,1337]; var v7 = []; var v8 = {constructor:v6,a:v7}; var v9 = v8.a; var v12 = 0; v9.toString = v4; var v14 = new Int16Array(); do { function v16(v17,v18,v19) { 'use strict' var v20 = Int16Array.toLocaleString(); var v22 = eval(v20); } var v24 = new Promise(v16); var v25 = v12 + 1; v12 = v25; v7[v25] = v14; } while (v12 < 1337); } main(); ``` ###### Output ``` $ build/bin/jerry test.js AddressSanitizer:DEADLYSIGNAL ================================================================= ==434582==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x55af4dd3f2b0 bp 0x7ffc7e016ab0 sp 0x7ffc7e016a80 T0) ==434582==The signal is caused by a READ memory access. ==434582==Hint: address points to the zero page. #0 0x55af4dd3f2af in scanner_reverse_info_list /tmp/jerryscript/jerry-core/parser/js/js-scanner-util.c:1557 #1 0x55af4dd5150a in scanner_scan_all /tmp/jerryscript/jerry-core/parser/js/js-scanner.c:3217 #2 0x55af4dd34f5e in parser_parse_source /tmp/jerryscript/jerry-core/parser/js/js-parser.c:2084 #3 0x55af4dd38d76 in parser_parse_script /tmp/jerryscript/jerry-core/parser/js/js-parser.c:2697 .. AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /tmp/jerryscript/jerry-core/parser/js/js-scanner-util.c:1557 in scanner_reverse_info_list ==434582==ABORTING ``` ``` $ gdb -q -nx build/bin/jerry -ex 'r test.js' Program received signal SIGSEGV, Segmentation fault. 0x00005555556422b0 in scanner_reverse_info_list (context_p=0x7fffffffca20) at /tmp/jerryscript/jerry-core/parser/js/js-scanner-util.c:1557 1557 if (scanner_info_p->type == SCANNER_TYPE_END) (gdb) x/i $rip => 0x5555556422b0 <scanner_reverse_info_list+133>: movzbl 0x10(%rax),%eax (gdb) i r rax rax 0x0 0 ```
NULL dereference in scanner_reverse_info_list
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3786/comments
0
2020-05-23T17:46:47Z
2020-05-27T12:40:44Z
https://github.com/jerryscript-project/jerryscript/issues/3786
623,708,437
3,786
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision https://github.com/jerryscript-project/jerryscript/commit/6cd309b5252d15f3e3e6481c72a4d8fa7f9557a9 ###### Build platform Ubuntu 20.04 LTS (Linux 5.4.0-31-generic x86_64) ###### Build steps ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g \ --error-messages=on --debug --compile-flag=-g --strip=off --logging=on \ --compile-flag=-fsanitize=address ``` ###### Test cases ``` var v2 = {}; var v4 = new Proxy(Uint8Array,v2); v4.__proto__ = v4; v4[1] = 2; ``` ``` var v1 = {}; var v3 = new Proxy(parseFloat,v1); v3.__proto__ = v3; var v6 = "aa".constructor; var v7 = parseFloat & v6; ```
Stack Exhaustion (ecma_proxy_object_get, ecma_proxy_object_set)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3785/comments
3
2020-05-23T08:58:58Z
2020-05-26T07:44:39Z
https://github.com/jerryscript-project/jerryscript/issues/3785
623,613,918
3,785
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision https://github.com/jerryscript-project/jerryscript/commit/6cd309b5252d15f3e3e6481c72a4d8fa7f9557a9 ###### Build platform Ubuntu 20.04 LTS (Linux 5.4.0-31-generic x86_64) ###### Build steps ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g --error-messages=on --debug --compile-flag=-g --strip=off --logging=on --compile-flag=-fsanitize=address ``` ###### Test case ``` var v1 = typeof 13.37; var v3 = Object(v1); var v5 = [13.37,13.37]; var v6 = [v5]; v3.__proto__ = v6; for (var v7 in v3) {} ``` ###### Output ``` $ ICE: Assertion 'array_index_name_pos < array_index_named_properties_count' failed at /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c(ecma_op_object_get_property_names):2410. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` ###### Backtrace ``` (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff73a0859 in __GI_abort () at abort.c:79 #2 0x00005555556e7435 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /home/jerryscript/jerry-port/default/default-fatal.c:30 #3 0x00005555556297e5 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /home/jerryscript/jerry-core/jrt/jrt-fatals.c:63 #4 0x0000555555629840 in jerry_assert_fail (assertion=0x555555710da0 "array_index_name_pos < array_index_named_properties_count", file=0x555555710240 "/home/jerryscript/jerry-core/ecma/operations/ecma-objects.c", function=0x555555711800 <__func__.7446> "ecma_op_object_get_property_names", line=2410) at /home/jerryscript/jerry-core/jrt/jrt-fatals.c:87 #5 0x000055555560f2bb in ecma_op_object_get_property_names (obj_p=0x5555558a4e28 <jerry_global_heap+392>, opts=6) at /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:2410 #6 0x00005555556e2307 in opfunc_for_in (left_value=395, result_obj_p=0x7fffffffd8e0) at /home/jerryscript/jerry-core/vm/opcodes.c:295 #7 0x000055555566d30f in vm_loop (frame_ctx_p=0x7fffffffda00) at /home/jerryscript/jerry-core/vm/vm.c:3341 #8 0x0000555555671b2b in vm_execute (frame_ctx_p=0x7fffffffda00) at /home/jerryscript/jerry-core/vm/vm.c:4124 #9 0x00005555556721b0 in vm_run (bytecode_header_p=0x5555558a5018 <jerry_global_heap+888>, this_binding_value=27, lex_env_p=0x5555558a4cd0 <jerry_global_heap+48>, arg_list_p=0x0, arg_list_len=0) at /home/jerryscript/jerry-core/vm/vm.c:4232 #10 0x000055555565ec40 in vm_run_global (bytecode_p=0x5555558a5018 <jerry_global_heap+888>) at /home/jerryscript/jerry-core/vm/vm.c:321 #11 0x00005555555ac1d1 in jerry_run (func_val=291) at /home/jerryscript/jerry-core/api/jerry.c:596 #12 0x00005555555a8c98 in main (argc=2, argv=0x7fffffffe118) at /home/jerryscript/jerry-main/main-unix.c:759 ```
Assertion 'array_index_name_pos < array_index_named_properties_count'
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3784/comments
0
2020-05-22T19:57:50Z
2020-05-25T17:09:13Z
https://github.com/jerryscript-project/jerryscript/issues/3784
623,449,113
3,784
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision https://github.com/jerryscript-project/jerryscript/commit/6cd309b5252d15f3e3e6481c72a4d8fa7f9557a9 ###### Build platform Ubuntu 20.04 LTS (Linux 5.4.0-31-generic x86_64) ###### Build steps ```sh python tools/build.py --profile=es2015-subset --lto=off --compile-flag=-g --error-messages=on --debug --compile-flag=-g --strip=off --logging=on --compile-flag=-fsanitize=address ``` ###### Test case ``` var v2 = Symbol.iterator; var v3 = "description"[v2]; var v7 = {get:v3}; var v9 = Object.defineProperty(Object,"toString",v7); var v11 = [-486477.70497889485,Object,-486477.70497889485,"undefined"]; var v13 = Function(v11); ``` ###### Output ``` $ build/bin/jerry /tmp/test.js AddressSanitizer:DEADLYSIGNAL ================================================================= ==213194==ERROR: AddressSanitizer: stack-overflow on address 0x7ffe69638ff8 (pc 0x56290e120f02 bp 0x7ffe69639020 sp 0x7ffe69639000 T0) #0 0x56290e120f01 in ecma_pointer_to_ecma_value /home/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:95 #1 0x56290e120f01 in ecma_make_object_value /home/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:663 #2 0x56290e15a198 in ecma_op_general_object_default_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:236 [ .. snip .. ] #267 0x56290e15a3e9 in ecma_op_general_object_ordinary_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:311 #268 0x56290e15a31d in ecma_op_general_object_default_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:289 ```
Stack Exhaustion (ecma_pointer_to_ecma_value)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3783/comments
4
2020-05-22T19:51:42Z
2020-05-23T18:07:30Z
https://github.com/jerryscript-project/jerryscript/issues/3783
623,446,994
3,783
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 876622a0 ###### Build platform Linux-4.15.0-88-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 a = [$]; var $ = a.lastIndexOf($, { valueOf: function() { a.length = 0 } }) ``` ###### Output ```text ICE: Assertion 'compressed_pointer != JMEM_CP_NULL' failed at jerryscript/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):215. Error: ERR_FAILED_INTERNAL_ASSERTION ASAN:DEADLYSIGNAL ================================================================= ==6827==ERROR: AddressSanitizer: ABRT on unknown address 0x00001aab (pc 0xf7fb3079 bp 0xff9cc0bc sp 0xff9cc0a0 T0) #0 0xf7fb3078 (linux-gate.so.1+0x1078) #1 0xf7fb3078 (linux-gate.so.1+0x1078) #2 0xf77da831 in raise (/lib/i386-linux-gnu/libc.so.6+0x2d831) #3 0xf77dbcc0 in abort (/lib/i386-linux-gnu/libc.so.6+0x2ecc0) #4 0x56603444 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #5 0x566bab09 in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #6 0x566bab4a in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #7 0x566b9be9 in jmem_decompress_pointer jerryscript/jerry-core/jmem/jmem-allocator.c:215 #8 0x5666dd30 in ecma_builtin_array_prototype_object_last_index_of jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:1782 #9 0x56670e86 in ecma_builtin_array_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2721 #10 0x566fcac4 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #11 0x566fcc9c in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #12 0x566d5732 in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #13 0x566d6602 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #14 0x5669cc95 in opfunc_call.lto_priv.465 jerryscript/jerry-core/vm/vm.c:764 #15 0x5665d449 in vm_execute jerryscript/jerry-core/vm/vm.c:4130 #16 0x5665d9c1 in vm_run jerryscript/jerry-core/vm/vm.c:4232 #17 0x5669b2e1 in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #18 0x5671ee1a in jerry_run jerryscript/jerry-core/api/jerry.c:596 #19 0x5671b404 in main jerryscript/jerry-main/main-unix.c:759 #20 0xf77c5e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #21 0x565f6300 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x1a300) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0x1078) ==6827==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion compressed_pointer != JMEM_CP_NULL in jmem_decompress_pointer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3779/comments
0
2020-05-22T14:00:43Z
2020-05-25T14:36:55Z
https://github.com/jerryscript-project/jerryscript/issues/3779
623,231,917
3,779
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 876622a0 ###### Build platform Linux-4.15.0-88-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 try { parseFloat(-0.00001)} catch ($) { } ``` ###### Output ```text ================================================================= ==6834==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5400294 at pc 0xf7a702e0 bp 0xffdf9fa8 sp 0xffdf9b78 READ of size 8 at 0xf5400294 thread T0 #0 0xf7a702df (/usr/lib32/libasan.so.4+0xb42df) #1 0x56735530 in ecma_number_parse_float jerryscript/jerry-core/ecma/base/ecma-helpers-number.c:945 #2 0x5663a6dd in ecma_builtin_intrinsic_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c:127 #3 0x566feac4 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #4 0x566fec9c in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #5 0x566d7732 in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #6 0x566d8602 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #7 0x5669ec95 in opfunc_call.lto_priv.465 jerryscript/jerry-core/vm/vm.c:764 #8 0x5665f449 in vm_execute jerryscript/jerry-core/vm/vm.c:4130 #9 0x5665f9c1 in vm_run jerryscript/jerry-core/vm/vm.c:4232 #10 0x5669d2e1 in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #11 0x56720e1a in jerry_run jerryscript/jerry-core/api/jerry.c:596 #12 0x5671d404 in main jerryscript/jerry-main/main-unix.c:759 #13 0xf77dbe80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #14 0x565f8300 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x1a300) 0xf5400294 is located 0 bytes to the right of 20-byte region [0xf5400280,0xf5400294) allocated by thread T0 here: #0 0xf7aa1f54 in malloc (/usr/lib32/libasan.so.4+0xe5f54) #1 0x566bbdf0 in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x566bbece in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x566bbf60 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:323 #4 0x5665fb30 in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x56738417 in ecma_new_ecma_string_from_utf8_buffer jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:258 #6 0x56738417 in ecma_new_ecma_string_from_number jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:568 #7 0x56715239 in ecma_op_to_string jerryscript/jerry-core/ecma/operations/ecma-conversion.c:449 #8 0x5663a595 in ecma_builtin_intrinsic_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c:109 #9 0x566feac4 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #10 0x566fec9c in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #11 0x566d7732 in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #12 0x566d8602 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #13 0x5669ec95 in opfunc_call.lto_priv.465 jerryscript/jerry-core/vm/vm.c:764 #14 0x5665f449 in vm_execute jerryscript/jerry-core/vm/vm.c:4130 #15 0x5665f9c1 in vm_run jerryscript/jerry-core/vm/vm.c:4232 #16 0x5669d2e1 in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #17 0x56720e1a in jerry_run jerryscript/jerry-core/api/jerry.c:596 #18 0x5671d404 in main jerryscript/jerry-main/main-unix.c:759 #19 0xf77dbe80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.4+0xb42df) Shadow bytes around the buggy address: 0x3ea80000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea80010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea80020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea80030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea80040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ea80050: 00 00[04]fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ea80060: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ea80070: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x3ea80080: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ea80090: fa fa 00 00 00 06 fa fa fd fd fd fa fa fa 00 00 0x3ea800a0: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 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 ==6834==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-buffer-overflow in ecma_number_parse_float
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3778/comments
0
2020-05-22T13:57:12Z
2020-05-25T11:05:18Z
https://github.com/jerryscript-project/jerryscript/issues/3778
623,228,046
3,778
[ "jerryscript-project", "jerryscript" ]
Although `Error#stack` is a non-standard property, it would be nice to follow other implementations and return a `String` instead of `Array`. ```javascript var err = new Error("Er") print(typeof err.stack, Array.isArray(err.stack)) // node returns: string false // jerry returns: object true ``` Just message + stack joined with newline would be enough as all stack using libraries does expect different format on different environments. > Linux > commit bbb5c918 > python tools/build.py --line-info=ON
new Error().stack is an Array
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3767/comments
0
2020-05-20T10:53:39Z
2020-05-20T12:09:34Z
https://github.com/jerryscript-project/jerryscript/issues/3767
621,664,997
3,767
[ "jerryscript-project", "jerryscript" ]
When I ran the following testcase, jerry showed different results from the other engines. ###### Test case ```javascript var a = new Uint8Array(undefined); ``` ###### JerryScript revision bd1c4df (committed 3 days ago) ###### Build Platform Ubuntu 16.04 (Linux 3.10.0-957.12.1.el7.x86_64 x86_64) ###### Execution steps >build/bin/jerry testcase.js ###### Jerry Output >Script Error: TypeError: length argument is undefined ###### Other Engines Output >No exception is thrown I know jerryscript does not support all es6 standards, so I want to know if this is an unimplemented feature or a bug? Looking forward your reply, thanks!
JerryScript's execution result is inconsistent with other engines about 'new Uint8Array()'.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3763/comments
2
2020-05-19T07:16:25Z
2020-05-20T01:32:57Z
https://github.com/jerryscript-project/jerryscript/issues/3763
620,738,155
3,763
[ "jerryscript-project", "jerryscript" ]
``` console.log(Buffer.from("")) ``` ``` TypeError: length argument is undefined # 0: buffer.js:38 # 1: buffer.js:302 # 2: buffer.js:177 ```
Buffer.from("") fails
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3762/comments
1
2020-05-18T16:45:17Z
2020-05-18T19:04:57Z
https://github.com/jerryscript-project/jerryscript/issues/3762
620,355,704
3,762
[ "jerryscript-project", "jerryscript" ]
``` console.log(parseFloat("IE"), parseFloat("Infinity")) // jerry returns: Infinity Infinity // node returns: NaN Infinity ``` setup > "Arch Linux" (Linux 5.5.9-arch1-2 x86_64) > commit: 95aa82763501d0bf1592d121fc0e8af5066ee726 > build command: python tools/build.py
parseFloat("IE") returns Infinity
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3761/comments
0
2020-05-18T16:37:46Z
2020-05-21T12:51:00Z
https://github.com/jerryscript-project/jerryscript/issues/3761
620,351,188
3,761
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision e01cfda0 ###### Build platform Linux-4.15.0-88-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 split = RegExp.prototype[Symbol.split]; split.call({[Symbol.match]: "g"}) ``` ###### Output ```text ================================================================= ==45542==ERROR: AddressSanitizer: heap-use-after-free on address 0xf5302230 at pc 0x56799ad5 bp 0xffe5d388 sp 0xffe5d378 READ of size 4 at 0xf5302230 thread T0 #0 0x56799ad4 in ecma_deref_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:806 #1 0x5671159e in ecma_regexp_split_helper jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1815 #2 0x566a8afc in ecma_builtin_regexp_prototype_symbol_split jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:680 #3 0x566a6fd5 in ecma_builtin_regexp_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h:60 #4 0x5675e5bb in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #5 0x5675e793 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #6 0x5673723a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #7 0x5673810a in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #8 0x566da602 in ecma_builtin_function_prototype_object_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:191 #9 0x566db00d in ecma_builtin_function_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:414 #10 0x5675e5bb in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #11 0x5675e793 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #12 0x5673723a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #13 0x5673810a in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #14 0x566fe79d in opfunc_call.lto_priv.462 jerryscript/jerry-core/vm/vm.c:764 #15 0x566bf814 in vm_execute jerryscript/jerry-core/vm/vm.c:4130 #16 0x566bfd8c in vm_run jerryscript/jerry-core/vm/vm.c:4232 #17 0x566fcde9 in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #18 0x56780911 in jerry_run jerryscript/jerry-core/api/jerry.c:596 #19 0x5677cefb in main jerryscript/jerry-main/main-unix.c:759 #20 0xf7712e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #21 0x56658290 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x1a290) 0xf5302230 is located 0 bytes inside of 22-byte region [0xf5302230,0xf5302246) freed by thread T0 here: #0 0xf79d8b94 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b94) #1 0x5671bc40 in jmem_heap_free_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:476 #2 0x5671bfeb in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:685 #3 0x566bff1e in ecma_dealloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:208 #4 0x56799dbc in ecma_destroy_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:844 #5 0x56799b60 in ecma_deref_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:816 #6 0x567a425b in ecma_free_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1063 #7 0x566a8f23 in ecma_builtin_regexp_dispatch_helper jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:186 #8 0x566a8f9d in ecma_builtin_regexp_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:223 #9 0x5675eafa in ecma_builtin_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1160 #10 0x56738591 in ecma_op_function_construct jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1229 #11 0x56711587 in ecma_regexp_split_helper jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1813 #12 0x566a8afc in ecma_builtin_regexp_prototype_symbol_split jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:680 #13 0x566a6fd5 in ecma_builtin_regexp_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h:60 #14 0x5675e5bb in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #15 0x5675e793 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #16 0x5673723a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #17 0x5673810a in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #18 0x566da602 in ecma_builtin_function_prototype_object_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:191 #19 0x566db00d in ecma_builtin_function_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:414 #20 0x5675e5bb in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #21 0x5675e793 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #22 0x5673723a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #23 0x5673810a in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #24 0x566fe79d in opfunc_call.lto_priv.462 jerryscript/jerry-core/vm/vm.c:764 #25 0x566bf814 in vm_execute jerryscript/jerry-core/vm/vm.c:4130 #26 0x566bfd8c in vm_run jerryscript/jerry-core/vm/vm.c:4232 #27 0x566fcde9 in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #28 0x56780911 in jerry_run jerryscript/jerry-core/api/jerry.c:596 #29 0x5677cefb in main jerryscript/jerry-main/main-unix.c:759 previously allocated by thread T0 here: #0 0xf79d9304 in __interceptor_realloc (/usr/lib32/libasan.so.4+0xe6304) #1 0x5671bfc3 in jmem_heap_realloc_block jerryscript/jerry-core/jmem/jmem-heap.c:674 #2 0x567a0a78 in ecma_stringbuilder_grow jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2507 #3 0x567a0fbf in ecma_stringbuilder_append_byte jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2630 #4 0x56711492 in ecma_regexp_split_helper jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1805 #5 0x566a8afc in ecma_builtin_regexp_prototype_symbol_split jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:680 #6 0x566a6fd5 in ecma_builtin_regexp_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h:60 #7 0x5675e5bb in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #8 0x5675e793 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #9 0x5673723a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #10 0x5673810a in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #11 0x566da602 in ecma_builtin_function_prototype_object_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:191 #12 0x566db00d in ecma_builtin_function_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:414 #13 0x5675e5bb in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #14 0x5675e793 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #15 0x5673723a in ecma_op_function_call_simple jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #16 0x5673810a in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #17 0x566fe79d in opfunc_call.lto_priv.462 jerryscript/jerry-core/vm/vm.c:764 #18 0x566bf814 in vm_execute jerryscript/jerry-core/vm/vm.c:4130 #19 0x566bfd8c in vm_run jerryscript/jerry-core/vm/vm.c:4232 #20 0x566fcde9 in vm_run_global jerryscript/jerry-core/vm/vm.c:321 #21 0x56780911 in jerry_run jerryscript/jerry-core/api/jerry.c:596 #22 0x5677cefb in main jerryscript/jerry-main/main-unix.c:759 #23 0xf7712e80 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-string.c:806 in ecma_deref_ecma_string Shadow bytes around the buggy address: 0x3ea603f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60410: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60420: fa fa fa fa fa fa fa fa 00 00 00 fa fa fa 00 00 0x3ea60430: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa =>0x3ea60440: 00 00 00 fa fa fa[fd]fd fd fa fa fa fd fd fd fa 0x3ea60450: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa fa fa 0x3ea60460: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60470: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60480: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60490: 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 ==45542==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-use-after-free in ecma_regexp_split_helper
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3760/comments
0
2020-05-18T13:34:55Z
2020-05-21T12:51:51Z
https://github.com/jerryscript-project/jerryscript/issues/3760
620,215,059
3,760
[ "jerryscript-project", "jerryscript" ]
I would like to nominate Szilagyi Adam (@szilagyiadam) to become a committer. He already has >80 merged pull request, with lots of contributions towards implementing new EcmaScript features. https://github.com/jerryscript-project/jerryscript/pulls?q=is%3Apr+is%3Aclosed+author%3Aszilagyiadam
Nominating Szilagyi Adam (@szilagyiadam) to become a JerryScript committer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3758/comments
6
2020-05-18T12:23:59Z
2020-05-25T18:56:15Z
https://github.com/jerryscript-project/jerryscript/issues/3758
620,166,259
3,758
[ "jerryscript-project", "jerryscript" ]
I would like to nominate Csaba Osztrogonác (@ossy-szeged) to become a committer. He already has >50 merged pull request, with several contributions to the test infrastructure and windows support, among others. https://github.com/jerryscript-project/jerryscript/pulls?q=is%3Apr+author%3Aossy-szeged+is%3Aclosed
Nominating Csaba Osztrogonác (@ossy-szeged) to become a JerryScript committer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3757/comments
6
2020-05-18T12:23:40Z
2020-05-25T18:53:14Z
https://github.com/jerryscript-project/jerryscript/issues/3757
620,166,072
3,757
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision bd1c4df ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --lto=off --error-message=on --system-allocator=on ``` ###### Test case ``` r = new RegExp ("(()*?)+?a"); assert (r.exec("ba")[0] == "a"); ``` ###### Output ``` ASAN:SIGSEGV ================================================================= ==103435==ERROR: AddressSanitizer: stack-overflow on address 0xff318fcc (pc 0x0808fc96 bp 0xff319158 sp 0xff318fb0 T0) #0 0x808fc95 in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:535 #1 0x80915ee in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1060 #2 0x80915ee in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1060 #3 0x8091111 in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:995 #4 0x8091b54 in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1122 #5 0x80915ee in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1060 #6 0x8091b54 in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1122 ... #249 0x8091b54 in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1122 #250 0x8091b54 in ecma_regexp_match /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1122 SUMMARY: AddressSanitizer: stack-overflow /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:535 ecma_regexp_match ==103435==ABORTING ``` Credits: This vulnerability is detected by chong from OWL337.
stack-overflow in ecma_regexp_match
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3753/comments
6
2020-05-18T05:18:42Z
2020-05-26T13:29:29Z
https://github.com/jerryscript-project/jerryscript/issues/3753
619,915,696
3,753
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision bd1c4df9 ###### Build platform Linux-4.15.0-88-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 for (let i in { id_0: 1 }) (function() { i ``` ###### Output ```text ICE: Assertion 'literal_index >= PARSER_REGISTER_START || !has_context || scanner_literal_is_created (context_p, literal_index)' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_for_statement_start):1380. Error: ERR_FAILED_INTERNAL_ASSERTION ASAN:DEADLYSIGNAL ================================================================= ==18934==ERROR: AddressSanitizer: ABRT on unknown address 0x000049f6 (pc 0xf7fc7079 bp 0xff8e4bec sp 0xff8e4bd0 T0) #0 0xf7fc7078 (linux-gate.so.1+0x1078) #1 0xf7fc7078 (linux-gate.so.1+0x1078) #2 0xf77ee831 in raise (/lib/i386-linux-gnu/libc.so.6+0x2d831) #3 0xf77efcc0 in abort (/lib/i386-linux-gnu/libc.so.6+0x2ecc0) #4 0x566443a0 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #5 0x566fb4e7 in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #6 0x566fb528 in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #7 0x5666f1fe in parser_parse_for_statement_start jerryscript/jerry-core/parser/js/js-parser-statm.c:1378 #8 0x566767c9 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:2897 #9 0x5670a668 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2184 #10 0x5670dcb5 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2697 #11 0x5675f17d in jerry_parse jerryscript/jerry-core/api/jerry.c:448 #12 0x5675bd8d in main jerryscript/jerry-main/main-unix.c:750 #13 0xf77d9e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #14 0x56637290 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x1a290) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0x1078) ==18934==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion literal_index >= PARSER_REGISTER_START || !has_context || scanner_literal_is_created (context_p, literal_index) in parser_parse_for_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3751/comments
0
2020-05-17T09:57:54Z
2020-05-26T09:49:32Z
https://github.com/jerryscript-project/jerryscript/issues/3751
619,659,744
3,751
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision bd1c4df ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps ``` python ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --lto=off --error-message=on --system-allocator=on ``` ###### Test case ``` function test_1 () { 'use strict'; Object.defineProperty (Number.prototype, 'getter', { get : function () { ((10).getter === 10) }, configurable : true }); assert ((10).getter === 10); assert (typeof ((10).getter) === 'number'); delete Number.prototype.getter; } test_1 (); ``` ###### Output ``` ASAN:SIGSEGV ================================================================= ==97962==ERROR: AddressSanitizer: stack-overflow on address 0xff3a7e74 (pc 0x080b7d3c bp 0xff3a8178 sp 0xff3a7e50 T0) #0 0x80b7d3b in vm_loop /home/jerryscript/jerry-core/vm/vm.c:948 #1 0x80c2d8c in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4124 #2 0x80c32fb in vm_run /home/jerryscript/jerry-core/vm/vm.c:4232 #3 0x8083ff1 in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:886 #4 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #5 0x808a4ce in ecma_op_object_find_own /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:658 #6 0x808a810 in ecma_op_object_get_with_receiver /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:830 #7 0x80e0828 in ecma_op_get_value_object_base /home/jerryscript/jerry-core/ecma/operations/ecma-get-put-value.c:188 #8 0x80b6d71 in vm_op_get_value /home/jerryscript/jerry-core/vm/vm.c:141 #9 0x80bb462 in vm_loop /home/jerryscript/jerry-core/vm/vm.c:2155 #10 0x80c2d8c in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4124 ....... #246 0x8083ff1 in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:886 #247 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #248 0x808a4ce in ecma_op_object_find_own /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:658 #249 0x808a810 in ecma_op_object_get_with_receiver /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:830 #250 0x80e0828 in ecma_op_get_value_object_base /home/jerryscript/jerry-core/ecma/operations/ecma-get-put-value.c:188 SUMMARY: AddressSanitizer: stack-overflow /home/jerryscript/jerry-core/vm/vm.c:948 vm_loop ==97962==ABORTING ``` Credits: This vulnerability is detected by chong from OWL337.
stack-overflow in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3750/comments
1
2020-05-17T04:16:35Z
2020-05-21T17:35:20Z
https://github.com/jerryscript-project/jerryscript/issues/3750
619,605,398
3,750
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision bd1c4df ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps python ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --lto=off --error-message=on --system-allocator=on ###### Test case try { [].length = { valueOf: function() { return String("abcdabcd").split("").push (-62167219200000, '"\\ubad"', '"\\u', new RegExp([ 4294967294, ], "g").exec(1), 1, 1, 1, 1, 1, 1), Object.freeze (Array.prototype); } } assert (false); } catch (e) { Array.prototype.splice(Function.prototype, ("function a() { return 8; }"), this); } ###### Output Script Error: TypeError: Invalid argument type. ================================================================= ==97903==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf6000260 at pc 0x0809632c bp 0xfff4f018 sp 0xfff4f008 READ of size 4 at 0xf6000260 thread T0 #0 0x809632b in jmem_pools_collect_empty /home/jerryscript/jerry-core/jmem/jmem-poolman.c:165 #1 0x8095f01 in jmem_pools_finalize /home/jerryscript/jerry-core/jmem/jmem-poolman.c:44 #2 0x809553f in jmem_finalize /home/jerryscript/jerry-core/jmem/jmem-allocator.c:161 #3 0x804d6a6 in jerry_cleanup /home/jerryscript/jerry-core/api/jerry.c:255 #4 0x804b545 in main /home/jerryscript/jerry-main/main-unix.c:994 #5 0xf7801636 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18636) #6 0x8049030 (/home/jerryscript/build/bin/jerry+0x8049030) 0xf6000260 is located 8 bytes to the right of 8-byte region [0xf6000250,0xf6000258) allocated by thread T0 here: #0 0xf7a35dee in malloc (/usr/lib32/libasan.so.2+0x96dee) #1 0x809581b in jmem_heap_alloc /home/jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x80958eb in jmem_heap_gc_and_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x8095952 in jmem_heap_alloc_block_internal /home/jerryscript/jerry-core/jmem/jmem-heap.c:308 #4 0x809606b in jmem_pools_alloc /home/jerryscript/jerry-core/jmem/jmem-poolman.c:85 #5 0x80c3351 in ecma_alloc_number /home/jerryscript/jerry-core/ecma/base/ecma-alloc.c:57 #6 0x806737c in ecma_create_float_number /home/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:487 #7 0x8067fc4 in ecma_copy_value /home/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:838 #8 0x8068172 in ecma_fast_copy_value /home/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:881 #9 0x8089f60 in ecma_op_object_find_own /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:505 #10 0x808a810 in ecma_op_object_get_with_receiver /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:830 #11 0x808a916 in ecma_op_object_get /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:799 #12 0x808a916 in ecma_op_object_get_by_uint32_index /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:862 #13 0x80c8d98 in ecma_op_array_get_to_string_at_index /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:310 #14 0x80c8ed9 in ecma_builtin_array_prototype_join /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:360 #15 0x80cd66a in ecma_builtin_array_prototype_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2653 #16 0x807aa06 in ecma_builtin_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #17 0x807abac in ecma_builtin_dispatch_call /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #18 0x8083dce in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #19 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #20 0x80c885f in ecma_builtin_array_prototype_object_to_string /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:151 #21 0x80cd4d5 in ecma_builtin_array_prototype_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2596 #22 0x807aa06 in ecma_builtin_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #23 0x807abac in ecma_builtin_dispatch_call /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #24 0x8083dce in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #25 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #26 0x80877f8 in ecma_op_general_object_ordinary_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:324 #27 0x8087718 in ecma_op_general_object_default_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:289 #28 0x808bc85 in ecma_op_object_default_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1720 #29 0x80803b5 in ecma_op_to_primitive /home/jerryscript/jerry-core/ecma/operations/ecma-conversion.c:199 #30 0x80809c0 in ecma_op_to_string /home/jerryscript/jerry-core/ecma/operations/ecma-conversion.c:413 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/jerryscript/jerry-core/jmem/jmem-poolman.c:165 jmem_pools_collect_empty Shadow bytes around the buggy address: 0x3ebffff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ec00000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec00030: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fa =>0x3ec00040: fa fa fd fa fa fa fd fa fa fa 00 fa[fa]fa fd fa 0x3ec00050: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd 0x3ec00060: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd 0x3ec00070: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fa 0x3ec00080: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fa 0x3ec00090: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fd 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==97903==ABORTING Credits: This vulnerability is detected by chong from OWL337.
heap-buffer-overflow in the jmem_pools_collect_empty
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3749/comments
0
2020-05-17T04:04:34Z
2020-05-20T10:10:06Z
https://github.com/jerryscript-project/jerryscript/issues/3749
619,604,019
3,749
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision bd1c4df ###### Build platform Ubuntu 16.04.6 LTS (Linux 4.15.0-99-generic x86_64) ###### Build steps python ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --lto=off --error-message=on --system-allocator=on ###### Test case var o = [] function add(i) { delete o[i & 31]; new RegExp([ '"\\u', ], "g").exec(1); } for (var i = 0; i < 130; i++) { add(i) } ###### Output ================================================================= ==97694==ERROR: AddressSanitizer: heap-use-after-free on address 0xf61005b0 at pc 0x080605b2 bp 0xff856d28 sp 0xff856d18 READ of size 4 at 0xf61005b0 thread T0 #0 0x80605b1 in ecma_ref_ecma_string /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:772 #1 0x808ef54 in ecma_regexp_create_props /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:144 #2 0x808f562 in ecma_op_regexp_initialize /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:322 #3 0x808f850 in ecma_op_create_regexp_from_pattern /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:393 #4 0x80dd0ed in ecma_builtin_regexp_dispatch_helper /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:179 #5 0x80dd154 in ecma_builtin_regexp_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:223 #6 0x807ae83 in ecma_builtin_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1160 #7 0x8084a81 in ecma_op_function_construct /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1229 #8 0x80b7b62 in opfunc_construct /home/jerryscript/jerry-core/vm/vm.c:849 #9 0x80c2df8 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4151 #10 0x80c32fb in vm_run /home/jerryscript/jerry-core/vm/vm.c:4232 #11 0x8083ff1 in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:886 #12 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #13 0x80b75f1 in opfunc_call /home/jerryscript/jerry-core/vm/vm.c:764 #14 0x80c2de5 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4130 #15 0x80c32fb in vm_run /home/jerryscript/jerry-core/vm/vm.c:4232 #16 0x80b6f6a in vm_run_global /home/jerryscript/jerry-core/vm/vm.c:321 #17 0x804e249 in jerry_run /home/jerryscript/jerry-core/api/jerry.c:596 #18 0x804ad3f in main /home/jerryscript/jerry-main/main-unix.c:759 #19 0xf7875636 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18636) #20 0x8049030 (/home/jerryscript/build/bin/jerry+0x8049030) 0xf61005b0 is located 0 bytes inside of 15-byte region [0xf61005b0,0xf61005bf) freed by thread T0 here: #0 0xf7aa9a84 in free (/usr/lib32/libasan.so.2+0x96a84) #1 0x8095b14 in jmem_heap_free_block_internal /home/jerryscript/jerry-core/jmem/jmem-heap.c:476 #2 0x8095eac in jmem_heap_free_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:685 #3 0x80c3453 in ecma_dealloc_string_buffer /home/jerryscript/jerry-core/ecma/base/ecma-alloc.c:208 #4 0x806096f in ecma_destroy_ecma_string /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:844 #5 0x8060740 in ecma_deref_ecma_string /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:816 #6 0x808f7e1 in ecma_op_create_regexp_from_pattern /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:384 #7 0x80dd0ed in ecma_builtin_regexp_dispatch_helper /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:179 #8 0x80dd154 in ecma_builtin_regexp_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:223 #9 0x807ae83 in ecma_builtin_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1160 #10 0x8084a81 in ecma_op_function_construct /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1229 #11 0x80b7b62 in opfunc_construct /home/jerryscript/jerry-core/vm/vm.c:849 #12 0x80c2df8 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4151 #13 0x80c32fb in vm_run /home/jerryscript/jerry-core/vm/vm.c:4232 #14 0x8083ff1 in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:886 #15 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #16 0x80b75f1 in opfunc_call /home/jerryscript/jerry-core/vm/vm.c:764 #17 0x80c2de5 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4130 #18 0x80c32fb in vm_run /home/jerryscript/jerry-core/vm/vm.c:4232 #19 0x80b6f6a in vm_run_global /home/jerryscript/jerry-core/vm/vm.c:321 #20 0x804e249 in jerry_run /home/jerryscript/jerry-core/api/jerry.c:596 #21 0x804ad3f in main /home/jerryscript/jerry-main/main-unix.c:759 #22 0xf7875636 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18636) previously allocated by thread T0 here: #0 0xf7aa9dee in malloc (/usr/lib32/libasan.so.2+0x96dee) #1 0x809581b in jmem_heap_alloc /home/jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x80958eb in jmem_heap_gc_and_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x809596a in jmem_heap_alloc_block /home/jerryscript/jerry-core/jmem/jmem-heap.c:323 #4 0x8066032 in ecma_stringbuilder_create_from /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2456 #5 0x80c8f17 in ecma_builtin_array_prototype_join /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:368 #6 0x80cd66a in ecma_builtin_array_prototype_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2653 #7 0x807aa06 in ecma_builtin_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #8 0x807abac in ecma_builtin_dispatch_call /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #9 0x8083dce in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #10 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #11 0x80c885f in ecma_builtin_array_prototype_object_to_string /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:151 #12 0x80cd4d5 in ecma_builtin_array_prototype_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2596 #13 0x807aa06 in ecma_builtin_dispatch_routine /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1095 #14 0x807abac in ecma_builtin_dispatch_call /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1119 #15 0x8083dce in ecma_op_function_call_simple /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:782 #16 0x8084716 in ecma_op_function_call /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1085 #17 0x80877f8 in ecma_op_general_object_ordinary_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:324 #18 0x8087718 in ecma_op_general_object_default_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:289 #19 0x808bc85 in ecma_op_object_default_value /home/jerryscript/jerry-core/ecma/operations/ecma-objects.c:1720 #20 0x80803b5 in ecma_op_to_primitive /home/jerryscript/jerry-core/ecma/operations/ecma-conversion.c:199 #21 0x80809c0 in ecma_op_to_string /home/jerryscript/jerry-core/ecma/operations/ecma-conversion.c:413 #22 0x809322a in ecma_regexp_read_pattern_str_helper /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1618 #23 0x808f694 in ecma_op_create_regexp_from_pattern /home/jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:352 #24 0x80dd0ed in ecma_builtin_regexp_dispatch_helper /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:179 #25 0x80dd154 in ecma_builtin_regexp_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:223 #26 0x807ae83 in ecma_builtin_dispatch_construct /home/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1160 #27 0x8084a81 in ecma_op_function_construct /home/jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1229 #28 0x80b7b62 in opfunc_construct /home/jerryscript/jerry-core/vm/vm.c:849 #29 0x80c2df8 in vm_execute /home/jerryscript/jerry-core/vm/vm.c:4151 SUMMARY: AddressSanitizer: heap-use-after-free /home/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:772 ecma_ref_ecma_string Shadow bytes around the buggy address: 0x3ec20060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec20070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec20080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec20090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ec200a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ec200b0: fa fa fa fa fa fa[fd]fd fa fa fd fa fa fa fd fa 0x3ec200c0: fa fa 00 07 fa fa 00 05 fa fa 00 07 fa fa fd fd 0x3ec200d0: fa fa 00 00 fa fa 00 05 fa fa 00 05 fa fa 00 07 0x3ec200e0: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fd 0x3ec200f0: fa fa 00 00 fa fa 00 00 fa fa 00 06 fa fa 00 00 0x3ec20100: 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==97694==ABORTING Credits: This vulnerability is detected by chong from OWL337.
heap-use-after-free in the ecma_ref_ecma_string
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3748/comments
0
2020-05-17T03:19:15Z
2020-05-20T10:10:06Z
https://github.com/jerryscript-project/jerryscript/issues/3748
619,599,547
3,748
[ "jerryscript-project", "jerryscript" ]
```javascript var re = /'|{(.+)}/g "{a}b'c".replace(re, function(match, group) { print(match, group) }) ``` jerryscript prints: > {a} a > ' a <- notice `a` as captured group expected: > {a} a > ' undefined setup > "Arch Linux" (Linux 5.5.9-arch1-2 x86_64) > commit: 95aa82763501d0bf1592d121fc0e8af5066ee726 > build command: python tools/build.py
String#replace with regex provides previous capture group when group not found
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3743/comments
3
2020-05-15T11:08:13Z
2020-05-26T13:29:50Z
https://github.com/jerryscript-project/jerryscript/issues/3743
618,887,844
3,743
[ "jerryscript-project", "jerryscript" ]
```javascript var n = 123.5 print(n.toFixed(0) + " " + Math.round(n)) ``` jerryscript returns: 123 124 nodejs returns: 124 124 > "Arch Linux" (Linux 5.5.9-arch1-2 x86_64) > commit: 95aa82763501d0bf1592d121fc0e8af5066ee726 > build command: python tools/build.py
Number#toFixed rounds differently from Math.round
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3741/comments
1
2020-05-15T09:46:36Z
2020-05-18T04:19:03Z
https://github.com/jerryscript-project/jerryscript/issues/3741
618,841,275
3,741
[ "jerryscript-project", "jerryscript" ]
Traditionally, JerryScript has been a fully ES5.1-compatible JavaScript engine. As the standard evolved, the community started adding features from the next edition of EcmaScript (ES6 or ES2015) into a new profile (configuration) of the engine. The original configuration was called the es5.1 profile, while the new one got the name es2015-subset profile. The original idea was to complete the ES2015 profile -- so as to be able to drop the "-subset" suffix -- and then move on to the next edition of the standard, and so on. I.e., the intent was to support all editions of the standard and allow our users to select the edition they need when they configure and build JerryScript. It turns out that this is not a maintainable approach and does not even meet the needs of the users. Most JavaScript programmers use the latest edition of the standard, whichever that is, and expect engines to support that edition. Or, at least, support something close to that. Even if we finished the exact implementation of the ES6 specification, that would be both outdated and not even the subset of the latest edition of JavaScript. (Yes, there have been backward incompatible changes in the spec since 2015.) And we definitely wont be able to maintain different ES2015, ES2016, ES2017, ES2018, ES2019 (etc.) configurations. (Moreover, we couldn't even properly test conformance, as the test262 conformance suite has ceased releasing test suites for the different editions of the language after ES5.1.) Therefore, I propose to keep the original ES5.1 profile (because that's a fully spec-compatible and mature configuration, often enough for constrained applications), but otherwise target the always-latest version of the EcmaScript standard (let's call it the ES.Next profile -- disclaimer: I haven't invented the term). Notes: - This would cause a big one-time churn in the code base, as all ES2015 macro guards would need a rename (to something like ESNEXT?). Most probably it's not even only the macros. - This would cause some backward incompatibility as well, at least build system-wise, as profile name and feature guard names would change. Embedders relying on these would break. - IMO, we still could and should keep the feature guards in the code base to allow users to trim down functionality. Let's remember that JerryScript is for constrained devices.
Re-target JerryScript for ES.Next
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3737/comments
5
2020-05-13T14:33:46Z
2020-06-22T09:01:21Z
https://github.com/jerryscript-project/jerryscript/issues/3737
617,501,079
3,737
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 4dc2cb33 ###### Build platform Linux-4.15.0-88-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 $({ $ $() {} ``` ###### Output ```text ICE: Assertion 'scope_stack_p > context_p->scope_stack_p' failed at jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_literal_is_created):2450. Error: ERR_FAILED_INTERNAL_ASSERTION ASAN:DEADLYSIGNAL ================================================================= ==12366==ERROR: AddressSanitizer: ABRT on unknown address 0x0000304e (pc 0xf7faf079 bp 0xffb2b97c sp 0xffb2b960 T0) #0 0xf7faf078 (linux-gate.so.1+0x1078) #1 0xf7faf078 (linux-gate.so.1+0x1078) #2 0xf77d6831 in raise (/lib/i386-linux-gnu/libc.so.6+0x2d831) #3 0xf77d7cc0 in abort (/lib/i386-linux-gnu/libc.so.6+0x2ecc0) #4 0x565e8246 in jerry_port_fatal jerryscript/jerry-port/default/default-fatal.c:30 #5 0x5669e542 in jerry_fatal jerryscript/jerry-core/jrt/jrt-fatals.c:63 #6 0x5669e583 in jerry_assert_fail jerryscript/jerry-core/jrt/jrt-fatals.c:87 #7 0x566654ae in scanner_literal_is_created jerryscript/jerry-core/parser/js/js-scanner-util.c:2450 #8 0x56601e79 in parser_append_binary_single_assignment_token jerryscript/jerry-core/parser/js/js-parser-expr.c:2321 #9 0x56604445 in parser_pattern_form_assignment jerryscript/jerry-core/parser/js/js-parser-expr.c:2732 #10 0x56605a2d in parser_parse_object_initializer jerryscript/jerry-core/parser/js/js-parser-expr.c:3025 #11 0x56605b9e in parser_parse_initializer jerryscript/jerry-core/parser/js/js-parser-expr.c:3050 #12 0x566ab276 in parser_parse_function_arguments jerryscript/jerry-core/parser/js/js-parser.c:1807 #13 0x566afea9 in parser_parse_function jerryscript/jerry-core/parser/js/js-parser.c:2446 #14 0x5660f606 in parser_parse_function_statement jerryscript/jerry-core/parser/js/js-parser-statm.c:812 #15 0x56619f15 in parser_parse_statements jerryscript/jerry-core/parser/js/js-parser-statm.c:2831 #16 0x566ad743 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2184 #17 0x566b0d47 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2695 #18 0x56701fd9 in jerry_parse jerryscript/jerry-core/api/jerry.c:448 #19 0x566febe9 in main jerryscript/jerry-main/main-unix.c:750 #20 0xf77c1e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #21 0x565db210 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x1a210) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (linux-gate.so.1+0x1078) ==12366==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion scope_stack_p > context_p->scope_stack_p in scanner_literal_is_created
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3735/comments
0
2020-05-13T11:08:45Z
2020-05-18T11:16:16Z
https://github.com/jerryscript-project/jerryscript/issues/3735
617,357,433
3,735