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 f41afeb8 ###### Build platform Linux-4.15.0-62-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('[]', 0) ``` ###### Output ```text ICE: Assertion 'context_p->scope_stack_p != NULL' failed at jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_create_variables):1771. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b3e9 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565f938c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565f93cd in jerry_assert_fail (assertion=0x566d8420 "context_p->scope_stack_p != NULL", file=0x566d7780 "jerryscript/jerry-core/parser/js/js-scanner-util.c", function=0x566b2f00 <__func__.6013.lto_priv.472> "scanner_create_variables", line=1771) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5661298d in scanner_create_variables (context_p=0xffffc060, option_flags=4) at jerryscript/jerry-core/parser/js/js-scanner-util.c:1771 #7 0x56605ac6 in parser_parse_function_arguments (context_p=0xffffc060, end_type=LEXER_EOS) at jerryscript/jerry-core/parser/js/js-parser.c:1821 #8 0x56606d08 in parser_parse_source (arg_list_p=0xf5d006fc "[]", arg_list_size=2, source_p=0xf5f0091c "return a;", source_size=9, parse_opts=0, error_location_p=0xffffc270) at jerryscript/jerry-core/parser/js/js-parser.c:1984 #9 0x5660a5b2 in parser_parse_script (arg_list_p=0xf5d006fc "[]", arg_list_size=2, source_p=0xf5f0091c "return a;", source_size=9, parse_opts=0, bytecode_data_p=0xffffc3c0) at jerryscript/jerry-core/parser/js/js-parser.c:2521 #10 0x565b82bc in ecma_builtin_function_dispatch_construct (arguments_list_p=0xffffc70c, arguments_list_len=2) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:165 #11 0x565b7d16 in ecma_builtin_function_dispatch_call (arguments_list_p=0xffffc70c, arguments_list_len=2) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:59 #12 0x5665a8e5 in ecma_builtin_dispatch_call (obj_p=0xf5f008b0, this_arg_value=72, arguments_list_p=0xffffc70c, arguments_list_len=2) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1055 #13 0x5662f9ec in ecma_op_function_call (func_obj_p=0xf5f008b0, this_arg_value=72, arguments_list_p=0xffffc70c, arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #14 0x565cf670 in opfunc_call (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:699 #15 0x565e2b45 in vm_execute (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:4085 #16 0x565e3161 in vm_run (bytecode_header_p=0xf6301580, this_binding_value=4126149459, lex_env_p=0xf5d007b0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:4208 #17 0x5662c807 in vm_run_global (bytecode_p=0xf6301580) at jerryscript/jerry-core/vm/vm.c:286 #18 0x56677f51 in jerry_run (func_val=4126148835) at jerryscript/jerry-core/api/jerry.c:595 #19 0x56674707 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->scope_stack_p != NULL in scanner_create_variables
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3383/comments
0
2019-11-29T09:59:56Z
2019-12-04T14:38:51Z
https://github.com/jerryscript-project/jerryscript/issues/3383
530,256,788
3,383
[ "jerryscript-project", "jerryscript" ]
When I execute the testcase below, jerryscript throw an error `SyntaxError: Lexical declaration cannot appear in a single-statement context`, but other engines (v8, Chakra, spiderMonkey etc.) did not throw exceptions. Is this an issue of jerryscript? ###### JerryScript version [996bf76](https://github.com/jerryscript-project/jerryscript/commit/996bf76f5956c65342c1726d3f629fbea41320ab) ###### Build steps ``` python tools/build.py --clean --logging=on --line-info=on --error-messages=on --cpointer-32bit=on --mem-heap=1572864 --profile=es2015-subset ``` ###### Test case ``` var NISLFuzzingFunc = function() { a: function f(){return true;} }; NISLFuzzingFunc(); ``` ###### Command `jerryscript/build/bin/jerry testcase.js` ###### Output `SyntaxError: Lexical declaration cannot appear in a single-statement context.`
SyntaxError: Lexical declaration cannot appear in a single-statement context
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3381/comments
1
2019-11-29T08:51:14Z
2019-11-29T15:41:22Z
https://github.com/jerryscript-project/jerryscript/issues/3381
530,225,605
3,381
[ "jerryscript-project", "jerryscript" ]
The method `Object.getOwnPropertySymbols` has its Initial definition in ES6. According to ES6, the argument will be processed by `ToObject`. It‘s not appropriate to throw an error if argument is not an object. ###### JerryScript version [996bf76](https://github.com/jerryscript-project/jerryscript/commit/996bf76f5956c65342c1726d3f629fbea41320ab) ###### Build steps ``` python tools/build.py --clean --logging=on --line-info=on --error-messages=on --cpointer-32bit=on --mem-heap=1572864 --profile=es2015-subset ``` ###### Test case ``` var NISLFuzzingFunc = function() { var p = true; Object.getOwnPropertySymbols(p); }; NISLFuzzingFunc(); ``` ###### Command `jerryscript/build/bin/jerry testcase.js` ###### Output `Script Error: TypeError: Argument is not an object.`
An issue about Object.getOwnPropertySymbols
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3380/comments
1
2019-11-29T08:14:03Z
2019-11-29T12:06:18Z
https://github.com/jerryscript-project/jerryscript/issues/3380
530,211,312
3,380
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 14e95a47 ###### Build platform Linux-4.15.0-62-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 () { new Promise(isFinite.toString) })(); (function () { [ ] = [ ] }) ({}) ``` ###### Output ```text Script Error: TypeError: Argument 'this' is not a function. ICE: Assertion 'object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE' failed at jerryscript/jerry-core/ecma/base/ecma-gc.c(ecma_deref_object):146. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b47e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565f982c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565f986d in jerry_assert_fail (assertion=0x566e4840 "object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE", file=0x566e47e0 "jerryscript/jerry-core/ecma/base/ecma-gc.c", function=0x566a1080 <__func__.5795.lto_priv.45> "ecma_deref_object", line=146) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5667f259 in ecma_deref_object (object_p=0xf5f06970) at jerryscript/jerry-core/ecma/base/ecma-gc.c:146 #7 0x5669665a in ecma_free_value (value=4126173555) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1020 #8 0x5663122d in ecma_free_promise_reaction_job (job_p=0xf5d02530) at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:89 #9 0x56631a7b in ecma_process_promise_reaction_job (obj_p=0xf5d02530) at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:213 #10 0x5663247b in ecma_process_all_enqueued_jobs () at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:343 #11 0x5667550e in jerry_run_all_enqueued_jobs () at jerryscript/jerry-core/api/jerry.c:632 #12 0x566722f4 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:927 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE in ecma_deref_object
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3376/comments
0
2019-11-28T13:16:52Z
2019-11-29T14:45:41Z
https://github.com/jerryscript-project/jerryscript/issues/3376
529,907,146
3,376
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 2e8a8f5c ###### Build platform Linux-4.15.0-62-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 eval ( ... [ 0] ) ``` ###### Output ```text ICE: Assertion '*byte_code_p >= CBC_CALL && *byte_code_p <= CBC_CALL2_PROP_BLOCK' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):2400. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f18 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f59 in jerry_assert_fail (assertion=0x566d04c0 "*byte_code_p >= CBC_CALL && *byte_code_p <= CBC_CALL2_PROP_BLOCK", file=0x566cf1a0 "jerryscript/jerry-core/vm/vm.c", function=0x566af420 <__func__.6363.lto_priv.108> "vm_loop", line=2400) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565e5a4f in vm_loop (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:2400 #7 0x565ef4dd in vm_execute (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:4043 #8 0x565efb6e in vm_run (bytecode_header_p=0xf4f01ea0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:4168 #9 0x565db04a in vm_run_global (bytecode_p=0xf4f01ea0) at jerryscript/jerry-core/vm/vm.c:286 #10 0x5667d3da in jerry_run (func_val=4126148931) at jerryscript/jerry-core/api/jerry.c:595 #11 0x56679b50 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion *byte_code_p >= CBC_CALL && *byte_code_p <= CBC_CALL2_PROP_BLOCK in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3364/comments
0
2019-11-25T15:08:18Z
2019-11-26T12:05:57Z
https://github.com/jerryscript-project/jerryscript/issues/3364
528,147,675
3,364
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 2e8a8f5c ###### Build platform Linux-4.15.0-62-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 typeof x === 'undefined' let { t: [ { a: b } ] } = { t: [ { a: 'a' } ] } ``` ###### Output ```text Script Error: ReferenceError: x is not defined ICE: Assertion 'object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE' failed at jerryscript/jerry-core/ecma/base/ecma-gc.c(ecma_deref_object):146. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd3939 in __kernel_vsyscall () #1 0xf77c1182 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77ab2b6 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5668f75a in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565de426 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565de467 in jerry_assert_fail (assertion=0x5669cbe0 "object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE", file=0x5669cb80 "jerryscript/jerry-core/ecma/base/ecma-gc.c", function=0x5669d8c0 <__func__.5819.lto_priv.36> "ecma_deref_object", line=146) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5657a18e in ecma_deref_object (object_p=0xf5300820) at jerryscript/jerry-core/ecma/base/ecma-gc.c:146 #7 0x5659104e in ecma_free_value (value=4113565731) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1020 #8 0x56573062 in jerry_release_value (value=4113565731) at jerryscript/jerry-core/api/jerry.c:1366 #9 0x5656ee65 in main (argc=2, argv=0xffffcea4) at jerryscript/jerry-main/main-unix.c:925 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE' failed in ecma_deref_object
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3363/comments
0
2019-11-25T12:43:48Z
2019-11-27T21:27:35Z
https://github.com/jerryscript-project/jerryscript/issues/3363
528,062,367
3,363
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 fakeArray = { [ Symbol ] : 0}; fakeArray[ Symbol.isConcatSpreadable ] = 2.756; [].concat(fakeArray); ``` ###### Output ```text Script Error: ReferenceError: id_2 is not defined 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 ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566d37a0 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566d3740 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x566a7640 <__func__.4929.lto_priv.135> "jmem_heap_finalize", line=107) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566070e5 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:107 #7 0x56606f15 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5667c687 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:252 #9 0x5667a339 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:938 ``` <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/3361/comments
1
2019-11-24T01:25:58Z
2019-11-27T10:06:52Z
https://github.com/jerryscript-project/jerryscript/issues/3361
527,634,000
3,361
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 $ (b = [ ].$) { } var $ = { $: function ( ) { } } ``` ###### 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):1621. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566d5400 "context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION", file=0x566d4ae0 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x566ae580 <__func__.5658.lto_priv.506> "parser_parse_function_arguments", line=1621) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5661378e in parser_parse_function_arguments (context_p=0xffffc4c0, end_type=LEXER_RIGHT_PAREN) at jerryscript/jerry-core/parser/js/js-parser.c:1621 #7 0x56618170 in parser_parse_function (context_p=0xffffc4c0, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser.c:2258 #8 0x56596070 in lexer_construct_function_object (context_p=0xffffc4c0, extra_status_flags=14) at jerryscript/jerry-core/parser/js/js-lexer.c:2144 #9 0x5659d57e in parser_parse_function_expression (context_p=0xffffc4c0, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1042 #10 0x5659f048 in parser_parse_unary_expression (context_p=0xffffc4c0, grouping_level_p=0xffffbe30) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1366 #11 0x565a5f55 in parser_parse_expression (context_p=0xffffc4c0, options=4) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2763 #12 0x5659d09b in parser_parse_object_literal (context_p=0xffffc4c0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:930 #13 0x5659f1a8 in parser_parse_unary_expression (context_p=0xffffc4c0, grouping_level_p=0xffffbfa0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1381 #14 0x565a5f55 in parser_parse_expression (context_p=0xffffc4c0, options=14) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2763 #15 0x565a5cad in parser_parse_expression_statement (context_p=0xffffc4c0, options=12) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2723 #16 0x565ad8dc in parser_parse_var_statement.lto_priv.220 (context_p=0xffffc4c0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:591 #17 0x56570f8f in parser_parse_statements (context_p=0xffffc4c0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2661 #18 0x56615b5c in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56719660 <buffer.lto_priv> "function f ( a , b = id_0 + [ 'A' ] .findIndex ( func ) , id_1 ) { } \nvar id_2 = { id_3 : function ( id_4 ) { } } \nf ( ) \nfunction duplicatedArg ( a , b = d , c ) { try { var eval \nvar id_5 \nif ( id_6"..., source_size=267, parse_opts=0, error_location_p=0xffffc6d0) at jerryscript/jerry-core/parser/js/js-parser.c:1997 #19 0x56618ef4 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56719660 <buffer.lto_priv> "function f ( a , b = id_0 + [ 'A' ] .findIndex ( func ) , id_1 ) { } \nvar id_2 = { id_3 : function ( id_4 ) { } } \nf ( ) \nfunction duplicatedArg ( a , b = d , c ) { try { var eval \nvar id_5 \nif ( id_6"..., source_size=267, parse_opts=0, bytecode_data_p=0xffffc790) at jerryscript/jerry-core/parser/js/js-parser.c:2490 #20 0x5667cd4d in jerry_parse (resource_name_p=0xffffcd99 "/home/reni/.fuzzinator_29238//jerryscript/picireny/50095596043933881998881276021899264732.js", resource_name_length=92, source_p=0x56719660 <buffer.lto_priv> "function f ( a , b = id_0 + [ 'A' ] .findIndex ( func ) , id_1 ) { } \nvar id_2 = { id_3 : function ( id_4 ) { } } \nf ( ) \nfunction duplicatedArg ( a , b = d , c ) { try { var eval \nvar id_5 \nif ( id_6"..., source_size=267, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:445 #21 0x56679ad3 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:731 ``` <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 in parser_parse_function_arguments
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3360/comments
0
2019-11-23T23:46:21Z
2019-11-26T12:07:30Z
https://github.com/jerryscript-project/jerryscript/issues/3360
527,625,044
3,360
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var map = new WeakMap; map.set([]); ``` ###### Output ```text ICE: Assertion 'ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_find_named_property):609. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566de760 "ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p)", file=0x566ddda0 "jerryscript/jerry-core/ecma/base/ecma-helpers.c", function=0x566a20a0 <__func__.5695.lto_priv.127> "ecma_find_named_property", line=609) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566533b4 in ecma_find_named_property (obj_p=0xf5f00730, name_p=0x2b6d) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:608 #7 0x56632400 in ecma_op_container_set_weak (key_p=0xf5f00730, container_p=0xf5f007f0) at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:415 #8 0x56632a07 in ecma_op_container_set (this_arg=4126148499, key_arg=4126148403, value_arg=72, lit_id=LIT_MAGIC_STRING_WEAKMAP_UL) at jerryscript/jerry-core/ecma/operations/ecma-container-object.c:493 #9 0x56589fdd in ecma_builtin_weakmap_prototype_object_set (this_arg=4126148499, key_arg=4126148403, value_arg=72) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.c:99 #10 0x56589f15 in ecma_builtin_weakmap_prototype_dispatch_routine (builtin_routine_id=79, this_arg_value=4126148499, arguments_list=0xffffc460, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.inc.h:42 #11 0x56665f56 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE, builtin_routine_id=79, this_arg_value=4126148499, arguments_list_p=0xffffc460, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1020 #12 0x566661b7 in ecma_builtin_dispatch_call (obj_p=0xf5f006d0, this_arg_value=4126148499, arguments_list_p=0xffffc708, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1045 #13 0x5663a8e5 in ecma_op_function_call (func_obj_p=0xf5f006d0, this_arg_value=4126148499, arguments_list_p=0xffffc708, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #14 0x565dc721 in opfunc_call (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:699 #15 0x565ef547 in vm_execute (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:4049 #16 0x565efb6a in vm_run (bytecode_header_p=0xf5502980, this_binding_value=4126149459, lex_env_p=0xf5d007b0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:4168 #17 0x565db046 in vm_run_global (bytecode_p=0xf5502980) at jerryscript/jerry-core/vm/vm.c:286 #18 0x5667d3a6 in jerry_run (func_val=4126148787) at jerryscript/jerry-core/api/jerry.c:595 #19 0x56679b1c in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_is_lexical_environment (obj_p) || !ecma_op_object_is_fast_array (obj_p) in ecma_find_named_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3359/comments
0
2019-11-23T23:42:33Z
2019-11-26T07:21:34Z
https://github.com/jerryscript-project/jerryscript/issues/3359
527,624,696
3,359
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 print(WeakMap.prototype) ``` ###### 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):2488. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566dc7e0 "ecma_object_check_class_name_is_object (obj_p)", file=0x566dbc80 "jerryscript/jerry-core/ecma/operations/ecma-objects.c", function=0x566a6a60 <__func__.6736.lto_priv.603> "ecma_object_get_class_name", line=2488) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56649f93 in ecma_object_get_class_name (obj_p=0xf5f00820) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:2488 #7 0x5665aa98 in ecma_builtin_helper_object_to_string (this_arg=4126148643) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:142 #8 0x565c9f18 in ecma_builtin_object_prototype_object_to_string (this_arg=4126148643) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:80 #9 0x565ca130 in ecma_builtin_object_prototype_dispatch_routine (builtin_routine_id=76, this_arg=4126148643, arguments_list_p=0xffffc010, arguments_number=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:229 #10 0x56665f56 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, builtin_routine_id=76, this_arg_value=4126148643, arguments_list_p=0xffffc010, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1020 #11 0x566661b7 in ecma_builtin_dispatch_call (obj_p=0xf5f006d0, this_arg_value=4126148643, arguments_list_p=0x0, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1045 #12 0x5663a8e5 in ecma_op_function_call (func_obj_p=0xf5f006d0, this_arg_value=4126148643, arguments_list_p=0x0, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #13 0x566411ca in ecma_op_general_object_ordinary_value (obj_p=0xf5f00820, hint=ECMA_PREFERRED_TYPE_STRING) at jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:323 #14 0x5664108a in ecma_op_general_object_default_value (obj_p=0xf5f00820, hint=ECMA_PREFERRED_TYPE_STRING) at jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:288 #15 0x56646eb5 in ecma_op_object_default_value (obj_p=0xf5f00820, hint=ECMA_PREFERRED_TYPE_STRING) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1565 #16 0x566349c8 in ecma_op_to_primitive (value=4126148643, preferred_type=ECMA_PREFERRED_TYPE_STRING) at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:242 #17 0x5663524d in ecma_op_to_string (value=4126148643) at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:456 #18 0x5667ed8f in jerry_value_to_string (value=4126148643) at jerryscript/jerry-core/api/jerry.c:1321 #19 0x5657a841 in jerryx_handler_print (func_obj_val=4126149123, this_p=72, args_p=0xffffc710, args_cnt=3) at jerryscript/jerry-ext/handler/handler-print.c:62 #20 0x5663acf3 in ecma_op_function_call (func_obj_p=0xf5f00a00, this_arg_value=72, arguments_list_p=0xffffc710, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:873 #21 0x565dc721 in opfunc_call (frame_ctx_p=0xffffc6e0) at jerryscript/jerry-core/vm/vm.c:699 #22 0x565ef547 in vm_execute (frame_ctx_p=0xffffc6e0) at jerryscript/jerry-core/vm/vm.c:4049 #23 0x565efb6a in vm_run (bytecode_header_p=0xf6301520, this_binding_value=4126149459, lex_env_p=0xf5d007b0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:4168 #24 0x565db046 in vm_run_global (bytecode_p=0xf6301520) at jerryscript/jerry-core/vm/vm.c:286 #25 0x5667d3a6 in jerry_run (func_val=4126148787) at jerryscript/jerry-core/api/jerry.c:595 #26 0x56679b1c in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <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/3357/comments
0
2019-11-23T16:29:58Z
2019-11-25T10:48:34Z
https://github.com/jerryscript-project/jerryscript/issues/3357
527,577,889
3,357
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 alpha = []; var $ = {[$] : $} obj = {} obj[ Symbol.isConcatSpreadable ] = "\O" alpha.concat(obj) ``` ###### Output ```text Script Error: ReferenceError: id_2 is not defined ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):75. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566df6a0 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", file=0x566df620 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x566a2640 <__func__.5475.lto_priv.743> "ecma_free_string_list", line=75) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566578fe in ecma_free_string_list (string_list_cp=4124051312) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:75 #7 0x56657b31 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:121 #8 0x566566e7 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:68 #9 0x5667c3d2 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:236 #10 0x5667a339 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:938 ``` <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/3356/comments
1
2019-11-23T16:28:24Z
2019-11-27T10:06:52Z
https://github.com/jerryscript-project/jerryscript/issues/3356
527,577,726
3,356
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 $ = $ => { } / / ``` ###### Output ```text ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2027. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566d5840 "context.status_flags & PARSER_SCANNING_SUCCESSFUL", file=0x566d4ae0 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x566ae5c0 <__func__.5676.lto_priv.505> "parser_parse_source", line=2027) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56616114 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56719660 <buffer.lto_priv> "var hasProp = id_0 => { } \n/(?:(?=x)){1000}xyz/ .exec ( hasProp ) ; \nprint ( Object .isSealed ( hasProp ) ) ; \nvar keys = Object .getOwnPropertyNames ( hasProp ) ; \nprint ( keys .length === 1 ) ; \npri"..., source_size=235, parse_opts=0, error_location_p=0xffffc6d0) at jerryscript/jerry-core/parser/js/js-parser.c:2027 #7 0x56618ef4 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56719660 <buffer.lto_priv> "var hasProp = id_0 => { } \n/(?:(?=x)){1000}xyz/ .exec ( hasProp ) ; \nprint ( Object .isSealed ( hasProp ) ) ; \nvar keys = Object .getOwnPropertyNames ( hasProp ) ; \nprint ( keys .length === 1 ) ; \npri"..., source_size=235, parse_opts=0, bytecode_data_p=0xffffc790) at jerryscript/jerry-core/parser/js/js-parser.c:2490 #8 0x5667cd4d in jerry_parse (resource_name_p=0xffffcd98 "/home/reni/.fuzzinator_29238//jerryscript/picireny/286799537050728437464978337191786371184.js", resource_name_length=93, source_p=0x56719660 <buffer.lto_priv> "var hasProp = id_0 => { } \n/(?:(?=x)){1000}xyz/ .exec ( hasProp ) ; \nprint ( Object .isSealed ( hasProp ) ) ; \nvar keys = Object .getOwnPropertyNames ( hasProp ) ; \nprint ( keys .length === 1 ) ; \npri"..., source_size=235, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:445 #9 0x56679ad3 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:731 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context.status_flags & PARSER_SCANNING_SUCCESSFUL in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3355/comments
0
2019-11-23T16:24:44Z
2019-11-29T14:47:48Z
https://github.com/jerryscript-project/jerryscript/issues/3355
527,577,351
3,355
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 v8 = Array($).reduce(function(p_0) { return p_0 + $}, { }) $ = Object.preventExtensions(v8).$ var $ = v8 ``` ###### Output ```text ================================================================= ==37946==ERROR: AddressSanitizer: heap-use-after-free on address 0xf5403ca0 at pc 0x56698d60 bp 0xffc57ca8 sp 0xffc57c98 READ of size 4 at 0xf5403ca0 thread T0 #0 0x56698d5f in ecma_ref_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:837 #1 0x566a2567 in ecma_copy_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:811 #2 0x566a273c in ecma_fast_copy_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:850 #3 0x565901f2 in ecma_op_resolve_reference_value jerryscript/jerry-core/ecma/operations/ecma-reference.c:143 #4 0x565e3d22 in vm_loop jerryscript/jerry-core/vm/vm.c:1195 #5 0x565f44d8 in vm_execute jerryscript/jerry-core/vm/vm.c:4043 #6 0x565f4b69 in vm_run jerryscript/jerry-core/vm/vm.c:4168 #7 0x565e0045 in vm_run_global jerryscript/jerry-core/vm/vm.c:286 #8 0x566823a5 in jerry_run jerryscript/jerry-core/api/jerry.c:595 #9 0x5667eb1b in main jerryscript/jerry-main/main-unix.c:740 #10 0xf77aee80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #11 0x56572180 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x18180) 0xf5403ca0 is located 0 bytes inside of 29-byte region [0xf5403ca0,0xf5403cbd) freed by thread T0 here: #0 0xf7a74b74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x5660c551 in jmem_heap_free_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:476 #2 0x5660c908 in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:685 #3 0x565f4cfb in ecma_dealloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:208 #4 0x56699165 in ecma_destroy_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:909 #5 0x56698f13 in ecma_deref_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:881 #6 0x566a341d in ecma_free_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1008 #7 0x566a35e3 in ecma_fast_free_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1049 #8 0x565f2dd7 in vm_loop jerryscript/jerry-core/vm/vm.c:3798 #9 0x565f44d8 in vm_execute jerryscript/jerry-core/vm/vm.c:4043 #10 0x565f4b69 in vm_run jerryscript/jerry-core/vm/vm.c:4168 #11 0x565e0045 in vm_run_global jerryscript/jerry-core/vm/vm.c:286 #12 0x566823a5 in jerry_run jerryscript/jerry-core/api/jerry.c:595 #13 0x5667eb1b in main jerryscript/jerry-main/main-unix.c:740 #14 0xf77aee80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf7a74f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x5660c218 in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x5660c2f6 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x5660c389 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:322 #4 0x565f4cd8 in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x56697faf in ecma_new_ecma_string_from_utf8_buffer jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:293 #6 0x56697faf in ecma_append_chars_to_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:720 #7 0x56698ab9 in ecma_concat_ecma_strings jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:783 #8 0x565df0a3 in opfunc_addition jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c:166 #9 0x565ec3bf in vm_loop jerryscript/jerry-core/vm/vm.c:2658 #10 0x565f44d8 in vm_execute jerryscript/jerry-core/vm/vm.c:4043 #11 0x565f4b69 in vm_run jerryscript/jerry-core/vm/vm.c:4168 #12 0x5663fc43 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:851 #13 0x565ba4eb in ecma_builtin_array_reduce_from jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2079 #14 0x565bc3fd in ecma_builtin_array_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2618 #15 0x5666af55 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1020 #16 0x5666b1b6 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1045 #17 0x5663f8e4 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #18 0x565e1720 in opfunc_call jerryscript/jerry-core/vm/vm.c:699 #19 0x565f4546 in vm_execute jerryscript/jerry-core/vm/vm.c:4049 #20 0x565f4b69 in vm_run jerryscript/jerry-core/vm/vm.c:4168 #21 0x565e0045 in vm_run_global jerryscript/jerry-core/vm/vm.c:286 #22 0x566823a5 in jerry_run jerryscript/jerry-core/api/jerry.c:595 #23 0x5667eb1b in main jerryscript/jerry-main/main-unix.c:740 #24 0xf77aee80 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:837 in ecma_ref_ecma_string Shadow bytes around the buggy address: 0x3ea80740: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ea80750: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ea80760: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x3ea80770: 00 00 00 00 fa fa fd fd fd fa fa fa fd fd fd fa 0x3ea80780: fa fa fd fd fd fd fa fa fd fd fd fa fa fa 00 00 =>0x3ea80790: 00 fa fa fa[fd]fd fd fd fa fa fd fd fd fd fa fa 0x3ea807a0: 00 00 00 06 fa fa 00 00 00 fa fa fa fd fd fd fa 0x3ea807b0: fa fa 00 00 00 fa fa fa fd fd fd fa fa fa fd fd 0x3ea807c0: fd fa fa fa fd fd fd fa fa fa 00 00 00 fa fa fa 0x3ea807d0: 00 00 00 fa fa fa fd fd fd fa fa fa fd fd fd fa 0x3ea807e0: fa fa fd fd fd fa fa fa 00 00 00 fa fa fa 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 ==37946==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
heap-use-after-free in ecma_ref_ecma_string
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3352/comments
0
2019-11-23T01:53:22Z
2019-11-25T10:49:25Z
https://github.com/jerryscript-project/jerryscript/issues/3352
527,493,022
3,352
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 $ = Object.freeze(JSON.parse(0, function() { return $ + $ })) ``` ###### Output ```text ================================================================= ==37951==ERROR: AddressSanitizer: heap-use-after-free on address 0xf51005f0 at pc 0x566bbdad bp 0xff9ded48 sp 0xff9ded38 READ of size 4 at 0xf51005f0 thread T0 #0 0x566bbdac in jmem_pools_collect_empty jerryscript/jerry-core/jmem/jmem-poolman.c:165 #1 0x566bb939 in jmem_pools_finalize jerryscript/jerry-core/jmem/jmem-poolman.c:44 #2 0x566baf0f in jmem_finalize jerryscript/jerry-core/jmem/jmem-allocator.c:161 #3 0x56730686 in jerry_cleanup jerryscript/jerry-core/api/jerry.c:252 #4 0x5672e338 in main jerryscript/jerry-main/main-unix.c:938 #5 0xf7733e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #6 0x56621180 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x18180) 0xf51005f0 is located 0 bytes inside of 8-byte region [0xf51005f0,0xf51005f8) freed by thread T0 here: #0 0xf79f9b74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x566bb551 in jmem_heap_free_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:476 #2 0x566bbdc1 in jmem_pools_collect_empty jerryscript/jerry-core/jmem/jmem-poolman.c:168 #3 0x566bb939 in jmem_pools_finalize jerryscript/jerry-core/jmem/jmem-poolman.c:44 #4 0x566baf0f in jmem_finalize jerryscript/jerry-core/jmem/jmem-allocator.c:161 #5 0x56730686 in jerry_cleanup jerryscript/jerry-core/api/jerry.c:252 #6 0x5672e338 in main jerryscript/jerry-main/main-unix.c:938 #7 0xf7733e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf79f9f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566bb218 in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x566bb2f6 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x566bb367 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:307 #4 0x566bbaba in jmem_pools_alloc jerryscript/jerry-core/jmem/jmem-poolman.c:85 #5 0x566a3b90 in ecma_alloc_number jerryscript/jerry-core/ecma/base/ecma-alloc.c:57 #6 0x567501ed in ecma_create_float_number jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:456 #7 0x5675053e in ecma_make_number_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:519 #8 0x5668e234 in opfunc_addition jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c:176 #9 0x5669b3bf in vm_loop jerryscript/jerry-core/vm/vm.c:2658 #10 0x566a34d8 in vm_execute jerryscript/jerry-core/vm/vm.c:4043 #11 0x566a3b69 in vm_run jerryscript/jerry-core/vm/vm.c:4168 #12 0x566eec43 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:851 #13 0x56714026 in ecma_builtin_json_internalize_property jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:685 #14 0x56713e1a in ecma_builtin_json_internalize_property jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:648 #15 0x567145a1 in ecma_builtin_json_parse jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:765 #16 0x56711f03 in ecma_builtin_json_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.inc.h:33 #17 0x56719f55 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1020 #18 0x5671a1b6 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1045 #19 0x566ee8e4 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #20 0x56690720 in opfunc_call jerryscript/jerry-core/vm/vm.c:699 #21 0x566a3546 in vm_execute jerryscript/jerry-core/vm/vm.c:4049 #22 0x566a3b69 in vm_run jerryscript/jerry-core/vm/vm.c:4168 #23 0x5668f045 in vm_run_global jerryscript/jerry-core/vm/vm.c:286 #24 0x567313a5 in jerry_run jerryscript/jerry-core/api/jerry.c:595 #25 0x5672db1b in main jerryscript/jerry-main/main-unix.c:740 #26 0xf7733e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/jmem/jmem-poolman.c:165 in jmem_pools_collect_empty Shadow bytes around the buggy address: 0x3ea20060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea200a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ea200b0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa[fd]fa 0x3ea200c0: fa fa fd fd fa fa 00 00 fa fa fd fd fa fa fd fd 0x3ea200d0: fa fa fd fd fa fa 00 00 fa fa fd fd fa fa fd fd 0x3ea200e0: fa fa fd fa fa fa fd fd fa fa fd fd fa fa 00 00 0x3ea200f0: fa fa fd fd fa fa 00 00 fa fa fa fa fa fa fa fa 0x3ea20100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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 ==37951==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
heap-use-after-free in jmem_pools_collect_empty
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3351/comments
0
2019-11-23T01:33:26Z
2019-11-25T10:49:25Z
https://github.com/jerryscript-project/jerryscript/issues/3351
527,490,303
3,351
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 Object.preventExtensions("a") ``` ###### Output ```text ================================================================= ==37967==ERROR: AddressSanitizer: heap-use-after-free on address 0xf4401e20 at pc 0x566e48c8 bp 0xffee3708 sp 0xffee36f8 READ of size 4 at 0xf4401e20 thread T0 #0 0x566e48c7 in ecma_free_string_list jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:75 #1 0x566e4b30 in ecma_finalize_lit_storage jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:121 #2 0x566e36e6 in ecma_finalize jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:68 #3 0x567093d1 in jerry_cleanup jerryscript/jerry-core/api/jerry.c:236 #4 0x56707338 in main jerryscript/jerry-main/main-unix.c:938 #5 0xf7775e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #6 0x565fa180 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x18180) 0xf4401e20 is located 0 bytes inside of 94-byte region [0xf4401e20,0xf4401e7e) freed by thread T0 here: #0 0xf7a3bb74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x56694551 in jmem_heap_free_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:476 #2 0x56694908 in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:685 #3 0x5667ccfb in ecma_dealloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:208 #4 0x56721165 in ecma_destroy_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:909 #5 0x56720f13 in ecma_deref_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:881 #6 0x5672b41d in ecma_free_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1008 #7 0x5672b5e3 in ecma_fast_free_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1049 #8 0x5667ad49 in vm_loop jerryscript/jerry-core/vm/vm.c:3791 #9 0x5667c4d8 in vm_execute jerryscript/jerry-core/vm/vm.c:4043 #10 0x5667cb69 in vm_run jerryscript/jerry-core/vm/vm.c:4168 #11 0x56668045 in vm_run_global jerryscript/jerry-core/vm/vm.c:286 #12 0x5670a3a5 in jerry_run jerryscript/jerry-core/api/jerry.c:595 #13 0x56706b1b in main jerryscript/jerry-main/main-unix.c:740 #14 0xf7775e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) previously allocated by thread T0 here: #0 0xf7a3bf34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x56694218 in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x566942f6 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x56694389 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:322 #4 0x5667ccd8 in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x5671da0b in ecma_new_ecma_string_from_utf8_buffer jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:293 #6 0x5671da0b in ecma_new_ecma_string_from_utf8 jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:388 #7 0x566e4b9c in ecma_find_or_create_literal_string jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:134 #8 0x5669fcf8 in parser_post_processing jerryscript/jerry-core/parser/js/js-parser.c:1519 #9 0x566a3071 in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2023 #10 0x566a5ef3 in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2490 #11 0x56709d4c in jerry_parse jerryscript/jerry-core/api/jerry.c:445 #12 0x56706ad2 in main jerryscript/jerry-main/main-unix.c:731 #13 0xf7775e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:75 in ecma_free_string_list Shadow bytes around the buggy address: 0x3e880370: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e880380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e880390: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8803a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8803b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3e8803c0: fa fa fa fa[fd]fd fd fd fd fd fd fd fd fd fd fd 0x3e8803d0: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd 0x3e8803e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8803f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e880400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e880410: 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 ==37967==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-use-after-free in ecma_free_string_list
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3350/comments
0
2019-11-23T01:28:14Z
2019-11-25T10:49:25Z
https://github.com/jerryscript-project/jerryscript/issues/3350
527,489,555
3,350
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-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 Reflect.getPrototypeOf() ``` ###### Output ```text ICE: Assertion 'ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):762. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566e89e0 "ecma_is_value_object (value)", file=0x566e8840 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x566a1b00 <__func__.4346.lto_priv.772> "ecma_get_object_from_value", line=762) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5669d26a in ecma_get_object_from_value () at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:762 #7 0x565ce6ee in ecma_builtin_reflect_dispatch_routine (builtin_routine_id=76, this_arg=4126148835, arguments_list=0xffffc460, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.c:90 #8 0x56665f56 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_REFLECT, builtin_routine_id=76, this_arg_value=4126148835, arguments_list_p=0xffffc460, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1020 #9 0x566661b7 in ecma_builtin_dispatch_call (obj_p=0xf5f00880, this_arg_value=4126148835, arguments_list_p=0xffffc70c, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1045 #10 0x5663a8e5 in ecma_op_function_call (func_obj_p=0xf5f00880, this_arg_value=4126148835, arguments_list_p=0xffffc70c, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #11 0x565dc721 in opfunc_call (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:699 #12 0x565ef547 in vm_execute (frame_ctx_p=0xffffc6d0) at jerryscript/jerry-core/vm/vm.c:4049 #13 0x565efb6a in vm_run (bytecode_header_p=0xf4f01ea0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:4168 #14 0x565db046 in vm_run_global (bytecode_p=0xf4f01ea0) at jerryscript/jerry-core/vm/vm.c:286 #15 0x5667d3a6 in jerry_run (func_val=4126148883) at jerryscript/jerry-core/api/jerry.c:595 #16 0x56679b1c in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_is_value_object (value) in ecma_get_object_from_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3349/comments
0
2019-11-23T01:23:19Z
2019-11-25T10:49:05Z
https://github.com/jerryscript-project/jerryscript/issues/3349
527,488,825
3,349
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 62356796 ###### Build platform Linux-4.15.0-62-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript [ $, this.$] = [ ] ``` ###### Output ```text ICE: Assertion 'ecma_is_value_object (iterator)' failed at jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c(ecma_op_iterator_next):245. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657b78e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56607f14 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56607f55 in jerry_assert_fail (assertion=0x566da7c0 "ecma_is_value_object (iterator)", file=0x566da5a0 "jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c", function=0x566a5f00 <__func__.6193.lto_priv.635> "ecma_op_iterator_next", line=245) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5663ce47 in ecma_op_iterator_next (iterator=72, value=8) at jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c:245 #7 0x5663d0e3 in ecma_op_iterator_step (iterator=72) at jerryscript/jerry-core/ecma/operations/ecma-iterator-object.c:366 #8 0x565e35c8 in vm_loop (frame_ctx_p=0xffffc490) at jerryscript/jerry-core/vm/vm.c:1945 #9 0x565ef4d9 in vm_execute (frame_ctx_p=0xffffc490) at jerryscript/jerry-core/vm/vm.c:4043 #10 0x565efb6a in vm_run (bytecode_header_p=0xf4f019f0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, arg_list_p=0xffffc710, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:4168 #11 0x5663ac44 in ecma_op_function_call (func_obj_p=0xf5f04990, this_arg_value=72, arguments_list_p=0xffffc710, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:851 #12 0x565dc721 in opfunc_call (frame_ctx_p=0xffffc6e0) at jerryscript/jerry-core/vm/vm.c:699 #13 0x565ef547 in vm_execute (frame_ctx_p=0xffffc6e0) at jerryscript/jerry-core/vm/vm.c:4049 #14 0x565efb6a in vm_run (bytecode_header_p=0xf4703e40, this_binding_value=4126149459, lex_env_p=0xf5d007b0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:4168 #15 0x565db046 in vm_run_global (bytecode_p=0xf4703e40) at jerryscript/jerry-core/vm/vm.c:286 #16 0x5667d3a6 in jerry_run (func_val=4126151187) at jerryscript/jerry-core/api/jerry.c:595 #17 0x56679b1c in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_is_value_object (iterator) in ecma_op_iterator_next
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3348/comments
0
2019-11-23T01:18:00Z
2019-11-26T14:49:56Z
https://github.com/jerryscript-project/jerryscript/issues/3348
527,487,961
3,348
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision [7df87b7](https://github.com/jerryscript-project/jerryscript/commit/7df87b7778124af9b0dd309570c33864a67792f7) ###### Build steps ``` python tools/build.py --clean --logging=on --line-info=on --error-messages=o n --cpointer-32bit=on --mem-heap=1572864 --profile=es2015-subset ``` ###### Test case ``` var NISLFuzzingFunc = { var text = 'x'; var index = Math.random() - 1; print( text.charAt(0)); print( text.charAt(index)); print( text.charAt(index) === ""); } NISLFuzzingFunc(); ``` ###### Execution steps `jerryscript/build/bin/jerry testcase.js` ###### Output ``` x true ``` ###### Expected behavior ``` x x false ``` ###### Description: The variable named `index` is a negative number bigger than -1, and according to Standard ECMA-262 5.1 Edition , the [String.prototype.charAt(pos)](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.5.4.4) will call [ToInteger](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-9.4) to process the `pos`. The output of `print( text.charAt(index))` and`print( text.charAt(0))` are the same, which should be 'x'.
A bug about String.prototype.charAt
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3325/comments
1
2019-11-16T08:42:53Z
2019-12-09T11:07:28Z
https://github.com/jerryscript-project/jerryscript/issues/3325
523,816,996
3,325
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c0cc5a1b ###### Build platform Linux-4.15.0-62-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 eval("var" + "\u2029" + 'g\\u0065t: break get' ) ``` ###### Output ```text ICE: Assertion 'lit_is_valid_cesu8_string (string_p, string_size)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c(ecma_new_ecma_string_from_utf8):378. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ab4e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5660576f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566057b0 in jerry_assert_fail (assertion=0x566e0240 "lit_is_valid_cesu8_string (string_p, string_size)", file=0x566dfdc0 "jerryscript/jerry-core/ecma/base/ecma-helpers-string.c", function=0x5669a920 <__func__.3872.lto_priv.800> "ecma_new_ecma_string_from_utf8", line=378) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5668e087 in ecma_new_ecma_string_from_utf8 (string_p=0xf5d00570 "\276\276\276", string_size=3) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:378 #7 0x5661b068 in scanner_scope_find_let_declaration (context_p=0xffffbe00, literal_p=0xf51025c4) at jerryscript/jerry-core/parser/js/js-scanner-util.c:1012 #8 0x5661ba01 in scanner_detect_invalid_var (context_p=0xffffbe00, scanner_context_p=0xffffbc40, var_literal_p=0xf51025c4) at jerryscript/jerry-core/parser/js/js-scanner-util.c:1118 #9 0x566293c3 in scanner_scan_all (context_p=0xffffbe00, arg_list_p=0x0, arg_list_end_p=0x0, source_p=0xf630140c "\342\200\251var\342\200\251g\\u0065t: break get\342\200\251=\342\200\251\061\342\200\251", source_end_p=0xf6301433 "") at jerryscript/jerry-core/parser/js/js-scanner.c:2488 #10 0x566122ce in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0xf630140c "\342\200\251var\342\200\251g\\u0065t: break get\342\200\251=\342\200\251\061\342\200\251", source_size=39, parse_opts=66, error_location_p=0xffffc010) at jerryscript/jerry-core/parser/js/js-parser.c:1840 #11 0x566161dd in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0xf630140c "\342\200\251var\342\200\251g\\u0065t: break get\342\200\251=\342\200\251\061\342\200\251", source_size=39, parse_opts=66, bytecode_data_p=0xffffc0d0) at jerryscript/jerry-core/parser/js/js-parser.c:2443 #12 0x566366bf in ecma_op_eval_chars_buffer (code_p=0xf630140c "\342\200\251var\342\200\251g\\u0065t: break get\342\200\251=\342\200\251\061\342\200\251", code_buffer_size=39, parse_opts=66) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:104 #13 0x566363e1 in ecma_op_eval (code_p=0xf6301400, parse_opts=2) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #14 0x565ba250 in ecma_builtin_global_object_eval (x=4130345985) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:111 #15 0x565bda15 in ecma_builtin_global_dispatch_routine (builtin_routine_id=74, this_arg=72, arguments_list_p=0xffffc400, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:1164 #16 0x56666ff8 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_GLOBAL, builtin_routine_id=74, this_arg_value=72, arguments_list_p=0xffffc400, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1020 #17 0x56667259 in ecma_builtin_dispatch_call (obj_p=0xf5f00880, this_arg_value=72, arguments_list_p=0xffffc684, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1045 #18 0x56638a78 in ecma_op_function_call (func_obj_p=0xf5f00880, this_arg_value=72, arguments_list_p=0xffffc684, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #19 0x565d77ec in opfunc_call (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:583 #20 0x565eaa99 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3845 #21 0x565eb3db in vm_run (bytecode_header_p=0xf5102800, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3967 #22 0x565d6a74 in vm_run_global (bytecode_p=0xf5102800) at jerryscript/jerry-core/vm/vm.c:283 #23 0x5667aec0 in jerry_run (func_val=4126148787) at jerryscript/jerry-core/api/jerry.c:595 #24 0x56677636 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion lit_is_valid_cesu8_string (string_p, string_size) in ecma_new_ecma_string_from_utf8
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3313/comments
0
2019-11-13T17:24:52Z
2019-11-14T13:46:02Z
https://github.com/jerryscript-project/jerryscript/issues/3313
522,364,956
3,313
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision b16b400d ###### Build platform Linux-4.15.0-62-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 typeof(a); let a ``` ###### Output ```text ICE: Assertion 'ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_typeof_lit_id):1112. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ab4e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5660576f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566057b0 in jerry_assert_fail (assertion=0x566d7420 "ecma_is_value_object (value)", file=0x566d6e00 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x5669ba00 <__func__.4396.lto_priv.742> "ecma_get_typeof_lit_id", line=1112) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5665213f in ecma_get_typeof_lit_id (value=168) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:1112 #7 0x5657715d in opfunc_typeof (left_value=168) at jerryscript/jerry-core/vm/opcodes.c:104 #8 0x565e219f in vm_loop (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:2444 #9 0x565eaa39 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3839 #10 0x565eb3db in vm_run (bytecode_header_p=0xf4f035a0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3967 #11 0x565d6a74 in vm_run_global (bytecode_p=0xf4f035a0) at jerryscript/jerry-core/vm/vm.c:283 #12 0x5667aec0 in jerry_run (func_val=4126148787) at jerryscript/jerry-core/api/jerry.c:595 #13 0x56677636 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_is_value_object (value) in ecma_get_typeof_lit_id
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3306/comments
0
2019-11-13T04:31:01Z
2019-11-14T12:52:12Z
https://github.com/jerryscript-project/jerryscript/issues/3306
521,952,900
3,306
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 452c7818 ###### Build platform Linux-4.15.0-62-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 ( e ) { if ($) { var e } } ``` ###### Output ```text ICE: Assertion '!(type & SCANNER_LITERAL_IS_VAR)' failed at jerryscript/jerry-core/parser/js/js-scanner-util.c(scanner_pop_literal_pool):546. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a737 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56604cd3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56604d14 in jerry_assert_fail (assertion=0x566c9fa0 "!(type & SCANNER_LITERAL_IS_VAR)", file=0x566c9c40 "jerryscript/jerry-core/parser/js/js-scanner-util.c", function=0x566a3ae0 <__func__.5619.lto_priv.463> "scanner_pop_literal_pool", line=546) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56617b4b in scanner_pop_literal_pool (context_p=0xffffc4c0, scanner_context_p=0xffffc300) at jerryscript/jerry-core/parser/js/js-scanner-util.c:546 #7 0x56625489 in scanner_scan_statement_end (context_p=0xffffc4c0, scanner_context_p=0xffffc300, type=LEXER_RIGHT_BRACE) at jerryscript/jerry-core/parser/js/js-scanner.c:1815 #8 0x56627127 in scanner_scan_all (context_p=0xffffc4c0, arg_list_p=0x0, arg_list_end_p=0x0, source_p=0x5670bae0 <buffer.lto_priv> "function id_0 ( ) { } \nvar x = function ( ) { throw \"x\" ; \n} ; \nvar y = function ( ) { throw \"y\" ; \n} ; \ntry { id_1 ( x ( ) , y ( ) ) ; \nprint ( false ) ; \n} catch ( e ) { if ( e === \"y\" ) { var e ; \n"..., source_end_p=0x5670bbe4 <buffer.lto_priv+260> "") at jerryscript/jerry-core/parser/js/js-scanner.c:2273 #9 0x56611832 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x5670bae0 <buffer.lto_priv> "function id_0 ( ) { } \nvar x = function ( ) { throw \"x\" ; \n} ; \nvar y = function ( ) { throw \"y\" ; \n} ; \ntry { id_1 ( x ( ) , y ( ) ) ; \nprint ( false ) ; \n} catch ( e ) { if ( e === \"y\" ) { var e ; \n"..., source_size=260, parse_opts=0, error_location_p=0xffffc6d0) at jerryscript/jerry-core/parser/js/js-parser.c:1840 #10 0x56615741 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x5670bae0 <buffer.lto_priv> "function id_0 ( ) { } \nvar x = function ( ) { throw \"x\" ; \n} ; \nvar y = function ( ) { throw \"y\" ; \n} ; \ntry { id_1 ( x ( ) , y ( ) ) ; \nprint ( false ) ; \n} catch ( e ) { if ( e === \"y\" ) { var e ; \n"..., source_size=260, parse_opts=0, bytecode_data_p=0xffffc790) at jerryscript/jerry-core/parser/js/js-parser.c:2443 #11 0x56676151 in jerry_parse (resource_name_p=0xffffcd98 "/home/reni/.fuzzinator_14762//jerryscript/picireny/304041482045963303880035536015562381295.js", resource_name_length=93, source_p=0x5670bae0 <buffer.lto_priv> "function id_0 ( ) { } \nvar x = function ( ) { throw \"x\" ; \n} ; \nvar y = function ( ) { throw \"y\" ; \n} ; \ntry { id_1 ( x ( ) , y ( ) ) ; \nprint ( false ) ; \n} catch ( e ) { if ( e === \"y\" ) { var e ; \n"..., source_size=260, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:445 #12 0x56672ed7 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:731 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion !(type & SCANNER_LITERAL_IS_VAR) in scanner_pop_literal_pool
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3303/comments
2
2019-11-12T02:21:20Z
2019-11-27T11:05:32Z
https://github.com/jerryscript-project/jerryscript/issues/3303
521,289,042
3,303
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 452c7818 ###### Build platform Linux-4.15.0-62-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 g ( a, b = a ) { function a ( ) { } function $ ( ) { } eval ( "" ) } g ( ); $ = function ( ) { function x ( ) { } } function j ( ) { } ``` ###### Output ```text ICE: Assertion 'frame_ctx_p->registers_p + register_end + frame_ctx_p->context_depth == stack_top_p' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):3588. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a737 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56604cd3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56604d14 in jerry_assert_fail (assertion=0x566c4c60 "frame_ctx_p->registers_p + register_end + frame_ctx_p->context_depth == stack_top_p", file=0x566c34c0 "jerryscript/jerry-core/vm/vm.c", function=0x566a44e0 <__func__.6257.lto_priv.437> "vm_loop", line=3588) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565ebe55 in vm_loop (frame_ctx_p=0xffffc430) at jerryscript/jerry-core/vm/vm.c:3588 #7 0x565ecfd6 in vm_execute (frame_ctx_p=0xffffc430, arg_p=0xffffc678, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3743 #8 0x565ed978 in vm_run (bytecode_header_p=0xf4f01ea0, this_binding_value=4126149459, lex_env_p=0xf5d00370, parse_opts=0, arg_list_p=0xffffc678, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3871 #9 0x566346c3 in ecma_op_function_call (func_obj_p=0xf5f005b0, this_arg_value=72, arguments_list_p=0xffffc678, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:851 #10 0x565da4f4 in opfunc_call (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:583 #11 0x565ed036 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3749 #12 0x565ed978 in vm_run (bytecode_header_p=0xf49031d0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3871 #13 0x565d977c in vm_run_global (bytecode_p=0xf49031d0) at jerryscript/jerry-core/vm/vm.c:283 #14 0x566767aa in jerry_run (func_val=4126148163) at jerryscript/jerry-core/api/jerry.c:595 #15 0x56672f20 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion frame_ctx_p->registers_p + register_end + frame_ctx_p->context_depth == stack_top_p in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3302/comments
0
2019-11-11T21:35:28Z
2019-11-13T11:35:32Z
https://github.com/jerryscript-project/jerryscript/issues/3302
521,200,434
3,302
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 452c7818 ###### Build platform Linux-4.15.0-62-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 y = 6 function i ( a , b = ( y ) + 2 , c = typeof id_0 ) { function x ( ) { } eval ( "//Single Line Comments\u2029 var =;" ) c === "undefined" print ( y === 10 ) ( id_2 === 11 ) } i ( ) ``` ###### Output ```text ================================================================= ==38698==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4001611 at pc 0x5665e909 bp 0xffbb4888 sp 0xffbb4878 READ of size 1 at 0xf4001611 thread T0 #0 0x5665e908 in vm_loop jerryscript/jerry-core/vm/vm.c:1058 #1 0x5666efd5 in vm_execute jerryscript/jerry-core/vm/vm.c:3743 #2 0x5666f977 in vm_run jerryscript/jerry-core/vm/vm.c:3871 #3 0x566b66c2 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:851 #4 0x5665c4f3 in opfunc_call jerryscript/jerry-core/vm/vm.c:583 #5 0x5666f035 in vm_execute jerryscript/jerry-core/vm/vm.c:3749 #6 0x5666f977 in vm_run jerryscript/jerry-core/vm/vm.c:3871 #7 0x5665b77b in vm_run_global jerryscript/jerry-core/vm/vm.c:283 #8 0x566f87a9 in jerry_run jerryscript/jerry-core/api/jerry.c:595 #9 0x566f4f1f in main jerryscript/jerry-main/main-unix.c:740 #10 0xf778be80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #11 0x565ee700 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x17700) Address 0xf4001611 is a wild pointer. SUMMARY: AddressSanitizer: heap-buffer-overflow jerryscript/jerry-core/vm/vm.c:1058 in vm_loop Shadow bytes around the buggy address: 0x3e800270: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e800280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e800290: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8002a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8002b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3e8002c0: fa fa[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8002d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8002e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e8002f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e800300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e800310: 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 ==38698==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
heap-buffer-overflow in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3300/comments
0
2019-11-11T20:33:05Z
2019-11-13T11:35:31Z
https://github.com/jerryscript-project/jerryscript/issues/3300
521,172,262
3,300
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 452c7818 ###### Build platform Linux-4.15.0-62-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 f (a, b = $+ function ( ) { } ( ), $) { } var $ = { $: function ($) { }} f( ) function duplicatedArg ( a , b = d , c ) { try { var eval var id_1 if ( id_2 === eval ( ) ) { } } finally { } } duplicatedArg(1, 2) ``` ###### Output ```text ================================================================= ==28355==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0xff8995bc at pc 0x56651975 bp 0xff899088 sp 0xff899078 READ of size 4 at 0xff8995bc thread T0 #0 0x56651974 in vm_loop jerryscript/jerry-core/vm/vm.c:2240 #1 0x5665a913 in vm_execute jerryscript/jerry-core/vm/vm.c:3743 #2 0x5665b25c in vm_run jerryscript/jerry-core/vm/vm.c:3871 #3 0x565fbff3 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:851 #4 0x5664805c in opfunc_call jerryscript/jerry-core/vm/vm.c:583 #5 0x5665a973 in vm_execute jerryscript/jerry-core/vm/vm.c:3749 #6 0x5665b25c in vm_run jerryscript/jerry-core/vm/vm.c:3871 #7 0x56647340 in vm_run_global jerryscript/jerry-core/vm/vm.c:283 #8 0x565b11ac in jerry_run jerryscript/jerry-core/api/jerry.c:595 #9 0x565adc82 in main jerryscript/jerry-main/main-unix.c:740 #10 0xf76e2750 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1e750) #11 0x565ab470 in _start (jerryscript/build/bin/jerry+0x16470) Address 0xff8995bc is located in stack of thread T0 at offset 556 in frame #0 0x56649e66 in vm_loop jerryscript/jerry-core/vm/vm.c:1004 This frame has 5 object(s): [32, 36) 'stack_top_p' [96, 100) 'ref_base_lex_env_p' [160, 164) 'this_value' [224, 228) 'ref_base_lex_env_p' [288, 292) 'expr_obj_value' <== Memory access at offset 556 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow jerryscript/jerry-core/vm/vm.c:2240 in vm_loop Shadow bytes around the buggy address: 0x3ff13260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff13270: 00 00 f1 f1 f1 f1 04 f2 f2 f2 f2 f2 f2 f2 04 f2 0x3ff13280: f2 f2 f2 f2 f2 f2 04 f2 f2 f2 f2 f2 f2 f2 04 f2 0x3ff13290: f2 f2 f2 f2 f2 f2 04 f2 f2 f2 f3 f3 f3 f3 00 00 0x3ff132a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x3ff132b0: 00 00 00 00 ca ca ca[ca]00 00 00 04 cb cb cb cb 0x3ff132c0: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 0x3ff132d0: 00 00 00 00 f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 0x3ff132e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff132f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ff13300: 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 ==28355==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
dynamic-stack-buffer-overflow in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3299/comments
0
2019-11-11T19:46:58Z
2019-11-13T11:35:31Z
https://github.com/jerryscript-project/jerryscript/issues/3299
521,152,024
3,299
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 452c7818 ###### Build platform Linux-4.15.0-62-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 $ = { $: function ( $) { } }; function g ( b = (local = $) ) { var o ; function f ( ) { return this === o } } g () ``` ###### Output ```text ICE: Assertion 'stack_top_p > frame_ctx_p->registers_p + register_end' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):1183. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a737 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56604cd3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56604d14 in jerry_assert_fail (assertion=0x566c3a80 "stack_top_p > frame_ctx_p->registers_p + register_end", file=0x566c34c0 "jerryscript/jerry-core/vm/vm.c", function=0x566a44e0 <__func__.6257.lto_priv.437> "vm_loop", line=1183) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565dd827 in vm_loop (frame_ctx_p=0xffffc430) at jerryscript/jerry-core/vm/vm.c:1183 #7 0x565ecfd6 in vm_execute (frame_ctx_p=0xffffc430, arg_p=0xffffc674, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3743 #8 0x565ed978 in vm_run (bytecode_header_p=0xf6301220, this_binding_value=4126149459, lex_env_p=0xf5d002f0, parse_opts=0, arg_list_p=0xffffc674, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3871 #9 0x566346c3 in ecma_op_function_call (func_obj_p=0xf5f00490, this_arg_value=72, arguments_list_p=0xffffc674, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:851 #10 0x565da4f4 in opfunc_call (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:583 #11 0x565ed036 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3749 #12 0x565ed978 in vm_run (bytecode_header_p=0xf4d03dc0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3871 #13 0x565d977c in vm_run_global (bytecode_p=0xf4d03dc0) at jerryscript/jerry-core/vm/vm.c:283 #14 0x566767aa in jerry_run (func_val=4126148115) at jerryscript/jerry-core/api/jerry.c:595 #15 0x56672f20 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion stack_top_p > frame_ctx_p->registers_p + register_end in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3298/comments
0
2019-11-11T19:27:15Z
2019-11-13T11:35:31Z
https://github.com/jerryscript-project/jerryscript/issues/3298
521,142,597
3,298
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 452c7818 ###### Build platform Linux-4.15.0-62-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 "98765".replace(76, function ( ) { return $ }) ``` ###### Output ```text Script Error: ReferenceError: a is not defined 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 ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a737 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56604cd3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56604d14 in jerry_assert_fail (assertion=0x566c7980 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566c7920 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5669c9e0 <__func__.4861.lto_priv.111> "jmem_heap_finalize", line=107) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56603ea4 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:107 #7 0x56603cd4 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x56675a8b in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:252 #9 0x5667373d in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:938 ``` <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/3297/comments
0
2019-11-11T19:20:36Z
2019-11-12T09:54:27Z
https://github.com/jerryscript-project/jerryscript/issues/3297
521,139,577
3,297
[ "jerryscript-project", "jerryscript" ]
In [tools] directory there are several *.sh scripts that are supposed to work for debian/ubuntu dependency installation for lib building. Let's take **apt-get-install-deps.sh** When I try to build in jenkins/docker I get this error (I use **FROM debian:stretch**): ``` [2019-11-07T04:44:32.865Z] tools/apt-get-install-deps.sh: line 17: sudo: command not found [2019-11-07T04:44:32.866Z] tools/apt-get-install-deps.sh: line 18: sudo: command not found ``` Reason is simple, since it is docker, you are root by the default, and root requires no sudo (and sudo is not installed by the default). Yes we can install sudo earlier and/or add the user to the sudo group, but there is also solution I use for another scripts, which are building another libraries: ``` #!/bin/bash if [ "$(whoami)" != "root" ]; then SUDO=sudo fi # Copyright JS Foundation and other contributors, http://js.foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ${SUDO} apt-get update -q ${SUDO} apt-get install -q -y \ make cmake \ gcc gcc-multilib \ doxygen \ cppcheck vera++ python pylint python-serial ``` May be it would be a good idea to add that to all *.sh scripts?
Fixing "sudo" usage for dependency installation
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3288/comments
2
2019-11-07T12:26:50Z
2019-11-14T09:20:31Z
https://github.com/jerryscript-project/jerryscript/issues/3288
519,236,077
3,288
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 859954b3 ###### Build platform Linux-4.15.0-62-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 let b ( undefined ) { { print ( ) } { eval ( 'function b() {};' ) } print ( ) } ``` ###### Output ```text ICE: Assertion 'property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE)' failed at jerryscript/jerry-core/vm/vm.c(vm_init_loop):926. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a63c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565fe7f1 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565fe832 in jerry_assert_fail (assertion=0x566be360 "property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE)", file=0x566bdf00 "jerryscript/jerry-core/vm/vm.c", function=0x5669e9e0 <__func__.6176.lto_priv.445> "vm_init_loop", line=926) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565da9a7 in vm_init_loop (frame_ctx_p=0xffffbf80) at jerryscript/jerry-core/vm/vm.c:926 #7 0x565e677b in vm_loop (frame_ctx_p=0xffffbf80) at jerryscript/jerry-core/vm/vm.c:2968 #8 0x565ebaa2 in vm_execute (frame_ctx_p=0xffffbf80, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3727 #9 0x565ec444 in vm_run (bytecode_header_p=0xf5300d90, this_binding_value=4126149459, lex_env_p=0xf5d005d0, parse_opts=66, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3855 #10 0x565d867c in vm_run_eval (bytecode_data_p=0xf5300d90, parse_opts=66) at jerryscript/jerry-core/vm/vm.c:347 #11 0x56629017 in ecma_op_eval_chars_buffer (code_p=0xf5f0088c "function b() {};", code_buffer_size=16, parse_opts=66) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:116 #12 0x56628cda in ecma_op_eval (code_p=0xf5f00880, parse_opts=2) at jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #13 0x565bae5e in ecma_builtin_global_object_eval (x=4126148737) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:111 #14 0x565be623 in ecma_builtin_global_dispatch_routine (builtin_routine_id=74, this_arg=72, arguments_list_p=0xffffc3f0, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:1164 #15 0x56659a72 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_GLOBAL, builtin_routine_id=74, this_arg_value=72, arguments_list_p=0xffffc3f0, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1020 #16 0x56659cd3 in ecma_builtin_dispatch_call (obj_p=0xf5f00730, this_arg_value=72, arguments_list_p=0xffffc684, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1045 #17 0x5662b371 in ecma_op_function_call (func_obj_p=0xf5f00730, this_arg_value=72, arguments_list_p=0xffffc684, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:773 #18 0x565d921e in opfunc_call (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:583 #19 0x565ebb02 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3733 #20 0x565ec444 in vm_run (bytecode_header_p=0xf5b03880, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3855 #21 0x565d84a6 in vm_run_global (bytecode_p=0xf5b03880) at jerryscript/jerry-core/vm/vm.c:283 #22 0x5666fa22 in jerry_run (func_val=4126148691) at jerryscript/jerry-core/api/jerry.c:595 #23 0x5666c198 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:740 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion property_p == NULL || !(*property_p & ECMA_PROPERTY_FLAG_ENUMERABLE) in vm_init_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3286/comments
1
2019-11-06T23:32:07Z
2019-11-08T13:03:20Z
https://github.com/jerryscript-project/jerryscript/issues/3286
518,949,996
3,286
[ "jerryscript-project", "jerryscript" ]
When running the testcases below, jerryscript is hundred times slower than other engines with the same output. Maybe, it is an issue of jerryscript. ## Version [9ab4872](https://github.com/jerryscript-project/jerryscript/commit/9ab48722445c483a2b984fef609d13ab87894dea) ## Build step ``` python tools/build.py --clean --logging=on --line-info=on --error-messages=on --cpointer-32bit=on --mem-heap=1572864 --profile=es2015-subset ``` ## Testcase ``` var NISLFuzzingFunc = function(t) { var counter = 0; for (var i = 0; i < t ; i += 1) { counter += 1; } print (counter); }; var NISLParameter = 594755575; NISLFuzzingFunc(NISLParameter); ``` ## Command `jerryscript/build/bin/jerry testcase.js` ## Excution time jerryscript: `55602ms` V8: `486ms` spiderMonkey: `601ms` chakra: `343ms` javascriptCore: `477ms` ## Output `594755575`
A possible performance issue about 'for' loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3277/comments
2
2019-11-02T09:50:54Z
2019-11-06T10:41:05Z
https://github.com/jerryscript-project/jerryscript/issues/3277
516,552,502
3,277
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision f93fa98a ###### Build platform Linux-4.15.0-62-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 with ({ }) class ${ $( ) { $ } } ``` ###### Output ```text ICE: Assertion 'ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):1324. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ad5f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565fdf83 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565fdfc4 in jerry_assert_fail (assertion=0x566bc8a0 "ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE", file=0x566bc640 "jerryscript/jerry-core/vm/vm.c", function=0x5669d220 <__func__.6213.lto_priv.440> "vm_loop", line=1324) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565de57a in vm_loop (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:1324 #7 0x565ec334 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3727 #8 0x565ecc97 in vm_run (bytecode_header_p=0xf4f01ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3853 #9 0x565d8eca in vm_run_global (bytecode_p=0xf4f01ad0) at jerryscript/jerry-core/vm/vm.c:282 #10 0x5666e510 in jerry_run (func_val=4126148835) at jerryscript/jerry-core/api/jerry.c:595 #11 0x5666ac86 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:739 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3276/comments
1
2019-11-01T11:09:27Z
2019-11-19T14:44:13Z
https://github.com/jerryscript-project/jerryscript/issues/3276
516,050,729
3,276
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision f93fa98a ###### Build platform Linux-4.15.0-62-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 ( i in this ) class ${ } eval ( ) ``` ###### Output ```text ICE: Assertion 'ECMA_PROPERTY_VALUE_PTR (property_p)->value == ECMA_VALUE_UNINITIALIZED' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):1331. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ad5f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565fdf83 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565fdfc4 in jerry_assert_fail (assertion=0x566bcfa0 "ECMA_PROPERTY_VALUE_PTR (property_p)->value == ECMA_VALUE_UNINITIALIZED", file=0x566bc640 "jerryscript/jerry-core/vm/vm.c", function=0x5669d220 <__func__.6213.lto_priv.440> "vm_loop", line=1331) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565de73f in vm_loop (frame_ctx_p=0xffffc440) at jerryscript/jerry-core/vm/vm.c:1331 #7 0x565ec334 in vm_execute (frame_ctx_p=0xffffc440, arg_p=0xffffc684, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3727 #8 0x565ecc97 in vm_run (bytecode_header_p=0xf51028c0, this_binding_value=4126149459, lex_env_p=0xf5d00530, parse_opts=0, arg_list_p=0xffffc684, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3853 #9 0x5662a284 in ecma_op_function_call (func_obj_p=0xf5f008b0, this_arg_value=72, arguments_list_p=0xffffc684, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:812 #10 0x565d9c42 in opfunc_call (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:582 #11 0x565ec394 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3733 #12 0x565ecc97 in vm_run (bytecode_header_p=0xf5300e10, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3853 #13 0x565d8eca in vm_run_global (bytecode_p=0xf5300e10) at jerryscript/jerry-core/vm/vm.c:282 #14 0x5666e510 in jerry_run (func_val=4126148835) at jerryscript/jerry-core/api/jerry.c:595 #15 0x5666ac86 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:739 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ECMA_PROPERTY_VALUE_PTR (property_p)->value == ECMA_VALUE_UNINITIALIZED in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3275/comments
1
2019-11-01T07:46:25Z
2019-11-19T14:44:13Z
https://github.com/jerryscript-project/jerryscript/issues/3275
515,960,605
3,275
[ "jerryscript-project", "jerryscript" ]
Hello, I've found a possible security bug of JerryScript interpreter. Here is a simple example: ```JavaScript function bar(a) { print("should be 10 by 'a=10': ", a[0]); a.hasOwnProperty(0); print("should be 10, but 20: ", a[0]); } function foo(a) { print("should be 20: ", a); a = 10; bar(arguments); } foo(20); ``` I believe that the example code would be easily understandable. If we apply 'hasOwnProperty' for the properties of the 'arguments' object, it turns to the original argument value instead of the value overwritten by the program. It could leak a secret of a function argument if the function passes the argument object to an untrusted function. ###### JerryScript revision Up-to-date version: f93fa98a755aa4f557cb354f89a8d23e6460af58 ###### Build platform Mac OS X 10.15 (Darwin 19.0.0 x86_64) ###### Build steps ```sh tools/build.py --clean ``` Thank you.
Misbehavior of 'arguments' object after applying 'hasOwnProperty' function.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3271/comments
0
2019-10-31T14:44:05Z
2019-11-07T10:24:08Z
https://github.com/jerryscript-project/jerryscript/issues/3271
515,489,662
3,271
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision cc9a6574 ###### Build platform Linux-4.15.0-62-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 hasProp = $ => { } Object.preventExtensions(hasProp) Object.isSealed(hasProp) ``` ###### Output ```text ICE: Assertion 'ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDDATA || ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR || ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_VIRTUAL' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_is_property_configurable):1058. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac6f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x565fd872 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565fd8b3 in jerry_assert_fail (assertion=0x566ca400 "ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDDATA || ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR || ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_VI"..., file=0x566c93c0 "jerryscript/jerry-core/ecma/base/ecma-helpers.c", function=0x5668fba0 <__func__.5687.lto_priv.11> "ecma_is_property_configurable", line=1058) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566483f1 in ecma_is_property_configurable (property=0 '\000') at jerryscript/jerry-core/ecma/base/ecma-helpers.c:1056 #7 0x565ca30e in ecma_builtin_object_frozen_or_sealed_helper (obj_p=0xf5f015a0, mode=79) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object.c:504 #8 0x565cb50d in ecma_builtin_object_dispatch_routine (builtin_routine_id=79, this_arg=4126148259, arguments_list_p=0xffffc3e0, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object.c:976 #9 0x5665787a in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_OBJECT, builtin_routine_id=79, this_arg_value=4126148259, arguments_list_p=0xffffc3e0, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1019 #10 0x56657adb in ecma_builtin_dispatch_call (obj_p=0xf5f00550, this_arg_value=4126148259, arguments_list_p=0xffffc674, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1044 #11 0x56629224 in ecma_op_function_call (func_obj_p=0xf5f00550, this_arg_value=4126148259, arguments_list_p=0xffffc674, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:734 #12 0x565d996e in opfunc_call (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:582 #13 0x565ebc83 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3702 #14 0x565ec586 in vm_run (bytecode_header_p=0xf4f03c80, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3822 #15 0x565d8bf6 in vm_run_global (bytecode_p=0xf4f03c80) at jerryscript/jerry-core/vm/vm.c:282 #16 0x5666d813 in jerry_run (func_val=4126148547) at jerryscript/jerry-core/api/jerry.c:595 #17 0x56669f89 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:739 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDDATA || ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR || ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_VIRTUAL in ecma_is_property_configurable
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3267/comments
0
2019-10-31T09:36:14Z
2019-11-04T11:12:03Z
https://github.com/jerryscript-project/jerryscript/issues/3267
515,288,343
3,267
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1c345399 ###### Build platform Linux-4.15.0-62-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 (new Float64Array(Object('foobar').split())).every(function (p_0) { return p_0 }) ``` ###### Output ```text 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 ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657abcb in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5660134f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56601390 in jerry_assert_fail (assertion=0x566bef00 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566beea0 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x56694100 <__func__.4819.lto_priv.97> "jmem_heap_finalize", line=107) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56600597 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:107 #7 0x566003c7 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5666c141 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:252 #9 0x56669df3 in main (argc=2, argv=0xffffcb44) at jerryscript/jerry-main/main-unix.c:937 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3262/comments
0
2019-10-29T11:41:27Z
2019-10-31T10:08:17Z
https://github.com/jerryscript-project/jerryscript/issues/3262
513,859,552
3,262
[ "jerryscript-project", "jerryscript" ]
I tried to run example on ubuntu 16.04. I got a api-example-1 .c #include "jerryscript.h" int main (void) { const jerry_char_t script[] = "var str = 'Hello, World!';"; bool ret_value = jerry_run_simple (script, sizeof (script) - 1, JERRY_INIT_EMPTY); return (ret_value ? 0 : 1); } then run $ gcc api-example-1.c -o api-example-1 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-libm) api-example-1.c:(.text+0x5d): undefined reference to `jerry_run_simple' collect2: error: ld returned 1 exit status
error when run api-example-1 undefined reference to `jerry_run_simple'
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3255/comments
5
2019-10-28T08:18:55Z
2019-11-06T10:42:13Z
https://github.com/jerryscript-project/jerryscript/issues/3255
513,157,896
3,255
[ "jerryscript-project", "jerryscript" ]
Hello! At this moment I've tried to make dynamic memory allocation. Scripts that will be used are static, but i don't know exact memory consumption of them. Now memory allocation works like in tutorials: ``` void * context_alloc(size_t size, void *cb_data_p) { return malloc(size); } jerry_context_t* create_context(size_t context_size_in_KB) { return jerry_create_context(context_size_in_KB * 1024, context_alloc, NULL);; } void initial_context_create(size_t context_size_in_KB) { _context_pointer = create_context(context_size_in_KB); jerry_port_default_set_current_context(_context_pointer); } jerry_context_t* _context_pointer; main() { initial_context_create(1); jerry_init(JERRY_INIT_MEM_STATS); } ``` And tried to do something like this: ``` void * context_alloc(size_t size, void *cb_data_p) { return malloc(size); } jerry_context_t* create_context(size_t context_size_in_KB) { return jerry_create_context(context_size_in_KB * 1024, context_alloc, NULL);; } void initial_context_create(size_t context_size_in_KB) { _context_pointer = create_context(context_size_in_KB); jerry_port_default_set_current_context(_context_pointer); } void * resized_context_alloc(size_t size, void * prev_ptr) { return realloc(prev_ptr, size); } jerry_context_t* create_resized_context(size_t new_context_size_in_KB) { return jerry_create_context(new_context_size_in_KB * 1024, resized_context_alloc, _context_pointer);; } void enlarge_context(size_t new_context_size) { _context_pointer = create_resized_context(new_context_size); } jerry_context_t* _context_pointer; main() { initial_context_create(1); jerry_init(JERRY_INIT_MEM_STATS); enlarge_context(2); /* after that i should do something to reinitialize or edit enlarged _context_pointer, because it doesn't in it's internal structure heap_size is 1024 (as set previously) and i can not use enlarged allocated momery for the jerry_context_t (_context_pointer) */ /* if i try to do jerry_init() again, of course all allocated memory is available, but i'm loosing all context data (such as ecma objects, and other previously created objects and variables before enlarging). Because before jerry_init() i should do jerry_cleanup() */ } ``` Is there any possibility to enlarge existing jerry_context_t without loosing all the data. Thank You very much!
Reallocating memory of context. Need advice.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3254/comments
6
2019-10-27T20:01:41Z
2019-11-07T12:18:20Z
https://github.com/jerryscript-project/jerryscript/issues/3254
513,014,145
3,254
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 3d797b88 ###### Build platform Linux-4.15.0-62-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; export { a ``` ###### Output ```text ICE: Assertion 'page_p != NULL' failed at jerryscript/jerry-core/parser/js/js-parser-mem.c(parser_list_get):262. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a84f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5660c000 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5660c041 in jerry_assert_fail (assertion=0x566b4400 "page_p != NULL", file=0x566b4560 "jerryscript/jerry-core/parser/js/js-parser-mem.c", function=0x566a41c0 <__func__.4541.lto_priv.226> "parser_list_get", line=262) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565a50bd in parser_list_get (list_p=0xffffc5e4, index=32758) at jerryscript/jerry-core/parser/js/js-parser-mem.c:262 #7 0x565a911a in parser_module_parse_export_clause (context_p=0xffffc4c0) at jerryscript/jerry-core/parser/js/js-parser-module.c:373 #8 0x5656e7ae in parser_parse_export_statement (context_p=0xffffc4c0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2205 #9 0x5656fe44 in parser_parse_statements (context_p=0xffffc4c0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2527 #10 0x566194fe in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x56702560 <buffer.lto_priv> "export var a = 4 ; \nexport { a : a , get a ( ) { } } \n ", source_size=56, parse_opts=0, error_location_p=0xffffc6d0) at jerryscript/jerry-core/parser/js/js-parser.c:1933 #11 0x5661c7fd in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x56702560 <buffer.lto_priv> "export var a = 4 ; \nexport { a : a , get a ( ) { } } \n ", source_size=56, parse_opts=0, bytecode_data_p=0xffffc790) at jerryscript/jerry-core/parser/js/js-parser.c:2424 #12 0x56673c32 in jerry_parse (resource_name_p=0xffffcd98 "/home/reni/.fuzzinator_40520//jerryscript/picireny/270369854558273006763162611811125258409.js", resource_name_length=93, source_p=0x56702560 <buffer.lto_priv> "export var a = 4 ; \nexport { a : a , get a ( ) { } } \n ", source_size=56, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #13 0x566709c4 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:730 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion page_p != NULL in parser_list_get
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3253/comments
0
2019-10-26T18:40:38Z
2019-10-28T14:30:48Z
https://github.com/jerryscript-project/jerryscript/issues/3253
512,870,406
3,253
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 3d797b88 ###### Build platform Linux-4.15.0-62-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 NoParent ( ) { } Number.constructor( NoParent, Symbol.hasInstance, { }) ``` ###### Output ```text ICE: Assertion 'ecma_string_p != NULL' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_make_string_value):549. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657a84f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5660c000 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5660c041 in jerry_assert_fail (assertion=0x566cc080 "ecma_string_p != NULL", file=0x566cbde0 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x566900a0 <__func__.4204.lto_priv.742> "ecma_make_string_value", line=549) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56653128 in ecma_make_string_value (ecma_string_p=0x0) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:549 #7 0x565b9f16 in ecma_builtin_function_helper_get_function_arguments (arguments_list_p=0xffffc670, arguments_list_len=3) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:114 #8 0x565ba05a in ecma_builtin_function_dispatch_construct (arguments_list_p=0xffffc670, arguments_list_len=3) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:131 #9 0x565b9d55 in ecma_builtin_function_dispatch_call (arguments_list_p=0xffffc670, arguments_list_len=3) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:59 #10 0x56668eb4 in ecma_builtin_dispatch_call (obj_p=0xf5f00520, this_arg_value=4126147923, arguments_list_p=0xffffc670, arguments_list_len=3) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1056 #11 0x56637ece in ecma_op_function_call (func_obj_p=0xf5f00520, this_arg_value=4126147923, arguments_list_p=0xffffc670, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #12 0x565e2eea in opfunc_call (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:581 #13 0x565f5299 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3719 #14 0x565f5b9c in vm_run (bytecode_header_p=0xf4f03d80, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3839 #15 0x565e2193 in vm_run_global (bytecode_p=0xf4f03d80) at jerryscript/jerry-core/vm/vm.c:282 #16 0x56674285 in jerry_run (func_val=4126148403) at jerryscript/jerry-core/api/jerry.c:576 #17 0x56670a0d in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:739 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_string_p != NULL in ecma_make_string_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3252/comments
0
2019-10-26T08:08:29Z
2019-10-28T13:23:54Z
https://github.com/jerryscript-project/jerryscript/issues/3252
512,806,134
3,252
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 4b352758 ###### Build platform Linux-4.15.0-62-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 arrowFn = () => { } arrowFn.prototype('caller') ``` ###### Output ```text ICE: Assertion 'ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_FUNCTION || ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION' failed at jerryscript/jerry-core/ecma/operations/ecma-function-object.c(ecma_op_lazy_instantiate_prototype_object):1216. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579e4c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56612da3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612de4 in jerry_assert_fail (assertion=0x566c2f80 "ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_FUNCTION || ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION", file=0x566c1f60 "jerryscript/jerry-core/ecma/operations/ecma-function-object.c", function=0x5668dd40 <__func__.6153.lto_priv.584> "ecma_op_lazy_instantiate_prototype_object", line=1216) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56640b2a in ecma_op_lazy_instantiate_prototype_object (object_p=0xf5f00940) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1215 #7 0x56640dbb in ecma_op_function_try_to_lazy_instantiate_property (object_p=0xf5f00940, property_name_p=0x194d) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1265 #8 0x566009b9 in ecma_op_object_find_own (base_value=4126148931, object_p=0xf5f00940, property_name_p=0x194d) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:637 #9 0x5660101d in ecma_op_object_get (object_p=0xf5f00940, property_name_p=0x194d) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:811 #10 0x565e481c in vm_op_get_value (object=4126148931, property=6477) at jerryscript/jerry-core/vm/vm.c:111 #11 0x565ec75c in vm_loop (frame_ctx_p=0xffffc6e0) at jerryscript/jerry-core/vm/vm.c:1796 #12 0x565f6a1e in vm_execute (frame_ctx_p=0xffffc6e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3598 #13 0x565f7381 in vm_run (bytecode_header_p=0xf5300ed0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3724 #14 0x565e4b2b in vm_run_global (bytecode_p=0xf5300ed0) at jerryscript/jerry-core/vm/vm.c:282 #15 0x566713c7 in jerry_run (func_val=4126148979) at jerryscript/jerry-core/api/jerry.c:576 #16 0x5666db4f in main (argc=2, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:739 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_FUNCTION || ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION in ecma_op_lazy_instantiate_prototype_object
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3250/comments
0
2019-10-25T16:02:27Z
2019-10-28T09:33:29Z
https://github.com/jerryscript-project/jerryscript/issues/3250
512,596,682
3,250
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 59e0d6e2 ###### Build platform Linux-4.15.0-62-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 (new Int8Array((new ArrayBuffer), 1, Infinity)).map(function() { }) ``` ###### Output ```text ICE: Assertion 'ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):749. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579ec6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56613040 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56613081 in jerry_assert_fail (assertion=0x566c7e40 "ecma_is_value_object (value)", file=0x566c7820 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x5668ae20 <__func__.4247.lto_priv.711> "ecma_get_object_from_value", line=749) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56658cd2 in ecma_get_object_from_value (value=24) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:749 #7 0x56611de3 in ecma_op_create_typedarray_with_type_and_length (obj_p=0xf5f02080, array_length=4294967295) at jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:1194 #8 0x5662b54d in ecma_builtin_typedarray_prototype_map (this_arg=4126154883, cb_func_val=4126154739, cb_this_arg=72) at jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:454 #9 0x5662a2ba in ecma_builtin_typedarray_prototype_dispatch_routine (builtin_routine_id=82, this_arg_value=4126154883, arguments_list=0xffffc400, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:62 #10 0x56629524 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, builtin_routine_id=82, this_arg_value=4126154883, arguments_list_p=0xffffc400, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #11 0x56629785 in ecma_builtin_dispatch_call (obj_p=0xf5f02050, this_arg_value=4126154883, arguments_list_p=0xffffc698, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #12 0x566401ec in ecma_op_function_call (func_obj_p=0xf5f02050, this_arg_value=4126154883, arguments_list_p=0xffffc698, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #13 0x565e5200 in opfunc_call (frame_ctx_p=0xffffc710) at jerryscript/jerry-core/vm/vm.c:581 #14 0x565f63fc in vm_execute (frame_ctx_p=0xffffc710, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3604 #15 0x565f6cff in vm_run (bytecode_header_p=0xf4f03680, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3724 #16 0x565e44a9 in vm_run_global (bytecode_p=0xf4f03680) at jerryscript/jerry-core/vm/vm.c:282 #17 0x56671f58 in jerry_run (func_val=4126147539) at jerryscript/jerry-core/api/jerry.c:576 #18 0x5666e6a0 in main (argc=2, argv=0xffffcb44) at jerryscript/jerry-main/main-unix.c:739 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
Assertion ecma_is_value_object (value) in ecma_get_object_from_value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3247/comments
5
2019-10-22T20:49:23Z
2019-10-25T10:37:21Z
https://github.com/jerryscript-project/jerryscript/issues/3247
510,902,912
3,247
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 7b589d13 ###### Build platform Linux-4.15.0-62-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 (new Int8Array((new ArrayBuffer()), 1, Infinity)).reverse() ``` ###### Output ```text ================================================================= ==33841==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4202a7f at pc 0xf7a058be bp 0xffb1d2e8 sp 0xffb1ceb8 READ of size 1 at 0xf4202a7f thread T0 #0 0xf7a058bd (/usr/lib32/libasan.so.4+0x778bd) #1 0x566812d0 in ecma_builtin_typedarray_prototype_reverse jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:810 #2 0x5667e467 in ecma_builtin_typedarray_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:66 #3 0x5667d523 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #4 0x5667d784 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #5 0x566941eb in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #6 0x566391ff in opfunc_call jerryscript/jerry-core/vm/vm.c:581 #7 0x5664a3fb in vm_execute jerryscript/jerry-core/vm/vm.c:3604 #8 0x5664acfe in vm_run jerryscript/jerry-core/vm/vm.c:3724 #9 0x566384a8 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #10 0x566c5f57 in jerry_run jerryscript/jerry-core/api/jerry.c:576 #11 0x566c269f in main jerryscript/jerry-main/main-unix.c:739 #12 0xf77ade80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #13 0x565c0010 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x17010) 0xf4202a7f is located 1 bytes to the left of 3384-byte region [0xf4202a80,0xf42037b8) allocated by thread T0 here: #0 0xf7a73f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566663bb in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x56666499 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x5666652c in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:322 #4 0x5664ae24 in ecma_alloc_extended_object jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x566ae383 in ecma_create_object jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x5668c2a9 in ecma_arraybuffer_new_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x5668c71f in ecma_op_create_arraybuffer_object jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x56608687 in ecma_builtin_arraybuffer_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x5667da0a in ecma_builtin_dispatch_construct jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1080 #10 0x5669501b in ecma_op_function_construct jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #11 0x56639780 in opfunc_construct jerryscript/jerry-core/vm/vm.c:665 #12 0x5664a41b in vm_execute jerryscript/jerry-core/vm/vm.c:3616 #13 0x5664acfe in vm_run jerryscript/jerry-core/vm/vm.c:3724 #14 0x566384a8 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #15 0x566c5f57 in jerry_run jerryscript/jerry-core/api/jerry.c:576 #16 0x566c269f in main jerryscript/jerry-main/main-unix.c:739 #17 0xf77ade80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.4+0x778bd) Shadow bytes around the buggy address: 0x3e8404f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840510: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840520: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840530: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3e840540: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa] 0x3e840550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e840560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e840570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e840580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3e840590: 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 ==33841==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
heap-buffer-overflow in ecma_builtin_typedarray_prototype_reverse
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3243/comments
0
2019-10-22T12:51:29Z
2019-10-25T10:36:24Z
https://github.com/jerryscript-project/jerryscript/issues/3243
510,634,501
3,243
[ "jerryscript-project", "jerryscript" ]
###### Revision 7b589d1 ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-62-generic #69-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arrayBufferVar1 = new ArrayBuffer(12, 8); var arrayVar1 = new Uint8Array(arrayBufferVar1, 9); arrayVar1.lastIndexOf(15, -Math.LOG10E); ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==72646==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5500f34 at pc 0x567145e3 bp 0xffaf12d8 sp 0xffaf12c8 READ of size 1 at 0xf5500f34 thread T0 #0 0x567145e2 in ecma_typedarray_get_uint8_element /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:56 #1 0x566d0a39 in ecma_builtin_typedarray_prototype_index_helper /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1773 #2 0x566d0c6d in ecma_builtin_typedarray_prototype_last_index_of /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1815 #3 0x566c4754 in ecma_builtin_typedarray_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:74 #4 0x566c345b in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #5 0x566c36bc in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #6 0x566eb742 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #7 0x567802b7 in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #8 0x56795401 in vm_execute /jerryscript/jerry-core/vm/vm.c:3604 #9 0x56795cb0 in vm_run /jerryscript/jerry-core/vm/vm.c:3724 #10 0x5677f117 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #11 0x5663021a in jerry_run /jerryscript/jerry-core/api/jerry.c:576 #12 0x5662ca11 in main /jerryscript/jerry-main/main-unix.c:739 #13 0xf77a4e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #14 0x5662a2f0 (/home/fuzzing/jerryscript/tmpmaster/jerry+0x162f0) 0xf5500f34 is located 0 bytes to the right of 36-byte region [0xf5500f10,0xf5500f34) allocated by thread T0 here: #0 0xf7a4af34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x5671b9ab in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:254 #2 0x5671ba23 in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:289 #3 0x566612ab in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:322 #4 0x566612ab in ecma_alloc_extended_object /jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x566612ab in ecma_create_object /jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x566d9516 in ecma_arraybuffer_new_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x566d9a76 in ecma_op_create_arraybuffer_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x56680ea1 in ecma_builtin_arraybuffer_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x566c3950 in ecma_builtin_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1080 #10 0x566ecd47 in ecma_op_function_construct /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #11 0x567808d6 in opfunc_construct /jerryscript/jerry-core/vm/vm.c:665 #12 0x56795427 in vm_execute /jerryscript/jerry-core/vm/vm.c:3616 #13 0x56795cb0 in vm_run /jerryscript/jerry-core/vm/vm.c:3724 #14 0x5677f117 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #15 0x5663021a in jerry_run /jerryscript/jerry-core/api/jerry.c:576 #16 0x5662ca11 in main /jerryscript/jerry-main/main-unix.c:739 #17 0xf77a4e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:56 in ecma_typedarray_get_uint8_element Shadow bytes around the buggy address: 0x3eaa0190: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa01a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa01b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa01c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa01d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3eaa01e0: fa fa 00 00 00 00[04]fa fa fa fd fd fd fd fd fa 0x3eaa01f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa0200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa0210: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa0220: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3eaa0230: 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 ==72646==ABORTING ```
heap-buffer-overflow in ecma_typedarray_get_uint8_element
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3237/comments
0
2019-10-21T18:20:54Z
2019-12-09T11:07:28Z
https://github.com/jerryscript-project/jerryscript/issues/3237
510,181,883
3,237
[ "jerryscript-project", "jerryscript" ]
According to ES5.1, for method [Number.prototype.toString ( [ radix ] )](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.7.4.2), if ToInteger(radix) is not an integer between 2 and 36 inclusive throw a RangeError exception. But, Jerry did not throw a RangeError exception when running the following test case. ###### JerryScript revision [7df87b7](https://github.com/jerryscript-project/jerryscript/commit/7df87b7778124af9b0dd309570c33864a67792f7) ###### 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(e) { var tmp = Number(0).toString(e); print(tmp); }; var NISLParameter4 = "hello jerry"; NISLFuzzingFunc(NISLParameter4); ``` ###### Execution steps ``` build/bin/jerry testcase.js ``` ###### Output `0` ###### Expected behavior Throw a RangeError exception
An issue about method Number.prototype.toString
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3229/comments
2
2019-10-18T03:48:24Z
2019-10-29T07:35:55Z
https://github.com/jerryscript-project/jerryscript/issues/3229
508,837,544
3,229
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision fd8203ce ###### Build platform Linux-4.15.0-62-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 v0 = (Array((((new String).split().constructor)(Symbol( ))))) var $ = (new Uint8ClampedArray).set((new ((new constructor).constructor(this).Uint32Array)), v0) ``` ###### Output ```text 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 ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579898 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x56615119 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661515a in jerry_assert_fail (assertion=0x566b7ae0 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566b7a80 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x5668afe0 <__func__.4737.lto_priv.141> "jmem_heap_finalize", line=107) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56614357 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:107 #7 0x5661417d in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5666cbba in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:233 #9 0x5666a89c in main (argc=2, argv=0xffffcb44) at jerryscript/jerry-main/main-unix.c:937 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3222/comments
0
2019-10-16T21:10:24Z
2019-10-17T09:56:15Z
https://github.com/jerryscript-project/jerryscript/issues/3222
508,101,259
3,222
[ "jerryscript-project", "jerryscript" ]
Hello, I have my-own implementation of `setInterval(callback, interval)` written in C. When I run the below code, heap memory usage is increasing every callback call and finally system is stuck due to the lac of memory. ```js setInterval(function () { var t = millis(); console.log ("Current time is ", t, "ms."); }, 100); ``` In our system, there is the main even loop. In the event loop, check interval time and call the callback using `jerry_call_function()`. Every callback call results memory consumption, but garbages are not collected even if `jerry_gc()` is called. Like below code, heap memory is not increased if the callback is not generates garbages (like without `var t = millis();`). ```js setInterval(function () { console.log ("Current time is unknown"); }, 100); ``` Same phenomenon is observed in all cases that javascript callback function is called using `jerry_call_function()` from C code side. (Timer callback, UART data read callback, etc.) For more info: - [setInterval() implementation](https://github.com/kameleon-project/kameleon/blob/master/src/global.c#L317) - [the code calling callback](https://github.com/kameleon-project/kameleon/blob/master/src/global.c#L282) What I'm doing wrong? Any advices? Thank you.
GC is not work for garbages generated by function called by `jerry_call_function()` in C code side
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3218/comments
2
2019-10-15T14:18:58Z
2019-10-15T17:39:07Z
https://github.com/jerryscript-project/jerryscript/issues/3218
507,277,018
3,218
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision [84a56ef](https://github.com/jerryscript-project/jerryscript/commit/84a56efd4fc64ae33a11f657d21b2eaa966e8d4b) ###### Build platform `Ubuntu 18.04.2 LTS (Linux 4.18.0-20-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 --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset \ --line-info=on --cpointer-32bit=on --mem-heap=1572864 ``` ###### Test case ``` var NISLFuzzingFunc = function(size) { var array = new Array(size); print(array.length); while (size--){ array[size] = 0; } }; var NISLParameter0 = 165537; NISLFuzzingFunc(NISLParameter0); ``` ###### Execution steps ``` ./jerryscript/build/bin/jerry testcase.js ``` ###### Output ``` 165537 ICE: Assertion 'entry_index <= mask' failed at jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c(ecma_property_hashmap_create):185. Error: ERR_FAILED_INTERNAL_ASSERTION Aborted (core dumped) ``` ###### Backtrace ``` #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7820452 in raise () from /lib32/libc.so.6 #2 0xf7821871 in abort () from /lib32/libc.so.6 #3 0x56579ce5 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5661568d in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566156ce in jerry_assert_fail (assertion=0x566c8c40 "entry_index <= mask", file=0x566c8b60 "jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c", function=0x56686800 <__func__.5304.lto_priv.665> "ecma_property_hashmap_create", line=185) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5665e8d8 in ecma_property_hashmap_create (object_p=0xf5f007c0) at jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c:185 #7 0x5665ee84 in ecma_property_hashmap_insert (object_p=0xf5f007c0, name_p=0x34d3f5, property_pair_p=0xf4190310, property_index=0) at jerryscript/jerry-core/ecma/base/ecma-property-hashmap.c:262 #8 0x56658393 in ecma_create_property (object_p=0xf5f007c0, name_p=0x34d3f5, type_and_flags=29 '\035', value=..., out_prop_p=0x0) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:389 #9 0x56658ac3 in ecma_create_named_data_property (object_p=0xf5f007c0, name_p=0x34d3f5, prop_attributes=28 '\034', out_prop_p=0x0) at jerryscript/jerry-core/ecma/base/ecma-helpers.c:486 #10 0x56604c26 in ecma_op_object_put (object_p=0xf5f007c0, property_name_p=0x34d3f5, value=0, is_throw=false) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1269 #11 0x565e5c12 in vm_op_set_value (object=4126148547, property=1731056, value=0, is_strict=false) at jerryscript/jerry-core/vm/vm.c:212 #12 0x565f6779 in vm_loop (frame_ctx_p=0xffffc710) at jerryscript/jerry-core/vm/vm.c:3363 #13 0x565f80e5 in vm_execute (frame_ctx_p=0xffffc710, arg_p=0xffffc964, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3630 #14 0x565f8abf in vm_run (bytecode_header_p=0xf5301ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0xffffc964, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3756 #15 0x5663e57f in ecma_op_function_call (func_obj_p=0xf5f00850, this_arg_value=72, arguments_list_p=0xffffc964, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #16 0x565e6a43 in opfunc_call (frame_ctx_p=0xffffc9d0) at jerryscript/jerry-core/vm/vm.c:581 #17 0x565f8145 in vm_execute (frame_ctx_p=0xffffc9d0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3636 #18 0x565f8abf in vm_run (bytecode_header_p=0xf6301520, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3756 #19 0x565e5cda in vm_run_global (bytecode_p=0xf6301520) at jerryscript/jerry-core/vm/vm.c:282 #20 0x5666e0a8 in jerry_run (func_val=4126148787) at jerryscript/jerry-core/api/jerry.c:576 #21 0x5666a8b0 in main (argc=2, argv=0xffffce04) at jerryscript/jerry-main/main-unix.c:735 ```
Assertion entry_index <= mask failed in ecma_property_hashmap_create
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3216/comments
1
2019-10-15T02:30:43Z
2019-10-16T11:59:44Z
https://github.com/jerryscript-project/jerryscript/issues/3216
506,966,869
3,216
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 84a56efd ###### Build platform Linux-4.15.0-62-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 $ = { $ ( ){ } } = { g ( ) { ( ) => m ++ ( ) } } = class extends C { constructor ( ) { super () } } ``` ###### Output ```text ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2555. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579778 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30 #4 0x5661440e in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661444f in jerry_assert_fail (assertion=0x566ae1c0 "context.status_flags & PARSER_SCANNING_SUCCESSFUL", file=0x566ade80 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x56690340 <__func__.5511.lto_priv.462> "parser_parse_source", line=2555) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565d082b in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566f3c00 <buffer.lto_priv> "var id_0 ; \nvar called = false ; \nfunction f ( ) { } \nvar B = class extends f { constructor ( ) { eval ( ) ; \nsuper ( id_1 ) \nthis .g ( ) \n} } \nC = class extends B { g ( ) { ( m ) => m ++ ( ) \n} } \nD "..., source_size=319, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2555 #7 0x565d307d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566f3c00 <buffer.lto_priv> "var id_0 ; \nvar called = false ; \nfunction f ( ) { } \nvar B = class extends f { constructor ( ) { eval ( ) ; \nsuper ( id_1 ) \nthis .g ( ) \n} } \nC = class extends B { g ( ) { ( m ) => m ++ ( ) \n} } \nD "..., source_size=319, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:3003 #8 0x5666bff8 in jerry_parse (resource_name_p=0xffffcd8e "/home/reni/.fuzzinator_12160//jerryscript/picireny/33680886534313296745214480367664733813.js", resource_name_length=92, source_p=0x566f3c00 <buffer.lto_priv> "var id_0 ; \nvar called = false ; \nfunction f ( ) { } \nvar B = class extends f { constructor ( ) { eval ( ) ; \nsuper ( id_1 ) \nthis .g ( ) \n} } \nC = class extends B { g ( ) { ( m ) => m ++ ( ) \n} } \nD "..., source_size=319, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #9 0x56668df1 in main (argc=2, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:726 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context.status_flags & PARSER_SCANNING_SUCCESSFUL in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3214/comments
4
2019-10-11T16:03:11Z
2019-10-15T00:52:09Z
https://github.com/jerryscript-project/jerryscript/issues/3214
505,935,989
3,214
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision eb978605 ###### Build platform Linux-4.15.0-62-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 (new Int16Array(7029)).subarray(5812).reduce(function() { }) ``` ###### Output ```text ================================================================= ==439==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4205be8 at pc 0xf799c8be bp 0xff856628 sp 0xff8561f8 READ of size 2 at 0xf4205be8 thread T0 #0 0xf799c8bd (/usr/lib32/libasan.so.4+0x778bd) #1 0x566ca063 in ecma_typedarray_get_int16_element.lto_priv.150 jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:67 #2 0x566ea980 in ecma_builtin_typedarray_prototype_reduce_with_direction jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:582 #3 0x566eacc2 in ecma_builtin_typedarray_prototype_reduce jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:642 #4 0x566e89fa in ecma_builtin_typedarray_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:63 #5 0x566e7bdb in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #6 0x566e7e3c in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #7 0x566fe5e3 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #8 0x566a0b98 in opfunc_call jerryscript/jerry-core/vm/vm.c:581 #9 0x566b1f6f in vm_execute jerryscript/jerry-core/vm/vm.c:3636 #10 0x566b2873 in vm_run jerryscript/jerry-core/vm/vm.c:3756 #11 0x5669fe2f in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #12 0x5672e46d in jerry_run jerryscript/jerry-core/api/jerry.c:576 #13 0x5672ac75 in main jerryscript/jerry-main/main-unix.c:735 #14 0xf7744e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #15 0x56628dc0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x16dc0) Address 0xf4205be8 is a wild pointer. SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.4+0x778bd) Shadow bytes around the buggy address: 0x3e840b20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840b50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840b60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3e840b70: fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]fa fa 0x3e840b80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840b90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840ba0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840bb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3e840bc0: 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 ==439==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
heap-buffer-overflow in ecma_typedarray_get_int16_element
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3204/comments
2
2019-10-07T13:38:33Z
2019-10-09T12:10:55Z
https://github.com/jerryscript-project/jerryscript/issues/3204
503,458,703
3,204
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision a8fb4eee ###### Build platform Linux-4.15.0-62-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 ($) function $ ( ) { }; else if ( b ) c ``` ###### Output ```text ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2552. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579963 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56615f84 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56615fc5 in jerry_assert_fail (assertion=0x566ac9a0 "context.status_flags & PARSER_SCANNING_SUCCESSFUL", file=0x566ac660 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x5668ec20 <__func__.5463.lto_priv.113> "parser_parse_source", line=2552) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565d1693 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566f1ca0 <buffer.lto_priv> "var a = 1 , b = 2 ; \nvar c ; \nif ( a === 1 ) if ( b === 1 ) function nonStrictFuncExpr ( ) { print ( typeof nonStrictFuncExpr == \"function\" ) ; \nnonStrictFuncExpr = 123 ; \nprint ( typeof nonStrictFunc"..., source_size=297, parse_opts=0, error_location_p=0xffffc6b0) at jerryscript/jerry-core/parser/js/js-parser.c:2552 #7 0x565d3f87 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566f1ca0 <buffer.lto_priv> "var a = 1 , b = 2 ; \nvar c ; \nif ( a === 1 ) if ( b === 1 ) function nonStrictFuncExpr ( ) { print ( typeof nonStrictFuncExpr == \"function\" ) ; \nnonStrictFuncExpr = 123 ; \nprint ( typeof nonStrictFunc"..., source_size=297, parse_opts=0, bytecode_data_p=0xffffc770) at jerryscript/jerry-core/parser/js/js-parser.c:3001 #8 0x56649e72 in jerry_parse (resource_name_p=0xffffcd8e "/home/reni/.fuzzinator_21989//jerryscript/picireny/20458744229542037493109645523211383964.js", resource_name_length=92, source_p=0x566f1ca0 <buffer.lto_priv> "var a = 1 , b = 2 ; \nvar c ; \nif ( a === 1 ) if ( b === 1 ) function nonStrictFuncExpr ( ) { print ( typeof nonStrictFuncExpr == \"function\" ) ; \nnonStrictFuncExpr = 123 ; \nprint ( typeof nonStrictFunc"..., source_size=297, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #9 0x56646c62 in main (argc=3, argv=0xffffcb04) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context.status_flags & PARSER_SCANNING_SUCCESSFUL in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3174/comments
0
2019-09-29T09:28:45Z
2019-10-02T09:16:55Z
https://github.com/jerryscript-project/jerryscript/issues/3174
499,888,706
3,174
[ "jerryscript-project", "jerryscript" ]
### JerryScript revision [9ab4872](https://github.com/jerryscript-project/jerryscript/commit/9ab48722445c483a2b984fef609d13ab87894dea) ### Build platform `Ubuntu 16.04.6 LTS (Linux 4.15.0-55-generic x86_64)` ### Build steps ``` python tools/build.py --debug --logging=on --line-info=on --error-messages=on --cpointer-32bit=on --mem-heap=2048 --profile=es2015-subset ``` ### Test case ```` var NISLFuzzingFunc = function(d, c) { var a = d.toPrecision(c); }; var NISLParameter0 = 59246; var NISLParameter1 = function(p) { }; NISLFuzzingFunc(NISLParameter0, NISLParameter1); ```` ### Execution steps ```` ./jerryscript/build/bin/jerry testcase.js ```` ### Output ```` ```` ### Expected behavior Throw RangeError on line 2; `RangeError: toPrecision argument must be between 1 and 21` ### Description: I have manually calculated the test case above according to the definition of `Number.prototype.toPrecision` in the ES5.1. I think that jerryscript should throw RangeError exception in [step 8](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.7.4.7). ``` 8. If p < 1 or p > 21, throw a RangeError exception. ``` So, I suspect it is a bug of jerry.
Method Number.prototype.toPrecision does not meet ES5.1
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3173/comments
1
2019-09-29T03:39:42Z
2019-10-02T08:25:53Z
https://github.com/jerryscript-project/jerryscript/issues/3173
499,851,822
3,173
[ "jerryscript-project", "jerryscript" ]
Hello, I want to make sure that `jerry_cleanup()` do not call free callback function assigned by `jerry_set_object_native_pointer()`. My test procedure is: 1. Create a js object and then assign a native buffer to the object using `jerry_set_object_native_pointer()`. 2. Call `jerry_cleanup()` 3. The native buffer is not freed (free callback is not called). I'm developing REPL and it supports `.reset` command to cleanup javascript context. It calls internally `jerry_cleanup()`. But the native buffers are not freed using `jerry_cleanup()`. Is this intended for `jerry_cleanup()`? If so, should I manage the native buffers internally and free them before calling `jerry_cleanup()`?. Thanks in advance.
jerry_cleanup() do not call free callback assigned by jerry_set_object_native_pointer()
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3172/comments
5
2019-09-28T05:13:42Z
2019-10-02T10:32:55Z
https://github.com/jerryscript-project/jerryscript/issues/3172
499,727,916
3,172
[ "jerryscript-project", "jerryscript" ]
Projects like Deno and Hermes can print Set objects in a useful representation: ~~~ $ deno > new Set([10, 20]) Set { 10, 20 } ~~~ ~~~ $ hermes-repl >> new Set([10, 20]) Set { 10, 20 } ~~~ However Jerry output is of limited usefulness: ~~~ $ jerry jerry> new Set([10, 20]) [object Set] ~~~
Pretty print objects
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3170/comments
8
2019-09-26T23:55:00Z
2021-12-06T20:30:06Z
https://github.com/jerryscript-project/jerryscript/issues/3170
499,166,930
3,170
[ "jerryscript-project", "jerryscript" ]
Another issue says that "Set" has been implemented, but it hasnt: ~~~ $ ./jerry jerry> Set Script Error: ReferenceError jerry> Set() Script Error: ReferenceError jerry> new Set() Script Error: ReferenceError ~~~
Set type
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3169/comments
4
2019-09-26T23:06:37Z
2019-09-26T23:51:00Z
https://github.com/jerryscript-project/jerryscript/issues/3169
499,155,487
3,169
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision HEAD: 9ab48722445c483a2b984fef609d13ab87894dea ###### Build platform `Ubuntu 18.04.3 LTS (Linux 4.15.0-64-generic x86_64) + Clang 9` ###### Build steps ```sh env CC=clang python tools/build.py --libfuzzer=on --compile-flag=-fsanitize=address --lto=off ``` ###### Execution steps - Download [crashing testcase](https://github.com/jerryscript-project/jerryscript/files/3657991/jerry_goobr_main-unix.txt) - Run `cat jerry_goobr_main-unix | ./jerry` ###### Output ``` ==17233==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000001181a00 at pc 0x0000004c3c3a bp 0x7fff03f8d190 sp 0x7fff03f8d188 READ of size 1 at 0x000001181a00 thread T0 #0 0x4c3c39 (jerryscript/build/bin/jerry+0x4c3c39) #1 0x7feae68c5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #2 0x41afd9 (jerryscript/build/bin/jerry+0x41afd9) 0x000001181a00 is located 0 bytes to the right of global variable 'buffer' defined in 'jerryscript/jerry-main/main-unix.c:50:16' (0x1081a00) of size 1048576 SUMMARY: AddressSanitizer: global-buffer-overflow (jerryscript/build/bin/jerry+0x4c3c39) Shadow bytes around the buggy address: 0x0000802282f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080228300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080228310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080228320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080228330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x000080228340:[f9]f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x000080228350: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x000080228360: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x000080228370: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x000080228380: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x000080228390: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 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 ==17233==ABORTING ```
Global out of bounds read of "buffer" array
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3166/comments
2
2019-09-26T13:35:39Z
2019-10-03T07:27:29Z
https://github.com/jerryscript-project/jerryscript/issues/3166
498,889,493
3,166
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 9ab48722 ###### Build platform Linux-5.0.0-27-generic-x86_64-with-Ubuntu-19.04-disco ###### 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 { v0 = this.toString( )} catch ( $ ) { } try { v1 = this.toLocaleString( ).localeCompare( )} catch ( $ ) { } try { var v14 = Int8Array.from(((Array)(v0.length))) } catch ( $ ) { } try { v14(v14.fill(v1)) } catch ( $ ) { } try { v0(v14.toLocaleString( )) } catch ( $ ) { } ``` ###### Output ```text ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):106. Error: ERR_FAILED_INTERNAL_ASSERTION ================================================================= ==30042==ERROR: LeakSanitizer: detected memory leaks Direct leak of 196 byte(s) in 14 object(s) allocated from: #0 0xf7a7b1cf in __interceptor_malloc (/usr/lib32/libasan.so.5+0x1121cf) #1 0x5667335e in jmem_heap_alloc jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x566733ca in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x56673457 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x566aaa0b in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:194 #5 0x56624226 in ecma_new_ecma_string_from_utf8_buffer jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:293 #6 0x56624226 in ecma_new_ecma_string_from_number jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:608 #7 0x566c2fc7 in ecma_builtin_number_prototype_object_to_string jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c:259 #8 0x566c6ff2 in ecma_builtin_number_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c:1009 #9 0x56643ecd in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #10 0x5664412b in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #11 0x56657840 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #12 0x5664b24b in ecma_builtin_typedarray_prototype_to_locale_string_helper jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:2023 #13 0x5664b3f7 in ecma_builtin_typedarray_prototype_to_locale_string jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:2091 #14 0x566454bd in ecma_builtin_typedarray_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:77 #15 0x56643ecd in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #16 0x5664412b in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #17 0x56657840 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #18 0x56698dd0 in opfunc_call jerryscript/jerry-core/vm/vm.c:581 #19 0x566a9f56 in vm_execute jerryscript/jerry-core/vm/vm.c:3636 #20 0x566aa7fa in vm_run jerryscript/jerry-core/vm/vm.c:3756 #21 0x566980d5 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #22 0x5660c607 in jerry_run jerryscript/jerry-core/api/jerry.c:576 #23 0x566090e6 in main jerryscript/jerry-main/main-unix.c:743 #24 0xf7789750 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1e750) SUMMARY: AddressSanitizer: 196 byte(s) leaked in 14 allocation(s). ``` ###### Backtrace ```text bt #0 0xf7fd3939 in __kernel_vsyscall () #1 0xf77bf182 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77a92b6 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5666fd22 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565d7ae0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565d7b21 in jerry_assert_fail (assertion=0x56694b40 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x56694ae0 " jerryscript/jerry-core/jmem/jmem-heap.c", function=0x56694cc0 <__func__.4716.lto_priv.120> "jmem_heap_finalize", line=106) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565d7307 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:106 #7 0x565d7165 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5656fb75 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:233 #9 0x5656d97f in main (argc=3, argv=0xffffd264) at jerryscript/jerry-main/main-unix.c:941 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3162/comments
0
2019-09-25T13:13:01Z
2019-10-07T14:28:31Z
https://github.com/jerryscript-project/jerryscript/issues/3162
498,278,353
3,162
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 9ab48722 ###### Build platform Linux-5.0.0-27-generic-x86_64-with-Ubuntu-19.04-disco ###### 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 v4 = Date.UTC(894, 7407, 8094) var v16 = Int16Array.from(((this)).toString()) v16.lastIndexOf(v4.toExponential.length, v4) ``` ###### Output ```text AddressSanitizer:DEADLYSIGNAL ================================================================= ==22130==ERROR: AddressSanitizer: SEGV on unknown address 0x02f0c25a (pc 0x56619109 bp 0xffc99a48 sp 0xffc99a20 T0) ==22130==The signal is caused by a READ memory access. #0 0x56619108 in ecma_get_typedarray_element jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:70 #1 0x565f32ba in ecma_builtin_typedarray_prototype_index_helper jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1755 #2 0x565f3410 in ecma_builtin_typedarray_prototype_last_index_of jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1797 #3 0x565ee47b in ecma_builtin_typedarray_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:74 #4 0x565ececd in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #5 0x565ed12b in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #6 0x56600840 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #7 0x56641dd0 in opfunc_call jerryscript/jerry-core/vm/vm.c:581 #8 0x56652f56 in vm_execute jerryscript/jerry-core/vm/vm.c:3636 #9 0x566537fa in vm_run jerryscript/jerry-core/vm/vm.c:3756 #10 0x566410d5 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #11 0x565b5607 in jerry_run jerryscript/jerry-core/api/jerry.c:576 #12 0x565b20e6 in main jerryscript/jerry-main/main-unix.c:743 #13 0xf76bf750 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1e750) #14 0x565af8e0 in _start (jerryscript/build/bin/jerry+0x158e0) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:70 in ecma_get_typedarray_element ==22130==ABORTING ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
SEGV in ecma_get_typedarray_element
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3161/comments
2
2019-09-25T13:05:25Z
2019-10-07T09:32:44Z
https://github.com/jerryscript-project/jerryscript/issues/3161
498,274,213
3,161
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 35a3df3f ###### Build platform Linux-4.15.0-62-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):2552. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565798c3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661550e in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661554f in jerry_assert_fail (assertion=0x566abd40 "context.status_flags & PARSER_SCANNING_SUCCESSFUL", file=0x566aba00 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x5668e0c0 <__func__.5463.lto_priv.117> "parser_parse_source", line=2552) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565d1dd1 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566f0be0 <buffer.lto_priv> "myobj = { valueOf : ( ) => 16 , k : 5 } ; \nprint ( ( delete myobj ) == true ) ; \n ", source_size=82, parse_opts=0, error_location_p=0xffffc6b0) at jerryscript/jerry-core/parser/js/js-parser.c:2552 #7 0x565d46c5 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566f0be0 <buffer.lto_priv> "myobj = { valueOf : ( ) => 16 , k : 5 } ; \nprint ( ( delete myobj ) == true ) ; \n ", source_size=82, parse_opts=0, bytecode_data_p=0xffffc770) at jerryscript/jerry-core/parser/js/js-parser.c:3001 #8 0x56649319 in jerry_parse (resource_name_p=0xffffcd8e "/home/reni/.fuzzinator_21989//jerryscript/picireny/45726057914490290916257837158628475090.js", resource_name_length=92, source_p=0x566f0be0 <buffer.lto_priv> "myobj = { valueOf : ( ) => 16 , k : 5 } ; \nprint ( ( delete myobj ) == true ) ; \n ", source_size=82, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #9 0x56646109 in main (argc=3, argv=0xffffcb04) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context.status_flags & PARSER_SCANNING_SUCCESSFUL in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3152/comments
0
2019-09-23T18:33:39Z
2019-09-24T10:34:25Z
https://github.com/jerryscript-project/jerryscript/issues/3152
497,258,612
3,152
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 35a3df3f ###### Build platform Linux-4.15.0-62-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 do function $ ( ) { } 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):761. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565798c3 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661550e in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661554f in jerry_assert_fail (assertion=0x566a6780 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a60c0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56696700 <__func__.5348.lto_priv.191> "parser_parse_while_statement_start", line=761) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565ae79f in parser_parse_while_statement_start.lto_priv.183 (context_p=0xffffc4a0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:761 #7 0x5656fd8c in parser_parse_statements (context_p=0xffffc4a0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2397 #8 0x565d18de in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566f0be0 <buffer.lto_priv> "var i = 10 ; \nvar cnt = 0 ; \ndo function Animal ( name ) { this .name = name \nthis .canWalk = true \n} \nwhile ( i -- > 0 ) ; \nprint ( cnt === 0 ) ; \n ", source_size=149, parse_opts=0, error_location_p=0xffffc6b0) at jerryscript/jerry-core/parser/js/js-parser.c:2534 #9 0x565d46c5 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566f0be0 <buffer.lto_priv> "var i = 10 ; \nvar cnt = 0 ; \ndo function Animal ( name ) { this .name = name \nthis .canWalk = true \n} \nwhile ( i -- > 0 ) ; \nprint ( cnt === 0 ) ; \n ", source_size=149, parse_opts=0, bytecode_data_p=0xffffc770) at jerryscript/jerry-core/parser/js/js-parser.c:3001 #10 0x56649319 in jerry_parse (resource_name_p=0xffffcd8d "/home/reni/.fuzzinator_21989//jerryscript/picireny/138803955492962979049107273345816075348.js", resource_name_length=93, source_p=0x566f0be0 <buffer.lto_priv> "var i = 10 ; \nvar cnt = 0 ; \ndo function Animal ( name ) { this .name = name \nthis .canWalk = true \n} \nwhile ( i -- > 0 ) ; \nprint ( cnt === 0 ) ; \n ", source_size=149, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #11 0x56646109 in main (argc=3, argv=0xffffcb04) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_while_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3151/comments
5
2019-09-23T17:18:16Z
2019-10-02T09:16:53Z
https://github.com/jerryscript-project/jerryscript/issues/3151
497,225,098
3,151
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 25b81c10 ###### Build platform Linux-5.0.0-27-generic-x86_64-with-Ubuntu-19.04-disco ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript [this?$ ``` ###### 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):1430. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt (gdb) bt #0 0xf7fd3939 in __kernel_vsyscall () #1 0xf77bf182 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77a92b6 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5666f7eb in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565d7aa0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565d7ae1 in jerry_assert_fail ( assertion=0x5669e1c0 "context_p->stack_top_uint8 == SCAN_STACK_TRY_STATEMENT || context_p->stack_top_uint8 == SCAN_STACK_CATCH_STATEMENT", file=0x5669df20 "jerryscript/jerry-core/parser/js/js-scanner.c", function=0x5669e560 <__func__.4162> "scanner_scan_statement_end", line=1430) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565f0d21 in scanner_scan_statement_end (context_p=0xffffc750, scanner_context_p=0xffffc620, type=LEXER_EOS) at jerryscript/jerry-core/parser/js/js-scanner.c:1429 #7 0x565f1e70 in scanner_scan_all (context_p=0xffffc750, arg_list_p=0x0, arg_list_end_p=0x0, source_p=0x566e9b40 <buffer> "[this?$", source_end_p=0x566e9b47 <buffer+7> "") at jerryscript/jerry-core/parser/js/js-scanner.c:1720 #8 0x565e7210 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566e9b40 <buffer> "[this?$", source_size=7, parse_opts=0, error_location_p=0xffffc960) at jerryscript/jerry-core/parser/js/js-parser.c:2470 #9 0x565ea765 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566e9b40 <buffer> "[this?$", source_size=7, parse_opts=0, bytecode_data_p=0xffffca20) at jerryscript/jerry-core/parser/js/js-parser.c:3001 #10 0x5657005e in jerry_parse (resource_name_p=0xffffd142 "test.js", resource_name_length=7, source_p=0x566e9b40 <buffer> "[this?$", source_size=7, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #11 0x5656d05e in main (argc=3, argv=0xffffcf14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 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/3145/comments
0
2019-09-23T09:09:10Z
2019-09-24T10:33:07Z
https://github.com/jerryscript-project/jerryscript/issues/3145
496,977,574
3,145
[ "jerryscript-project", "jerryscript" ]
How to get information from const **jerry_value_t function_object** and **const jerry_value_t function_this** in code like below. I need to get the name of called external handler (some_handler) inside this handler, is it possible? Not to provide by arguments[], but to get from function_object for example. Please help. And what is the structure of **function_object** and **function_this** to use them in a code. #include <stdio.h> #include "jerryscript.h" static jerry_value_t some_handler (const jerry_value_t function_object, const jerry_value_t function_this, const jerry_value_t arguments[], const jerry_length_t arguments_count) { return jerry_create_undefined (); } int main (void) { const jerry_char_t script[] = "call_handler('First arg');"; const jerry_length_t script_size = sizeof (script) - 1; jerry_init (JERRY_INIT_EMPTY); { jerry_value_t global_object = jerry_get_global_object (); jerry_value_t property_name_print = jerry_create_string ((const jerry_char_t *) "call_handler"); jerry_value_t property_value_func = jerry_create_external_function (print_handler); jerry_value_t set_result = jerry_set_property (global_object, property_name_print, property_value_func); jerry_release_value (set_result); jerry_release_value (property_value_func); jerry_release_value (property_name_print); jerry_release_value (global_object); } jerry_value_t parsed_code = jerry_parse (NULL, 0, script, script_size, JERRY_PARSE_NO_OPTS); if (!jerry_value_is_error (parsed_code)) { jerry_value_t ret_value = jerry_run (parsed_code); jerry_release_value (ret_value); } jerry_release_value (parsed_code); jerry_cleanup (); return 0; } Thanks a lot!
Help with getting name of registered jerry_external_handler_t name, please.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3144/comments
2
2019-09-21T18:06:46Z
2019-09-27T11:23:28Z
https://github.com/jerryscript-project/jerryscript/issues/3144
496,683,976
3,144
[ "jerryscript-project", "jerryscript" ]
Help with getting name of registered jerry_external_handler_t name, please.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3143/comments
0
2019-09-21T17:59:41Z
2019-09-21T18:00:28Z
https://github.com/jerryscript-project/jerryscript/issues/3143
496,683,268
3,143
[ "jerryscript-project", "jerryscript" ]
So first I was getting this: ~~~ $ make [ 10%] Built target jerry-libm [ 85%] Built target jerry-core [ 93%] Built target jerry-ext [ 96%] Built target jerry-port-default-minimal [ 99%] Built target jerry-port-default [100%] Linking C executable ../bin/jerry.exe /bin/ld: unrecognized option '-z' ~~~ So I removed this: https://github.com/jerryscript-project/jerryscript/blob/25b81c106c07f33f576fb24c5c636d5799ac1eff/CMakeLists.txt#L183 but it still fails: ~~~ $ make [ 10%] Built target jerry-libm [ 85%] Built target jerry-core [ 93%] Built target jerry-ext [ 96%] Built target jerry-port-default-minimal [ 99%] Built target jerry-port-default [100%] Linking C executable ../bin/jerry.exe /bin/ld: ../lib/libjerry-core.a(ecma-helpers-number.c.o): bad string table size 0 ../lib/libjerry-core.a: error adding symbols: Bad value ~~~
error adding symbols: Bad value
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3142/comments
6
2019-09-21T17:37:46Z
2019-09-24T09:36:34Z
https://github.com/jerryscript-project/jerryscript/issues/3142
496,681,282
3,142
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 25b81c10 ###### Build platform Linux-4.15.0-62-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 (; []; [//]) function f14(v33, v34) { switch (!0x13) {} } ``` ###### Output ```text ICE: Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_switch_statement_start):1216. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd3939 in __kernel_vsyscall () #1 0xf77bf182 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77a92b6 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5666f7eb in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x565d7aa0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x565d7ae1 in jerry_assert_fail ( assertion=0x566b1bc0 "context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH", file=0x566b1160 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x566b2940 <__func__.5430> "parser_parse_switch_statement_start", line=1216) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5666040e in parser_parse_switch_statement_start (context_p=0xffffc750) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1215 #7 0x566659d6 in parser_parse_statements (context_p=0xffffc750) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2366 #8 0x565e99f5 in parser_parse_function (context_p=0xffffc750, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser.c:2790 #9 0x56646c33 in lexer_construct_function_object (context_p=0xffffc750, extra_status_flags=14) at jerryscript/jerry-core/parser/js/js-lexer.c:1978 #10 0x5664e138 in parser_parse_function_expression (context_p=0xffffc750, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1010 #11 0x5664fafb in parser_parse_unary_expression (context_p=0xffffc750, grouping_level_p=0xffffbeb0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1302 #12 0x56654243 in parser_parse_expression (context_p=0xffffc750, options=4) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2178 #13 0x5664bb5e in parser_parse_array_literal (context_p=0xffffc750) at jerryscript/jerry-core/parser/js/js-parser-expr.c:249 #14 0x5664fb21 in parser_parse_unary_expression (context_p=0xffffc750, grouping_level_p=0xffffc080) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1313 #15 0x56654243 in parser_parse_expression (context_p=0xffffc750, options=1) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2178 #16 0x5665f3e2 in parser_parse_for_statement_start (context_p=0xffffc750) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1077 #17 0x56665bd8 in parser_parse_statements (context_p=0xffffc750) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2396 #18 0x565e79a8 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566e9b40 <buffer> "for (; []; [//]) \n function f14(v33, v34) {\n switch (!0x13) {}\n }", source_size=76, parse_opts=0, error_location_p=0xffffc960) at jerryscript/jerry-core/parser/js/js-parser.c:2534 #19 0x565ea765 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566e9b40 <buffer> "for (; []; [//]) \n function f14(v33, v34) {\n switch (!0x13) {}\n }", source_size=76, parse_opts=0, bytecode_data_p=0xffffca20) at jerryscript/jerry-core/parser/js/js-parser.c:3001 #20 0x5657005e in jerry_parse (resource_name_p=0xffffd142 "test.js", resource_name_length=7, source_p=0x566e9b40 <buffer> "for (; []; [//]) \n function f14(v33, v34) {\n switch (!0x13) {}\n }", source_size=76, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #21 0x5656d05e in main (argc=3, argv=0xffffcf14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed in parser_parse_switch_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3140/comments
0
2019-09-20T11:20:53Z
2019-09-23T13:28:00Z
https://github.com/jerryscript-project/jerryscript/issues/3140
496,296,447
3,140
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision c05686b6 ###### Build platform Linux-4.15.0-62-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 switch ( $) { case $: for ( ; ; ) ; case $ :} ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_COLON' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_case_statement):1540. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x56579853 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661441a in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x5661445b in jerry_assert_fail (assertion=0x56694bc0 "context_p->token.type != LEXER_COLON", file=0x56694ae0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56695800 <__func__.5426> "parser_parse_case_statement", line=1540) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5656bf71 in parser_parse_case_statement (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1540 #7 0x5656fef4 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2443 #8 0x565d157a in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566efb40 <buffer.lto_priv> "switchMark : switch ( 1 ) { case 0 : for ( var i = 0 ; i < 10 ; i ++ ) { if ( i === 5 ) { \n} \n\nsum += i ; \n} \n\ncase 1 : break switchMark ; \ncase 2 : print ( false ) ; \n} \n\n ", source_size=173, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2534 #9 0x565d4361 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566efb40 <buffer.lto_priv> "switchMark : switch ( 1 ) { case 0 : for ( var i = 0 ; i < 10 ; i ++ ) { if ( i === 5 ) { \n} \n\nsum += i ; \n} \n\ncase 1 : break switchMark ; \ncase 2 : print ( false ) ; \n} \n\n ", source_size=173, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:3001 #10 0x56648225 in jerry_parse (resource_name_p=0xffffcd91 "/home/reni/.fuzzinator_8669//jerryscript/picireny/171112874346830202183078347896675941171.js", resource_name_length=92, source_p=0x566efb40 <buffer.lto_priv> "switchMark : switch ( 1 ) { case 0 : for ( var i = 0 ; i < 10 ; i ++ ) { if ( i === 5 ) { \n} \n\nsum += i ; \n} \n\ncase 1 : break switchMark ; \ncase 2 : print ( false ) ; \n} \n\n ", source_size=173, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:426 #11 0x56645015 in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_COLON in parser_parse_case_statement
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3131/comments
0
2019-09-18T16:23:34Z
2019-09-20T09:27:06Z
https://github.com/jerryscript-project/jerryscript/issues/3131
495,329,674
3,131
[ "jerryscript-project", "jerryscript" ]
###### Revision c05686b ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arrb = new ArrayBuffer(2147483648); var arr = new Uint8Array(arrb); arr.copyWithin({}, 8) ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==1326==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf54fe818 at pc 0xf79c5836 bp 0xffcf8508 sp 0xffcf80d8 READ of size 2147483648 at 0xf54fe818 thread T0 #0 0xf79c5835 in memmove (/usr/lib32/libasan.so.4+0x7a835) #1 0x5668797a in ecma_builtin_typedarray_prototype_copy_within /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1900 #2 0x5667ea93 in ecma_builtin_typedarray_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:75 #3 0x5667d4bb in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #4 0x5667d71c in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #5 0x566a01b5 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #6 0x5672f59a in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #7 0x5674494f in vm_execute /jerryscript/jerry-core/vm/vm.c:3636 #8 0x567451fe in vm_run /jerryscript/jerry-core/vm/vm.c:3756 #9 0x5672e400 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #10 0x565ede50 in jerry_run /jerryscript/jerry-core/api/jerry.c:576 #11 0x565ea63e in main /jerryscript/jerry-main/main-unix.c:743 #12 0xf778ae80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #13 0x565e7f10 (/home/xyz/jerryscript/tmpmaster/jerry+0x15f10) 0xf54fe818 is located -2147483624 bytes inside of 2147483672-byte region [0x754fe800,0xf54fe818) allocated by thread T0 here: #0 0xf7a30f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566cf549 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x566cf5c1 in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x5661c589 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x5661c589 in ecma_alloc_extended_object /jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x5661c589 in ecma_create_object /jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x5668ed8b in ecma_arraybuffer_new_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x5668f2eb in ecma_op_create_arraybuffer_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x5663a8f9 in ecma_builtin_arraybuffer_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x5667d9b0 in ecma_builtin_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1080 #10 0x566a17b4 in ecma_op_function_construct /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #11 0x5672fbb9 in opfunc_construct /jerryscript/jerry-core/vm/vm.c:665 #12 0x56744975 in vm_execute /jerryscript/jerry-core/vm/vm.c:3648 #13 0x567451fe in vm_run /jerryscript/jerry-core/vm/vm.c:3756 #14 0x5672e400 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #15 0x565ede50 in jerry_run /jerryscript/jerry-core/api/jerry.c:576 #16 0x565ea63e in main /jerryscript/jerry-main/main-unix.c:743 #17 0xf778ae80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.4+0x7a835) in memmove Shadow bytes around the buggy address: 0x3ea9fcb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9fcc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9fcd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9fce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9fcf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x3ea9fd00: 00 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9fd10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9fd20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9fd30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9fd40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9fd50: 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 ==1326==ABORTING ```
heap-buffer-overflow in ecma_builtin_typedarray_prototype_copy_within
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3130/comments
1
2019-09-17T16:16:01Z
2019-10-07T09:31:45Z
https://github.com/jerryscript-project/jerryscript/issues/3130
494,721,280
3,130
[ "jerryscript-project", "jerryscript" ]
###### Revision c05686b ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arrb = new ArrayBuffer(1); var arr = new Uint8Array(arrb); arr.lastIndexOf(Number.NaN, -[4294967280]); ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==65813==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5f008d9 at pc 0x566f7ccd bp 0xffcc7168 sp 0xffcc7158 READ of size 1 at 0xf5f008d9 thread T0 #0 0x566f7ccc in ecma_get_typedarray_element /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:66 #1 0x566b4ea1 in ecma_builtin_typedarray_prototype_index_helper /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1755 #2 0x566b5047 in ecma_builtin_typedarray_prototype_last_index_of /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1797 #3 0x566aca7a in ecma_builtin_typedarray_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:74 #4 0x566ab4bb in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #5 0x566ab71c in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #6 0x566ce1b5 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #7 0x5675d59a in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #8 0x5677294f in vm_execute /jerryscript/jerry-core/vm/vm.c:3636 #9 0x567731fe in vm_run /jerryscript/jerry-core/vm/vm.c:3756 #10 0x5675c400 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #11 0x5661be50 in jerry_run /jerryscript/jerry-core/api/jerry.c:576 #12 0x5661863e in main /jerryscript/jerry-main/main-unix.c:743 #13 0xf7735e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #14 0x56615f10 (/home/xyz/jerryscript/tmpmaster/jerry+0x15f10) 0xf5f008d9 is located 7 bytes to the left of 24-byte region [0xf5f008e0,0xf5f008f8) allocated by thread T0 here: #0 0xf79dbf34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566fd549 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x566fd5c1 in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x5664a589 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x5664a589 in ecma_alloc_extended_object /jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x5664a589 in ecma_create_object /jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x566a8778 in ecma_instantiate_builtin /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:385 #7 0x566a81c8 in ecma_builtin_get /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:299 #8 0x566bcd71 in ecma_arraybuffer_new_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:48 #9 0x566bd2eb in ecma_op_create_arraybuffer_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #10 0x566688f9 in ecma_builtin_arraybuffer_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #11 0x566ab9b0 in ecma_builtin_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1080 #12 0x566cf7b4 in ecma_op_function_construct /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #13 0x5675dbb9 in opfunc_construct /jerryscript/jerry-core/vm/vm.c:665 #14 0x56772975 in vm_execute /jerryscript/jerry-core/vm/vm.c:3648 #15 0x567731fe in vm_run /jerryscript/jerry-core/vm/vm.c:3756 #16 0x5675c400 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #17 0x5661be50 in jerry_run /jerryscript/jerry-core/api/jerry.c:576 #18 0x5661863e in main /jerryscript/jerry-main/main-unix.c:743 #19 0xf7735e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:66 in ecma_get_typedarray_element Shadow bytes around the buggy address: 0x3ebe00c0: fa fa 00 00 00 fa fa fa 00 00 00 00 fa fa 00 00 0x3ebe00d0: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa 0x3ebe00e0: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ebe00f0: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ebe0100: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa =>0x3ebe0110: 00 00 00 fa fa fa 00 00 00 01 fa[fa]00 00 00 fa 0x3ebe0120: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ebe0130: 00 fa fa fa 00 00 03 fa fa fa 00 00 00 fa fa fa 0x3ebe0140: 00 00 00 fa fa fa 00 00 01 fa fa fa 00 00 00 fa 0x3ebe0150: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x3ebe0160: 00 fa fa fa 00 00 02 fa fa fa 00 00 00 00 fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==65813==ABORTING ```
heap-buffer-overflow in ecma_get_typedarray_element
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3129/comments
1
2019-09-17T15:46:06Z
2019-09-27T14:56:25Z
https://github.com/jerryscript-project/jerryscript/issues/3129
494,705,249
3,129
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 17e63e89 ###### Build platform Linux-4.15.0-62-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 switch ($) { case $: class $ {;} case 6: } ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_COLON' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_case_statement):1556. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657982f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566138ae in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566138ef in jerry_assert_fail (assertion=0x56693cc0 "context_p->token.type != LEXER_COLON", file=0x56693be0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56694900 <__func__.5431> "parser_parse_case_statement", line=1556) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5656bf11 in parser_parse_case_statement (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1556 #7 0x5656fed0 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2458 #8 0x565d38b4 in parser_parse_function (context_p=0xffffc4b0, status_flags=6) at jerryscript/jerry-core/parser/js/js-parser.c:2786 #9 0x565971ef in lexer_construct_function_object (context_p=0xffffc4b0, extra_status_flags=6) at jerryscript/jerry-core/parser/js/js-lexer.c:1978 #10 0x565acc4d in parser_parse_function_statement.lto_priv.178 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:469 #11 0x5656fae3 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2371 #12 0x565d1857 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566eeae0 <buffer.lto_priv> "function f ( x , y ) { switch ( x ) { case 1 : WScript .Echo ( 1 ) ; \nbreak ; \ncase 2 : WScript .Echo ( 2 ) ; \nbreak ; \ncase 3 : WScript .Echo ( 3 ) ; \nbreak ; \ncase 4 : WScript .Echo ( 4 ) ; \nbreak ;"..., source_size=1293, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #13 0x565d463e in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566eeae0 <buffer.lto_priv> "function f ( x , y ) { switch ( x ) { case 1 : WScript .Echo ( 1 ) ; \nbreak ; \ncase 2 : WScript .Echo ( 2 ) ; \nbreak ; \ncase 3 : WScript .Echo ( 3 ) ; \nbreak ; \ncase 4 : WScript .Echo ( 4 ) ; \nbreak ;"..., source_size=1293, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2997 #14 0x56647356 in jerry_parse (resource_name_p=0xffffcd92 "/home/reni/.fuzzinator_34114//jerryscript/picireny/7716773234270039086542036664503419856.js", resource_name_length=91, source_p=0x566eeae0 <buffer.lto_priv> "function f ( x , y ) { switch ( x ) { case 1 : WScript .Echo ( 1 ) ; \nbreak ; \ncase 2 : WScript .Echo ( 2 ) ; \nbreak ; \ncase 3 : WScript .Echo ( 3 ) ; \nbreak ; \ncase 4 : WScript .Echo ( 4 ) ; \nbreak ;"..., source_size=1293, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #15 0x566442ab in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_COLON in parser_parse_case_statement
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3123/comments
0
2019-09-13T16:48:39Z
2019-09-16T09:26:09Z
https://github.com/jerryscript-project/jerryscript/issues/3123
493,422,741
3,123
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 951d7e68 ###### Build platform Linux-4.15.0-62-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 Base = function ( ) { }.bind( ); Object.defineProperty ( Base , 'prototype' , { get : function ( ) {$} } ); class C extends Base { } ``` Note: although the assert message is the same as in #3106, but the test cases seem quite different. ###### Output ```text Script Error: TypeError: Class extends value does not have valid prototype property. ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):106. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565797ef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661336b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566133ac in jerry_assert_fail (assertion=0x566b1120 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566b10c0 "jerryscript/jerry-core/jmem/jmem-heap.c", function=0x56684c40 <__func__.4681.lto_priv.114> "jmem_heap_finalize", line=106) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566125a9 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:106 #7 0x566123cf in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x56646629 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:231 #9 0x5664441b in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:941 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem_heap_finalize
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3121/comments
0
2019-09-13T14:20:03Z
2019-09-16T09:32:57Z
https://github.com/jerryscript-project/jerryscript/issues/3121
493,351,946
3,121
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 951d7e68 ###### Build platform Linux-4.15.0-62-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 a ( ) = { m ( ) { } } .m ( ) = class { m ( ) { } }.sameValue ``` ###### Output ```text ICE: Assertion 'context.status_flags & PARSER_SCANNING_SUCCESSFUL' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_source):2548. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657982f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566138ae in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566138ef in jerry_assert_fail (assertion=0x566a9c20 "context.status_flags & PARSER_SCANNING_SUCCESSFUL", file=0x566a9940 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x5668c100 <__func__.5460.lto_priv.110> "parser_parse_source", line=2548) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565d1d4a in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566eeae0 <buffer.lto_priv> "var id_0 = class { static m ( x = 42 ) { } } .m ; \nprint .sameValue ( id_1 .length , 0 , 'formalslist: x = 42' ) ; \nverifyNotEnumerable ( id_2 , 'length' ) ; \nverifyNotWritable ( id_3 , 'length' ) ; \n"..., source_size=1109, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2548 #7 0x565d463e in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566eeae0 <buffer.lto_priv> "var id_0 = class { static m ( x = 42 ) { } } .m ; \nprint .sameValue ( id_1 .length , 0 , 'formalslist: x = 42' ) ; \nverifyNotEnumerable ( id_2 , 'length' ) ; \nverifyNotWritable ( id_3 , 'length' ) ; \n"..., source_size=1109, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2997 #8 0x56647356 in jerry_parse (resource_name_p=0xffffcd91 "/home/reni/.fuzzinator_34114//jerryscript/picireny/12911980373174632111316687340850302762.js", resource_name_length=92, source_p=0x566eeae0 <buffer.lto_priv> "var id_0 = class { static m ( x = 42 ) { } } .m ; \nprint .sameValue ( id_1 .length , 0 , 'formalslist: x = 42' ) ; \nverifyNotEnumerable ( id_2 , 'length' ) ; \nverifyNotWritable ( id_3 , 'length' ) ; \n"..., source_size=1109, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #9 0x566442ab in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context.status_flags & PARSER_SCANNING_SUCCESSFUL in parser_parse_source
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3119/comments
0
2019-09-13T14:08:27Z
2019-09-16T10:58:15Z
https://github.com/jerryscript-project/jerryscript/issues/3119
493,346,159
3,119
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 376cfea4 ###### Build platform Linux-4.15.0-62-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 $ = class { } .prototype = [ ] switch ( '1' ) { ``` ###### Output ```text ICE: Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_switch_statement_start):1235. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565797ef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661336b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566133ac in jerry_assert_fail (assertion=0x566a41a0 "context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH", file=0x566a37a0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693f60 <__func__.5403.lto_priv.197> "parser_parse_switch_statement_start", line=1235) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565b1666 in parser_parse_switch_statement_start.lto_priv.190 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1234 #7 0x5656fac9 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2383 #8 0x565d1817 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "var UBound = 0 ; \nvar BUGNUMBER = 74474 ; \nvar summary = 'Testing switch statements with duplicate labels' ; \nvar status = '' ; \nvar f = class { f ( ) { } } .prototype .f ; \nvar actual = '' ; \nvar act"..., source_size=1396, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #9 0x565d457d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "var UBound = 0 ; \nvar BUGNUMBER = 74474 ; \nvar summary = 'Testing switch statements with duplicate labels' ; \nvar status = '' ; \nvar f = class { f ( ) { } } .prototype .f ; \nvar actual = '' ; \nvar act"..., source_size=1396, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #10 0x56646c57 in jerry_parse (resource_name_p=0xffffcd90 "/home/reni/.fuzzinator_34114//jerryscript/picireny/243010487537740769481469148385537363433.js", resource_name_length=93, source_p=0x566eda80 <buffer.lto_priv> "var UBound = 0 ; \nvar BUGNUMBER = 74474 ; \nvar summary = 'Testing switch statements with duplicate labels' ; \nvar status = '' ; \nvar f = class { f ( ) { } } .prototype .f ; \nvar actual = '' ; \nvar act"..., source_size=1396, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #11 0x56643bac in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH in parser_parse_switch_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3117/comments
0
2019-09-13T13:52:18Z
2019-09-16T10:58:15Z
https://github.com/jerryscript-project/jerryscript/issues/3117
493,337,725
3,117
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 376cfea4 ###### Build platform Linux-4.15.0-62-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 [Attached](https://github.com/jerryscript-project/jerryscript/files/3610221/test.txt) ###### Output ```text ICE: Assertion 'literal_index <= CBC_MAXIMUM_SMALL_VALUE' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_post_processing):1620. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565797ef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661336b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566133ac in jerry_assert_fail (assertion=0x566b2ea0 "literal_index <= CBC_MAXIMUM_SMALL_VALUE", file=0x566b2420 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x5668b800 <__func__.5362.lto_priv.20> "parser_post_processing", line=1620) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5661ddcb in parser_post_processing.lto_priv.441 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser.c:1620 #7 0x565d3801 in parser_parse_function (context_p=0xffffc4b0, status_flags=6) at jerryscript/jerry-core/parser/js/js-parser.c:2783 #8 0x565971af in lexer_construct_function_object (context_p=0xffffc4b0, extra_status_flags=6) at jerryscript/jerry-core/parser/js/js-lexer.c:1978 #9 0x565acc0d in parser_parse_function_statement.lto_priv.192 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:469 #10 0x5656faa3 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2371 #11 0x565d1817 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "this .WScript .LoadScriptFile ( \"..\\\\UnitTestFramework\\\\SimdJsHelpers.js\" ) ; \nfunction asmModule ( stdlib , imports , buffer ) { \"use asm\" ; \nvar id_0 = stdlib .SIMD .id_1 ; \nvar id_1 = id_2 .check ;"..., source_size=31805, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #12 0x565d457d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "this .WScript .LoadScriptFile ( \"..\\\\UnitTestFramework\\\\SimdJsHelpers.js\" ) ; \nfunction asmModule ( stdlib , imports , buffer ) { \"use asm\" ; \nvar id_0 = stdlib .SIMD .id_1 ; \nvar id_1 = id_2 .check ;"..., source_size=31805, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #13 0x56646c57 in jerry_parse (resource_name_p=0xffffcd98 "/home/reni/.fuzzinator_28260//jerryscript/picireny/131726975157091339968786748300990941533.js", resource_name_length=93, source_p=0x566eda80 <buffer.lto_priv> "this .WScript .LoadScriptFile ( \"..\\\\UnitTestFramework\\\\SimdJsHelpers.js\" ) ; \nfunction asmModule ( stdlib , imports , buffer ) { \"use asm\" ; \nvar id_0 = stdlib .SIMD .id_1 ; \nvar id_1 = id_2 .check ;"..., source_size=31805, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #14 0x56643bac in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion literal_index <= CBC_MAXIMUM_SMALL_VALUE in parser_post_processing
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3114/comments
0
2019-09-13T13:26:36Z
2019-09-16T10:56:48Z
https://github.com/jerryscript-project/jerryscript/issues/3114
493,325,072
3,114
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 376cfea4 ###### Build platform Linux-4.15.0-62-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 iter = "" [ Symbol.iterator ] ( ); iter.next.constructor ( Object.getPrototypeOf( iter ) ) ``` ###### 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):2306. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565797ef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661336b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566133ac in jerry_assert_fail (assertion=0x566aedc0 "ecma_object_check_class_name_is_object (obj_p)", file=0x566ae0c0 "jerryscript/jerry-core/ecma/operations/ecma-objects.c", function=0x56684140 <__func__.4526.lto_priv.531> "ecma_object_get_class_name", line=2306) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56604dec in ecma_object_get_class_name (obj_p=0xf5f00640) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:2306 #7 0x566761c0 in ecma_builtin_helper_object_to_string (this_arg=4126148163) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:141 #8 0x565c7bf6 in ecma_builtin_object_prototype_object_to_string (this_arg=4126148163) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:80 #9 0x565c7e0e in ecma_builtin_object_prototype_dispatch_routine (builtin_routine_id=71, this_arg=4126148163, arguments_list_p=0xffffbcf0, arguments_number=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:229 #10 0x56626020 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, builtin_routine_id=71, this_arg_value=4126148163, arguments_list_p=0xffffbcf0, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #11 0x56626281 in ecma_builtin_dispatch_call (obj_p=0xf5f00460, this_arg_value=4126148163, arguments_list_p=0x0, arguments_list_len=0) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #12 0x566395d1 in ecma_op_function_call (func_obj_p=0xf5f00460, this_arg_value=4126148163, arguments_list_p=0x0, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #13 0x5663f8d4 in ecma_op_general_object_default_value (obj_p=0xf5f00640, hint=ECMA_PREFERRED_TYPE_STRING) at jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:243 #14 0x56601c76 in ecma_op_object_default_value (obj_p=0xf5f00640, hint=ECMA_PREFERRED_TYPE_STRING) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1383 #15 0x56633d52 in ecma_op_to_primitive (value=4126148163, preferred_type=ECMA_PREFERRED_TYPE_STRING) at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:232 #16 0x566345d7 in ecma_to_op_string_helper (value=4126148163) at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:446 #17 0x566347f3 in ecma_op_to_string (value=4126148163) at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:523 #18 0x565bb459 in ecma_builtin_function_dispatch_construct (arguments_list_p=0xffffc3a8, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:142 #19 0x565bb0ba in ecma_builtin_function_dispatch_call (arguments_list_p=0xffffc3a8, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-function.c:59 #20 0x56626372 in ecma_builtin_dispatch_call (obj_p=0xf5f00580, this_arg_value=4126148067, arguments_list_p=0xffffc3a8, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1056 #21 0x566395d1 in ecma_op_function_call (func_obj_p=0xf5f00580, this_arg_value=4126148067, arguments_list_p=0xffffc3a8, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #22 0x565e4c3c in opfunc_call (frame_ctx_p=0xffffc420) at jerryscript/jerry-core/vm/vm.c:581 #23 0x565f5ff1 in vm_execute (frame_ctx_p=0xffffc420, arg_p=0xffffc674, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3629 #24 0x565f68f5 in vm_run (bytecode_header_p=0xf5302bc0, this_binding_value=4126149459, lex_env_p=0xf5d006b0, parse_opts=0, arg_list_p=0xffffc674, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3749 #25 0x56639932 in ecma_op_function_call (func_obj_p=0xf5f00850, this_arg_value=72, arguments_list_p=0xffffc674, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #26 0x565e4c3c in opfunc_call (frame_ctx_p=0xffffc6e0) at jerryscript/jerry-core/vm/vm.c:581 #27 0x565f5ff1 in vm_execute (frame_ctx_p=0xffffc6e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3629 #28 0x565f68f5 in vm_run (bytecode_header_p=0xf4d01ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3749 #29 0x565e3ed3 in vm_run_global (bytecode_p=0xf4d01ad0) at jerryscript/jerry-core/vm/vm.c:282 #30 0x56647291 in jerry_run (func_val=4126148739) at jerryscript/jerry-core/api/jerry.c:570 #31 0x56643bf5 in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ecma_object_check_class_name_is_object (obj_p) in ecma_object_get_class_name
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3112/comments
0
2019-09-13T13:09:56Z
2019-09-13T14:15:34Z
https://github.com/jerryscript-project/jerryscript/issues/3112
493,317,092
3,112
[ "jerryscript-project", "jerryscript" ]
###### Revision 376cfea ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arrb = new ArrayBuffer(14); var arr = new DataView(arrb, 13, Infinity); arr.setUint32(9, -65536); ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==113911==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5100f7e at pc 0x5673265d bp 0xffe28a68 sp 0xffe28a58 WRITE of size 4 at 0xf5100f7e thread T0 #0 0x5673265c in ecma_set_typedarray_element /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:210 #1 0x56704dfc in ecma_op_dataview_get_set_view_value /jerryscript/jerry-core/ecma/operations/ecma-dataview-object.c:321 #2 0x566a4131 in ecma_builtin_dataview_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c:188 #3 0x566e62d6 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #4 0x566e6537 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #5 0x56708466 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #6 0x56795d7f in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #7 0x567ab112 in vm_execute /jerryscript/jerry-core/vm/vm.c:3629 #8 0x567ab9c1 in vm_run /jerryscript/jerry-core/vm/vm.c:3749 #9 0x56794be5 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #10 0x56656c6b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #11 0x566535be in main /jerryscript/jerry-main/main-unix.c:743 #12 0xf77f8e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #13 0x56650e90 (/home/xyz/jerryscript/tmpmaster/jerry+0x15e90) 0xf5100f7e is located 8 bytes to the right of 38-byte region [0xf5100f50,0xf5100f76) allocated by thread T0 here: #0 0xf7a9ef34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x567377e2 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x5673785a in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x566853a4 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x566853a4 in ecma_alloc_extended_object /jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x566853a4 in ecma_create_object /jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x566f7081 in ecma_arraybuffer_new_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x566f75e1 in ecma_op_create_arraybuffer_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x566a3714 in ecma_builtin_arraybuffer_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x566e67cb in ecma_builtin_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1080 #10 0x56709a65 in ecma_op_function_construct /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #11 0x5679639e in opfunc_construct /jerryscript/jerry-core/vm/vm.c:665 #12 0x567ab138 in vm_execute /jerryscript/jerry-core/vm/vm.c:3641 #13 0x567ab9c1 in vm_run /jerryscript/jerry-core/vm/vm.c:3749 #14 0x56794be5 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #15 0x56656c6b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #16 0x566535be in main /jerryscript/jerry-main/main-unix.c:743 #17 0xf77f8e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:210 in ecma_set_typedarray_element Shadow bytes around the buggy address: 0x3ea20190: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ea201e0: fa fa fa fa fa fa fa fa fa fa 00 00 00 00 06[fa] 0x3ea201f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20210: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20220: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20230: 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 ==113911==ABORTING ```
heap-buffer-overflow in ecma_set_typedarray_element
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3109/comments
0
2019-09-13T11:26:03Z
2019-09-13T14:19:50Z
https://github.com/jerryscript-project/jerryscript/issues/3109
493,274,054
3,109
[ "jerryscript-project", "jerryscript" ]
###### Revision 376cfea ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arr = new Int8Array(357913942); arr.copyWithin(4096, 14, 5) ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==52075==ERROR: AddressSanitizer: negative-size-param: (size=-9) #0 0xf7a1cc79 in memmove (/usr/lib32/libasan.so.4+0x7ac79) #1 0x566cd783 in ecma_builtin_typedarray_prototype_copy_within /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1900 #2 0x566c48ae in ecma_builtin_typedarray_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:75 #3 0x566c32d6 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #4 0x566c3537 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #5 0x566e5466 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #6 0x56772d7f in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #7 0x56788112 in vm_execute /jerryscript/jerry-core/vm/vm.c:3629 #8 0x567889c1 in vm_run /jerryscript/jerry-core/vm/vm.c:3749 #9 0x56771be5 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #10 0x56633c6b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #11 0x566305be in main /jerryscript/jerry-main/main-unix.c:743 #12 0xf77e1e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #13 0x5662de90 (/home/fuzzing/jerryscript/tmpmaster/jerry+0x15e90) 0xdffa9826 is located 38 bytes inside of 357913966-byte region [0xdffa9800,0xf54fed6e) allocated by thread T0 here: #0 0xf7a87f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x567147e2 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x5671485a in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x566623a4 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x566623a4 in ecma_alloc_extended_object /jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x566623a4 in ecma_create_object /jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x566d4081 in ecma_arraybuffer_new_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x5670f70b in ecma_typedarray_create_object_with_length /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:246 #8 0x56711ff3 in ecma_op_create_typedarray /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:624 #9 0x566c4062 in ecma_typedarray_helper_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.c:219 #10 0x566c3cc1 in ecma_builtin_int8array_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c:68 #11 0x566c37cb in ecma_builtin_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1080 #12 0x566e6a65 in ecma_op_function_construct /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #13 0x5677339e in opfunc_construct /jerryscript/jerry-core/vm/vm.c:665 #14 0x56788138 in vm_execute /jerryscript/jerry-core/vm/vm.c:3641 #15 0x567889c1 in vm_run /jerryscript/jerry-core/vm/vm.c:3749 #16 0x56771be5 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #17 0x56633c6b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #18 0x566305be in main /jerryscript/jerry-main/main-unix.c:743 #19 0xf77e1e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: negative-size-param (/usr/lib32/libasan.so.4+0x7ac79) in memmove ==52075==ABORTING ```
negative-size-param in memmove (ecma-builtin-typedarray-prototype.c)
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3107/comments
0
2019-09-13T10:32:58Z
2019-09-17T15:24:48Z
https://github.com/jerryscript-project/jerryscript/issues/3107
493,253,531
3,107
[ "jerryscript-project", "jerryscript" ]
###### Revision 376cfea ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var symbol = Symbol(); var arr = [{}]; with (arr.pop()){ arr.push(symbol.valueOf()); } arr.length = String.fromCharCode(Object.freeze(arr)); ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at /jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):106. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7841452 in raise () from /lib32/libc.so.6 #2 0xf7842871 in abort () from /lib32/libc.so.6 #3 0x566c737e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56652060 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566520a1 in jerry_assert_fail (assertion=0x566ed900 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566ed8a0 "/jerryscript/jerry-core/jmem/jmem-heap.c", function=0x56707960 <__func__.18391> "jmem_heap_finalize", line=106) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56651766 in jmem_heap_finalize () at /jerryscript/jerry-core/jmem/jmem-heap.c:106 #7 0x566515bc in jmem_finalize () at /jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5656ff89 in jerry_cleanup () at /jerryscript/jerry-core/api/jerry.c:231 #9 0x5656ddae in main (argc=3, argv=0xffffd3f4) at /jerryscript/jerry-main/main-unix.c:941 ```
Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' in jmem-heap.c
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3106/comments
0
2019-09-13T09:37:54Z
2019-09-16T10:54:17Z
https://github.com/jerryscript-project/jerryscript/issues/3106
493,229,667
3,106
[ "jerryscript-project", "jerryscript" ]
###### Revision 376cfea ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var str = String.fromCharCode([-10] + "123", Date.UTC(15, 13, 15)); str.repeat(11); ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` ICE: Assertion 'ecma_string_get_size (string_p) <= buffer_size' failed at /jerryscript/jerry-core/ecma/base/ecma-helpers-string.c(ecma_string_copy_to_cesu8_buffer):1008. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7841452 in raise () from /lib32/libc.so.6 #2 0xf7842871 in abort () from /lib32/libc.so.6 #3 0x566c737e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56652060 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566520a1 in jerry_assert_fail (assertion=0x566d8560 "ecma_string_get_size (string_p) <= buffer_size", file=0x566d4f40 "/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c", function=0x566fd940 <__func__.8013> "ecma_string_copy_to_cesu8_buffer", line=1008) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56594bcb in ecma_string_copy_to_cesu8_buffer (string_p=0xf5f00610, buffer_p=0xf5100f50 '\276' <repeats 44 times>, buffer_size=4) at /jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1008 #7 0x565fa089 in ecma_builtin_string_prototype_object_repeat (original_string_p=0xf5f00610, count=176) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1930 #8 0x565fae8c in ecma_builtin_string_prototype_dispatch_routine (builtin_routine_id=89, this_arg=4126148113, arguments_list_p=0xffffcb90, arguments_number=1) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2152 #9 0x566002d7 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_STRING_PROTOTYPE, builtin_routine_id=89, this_arg_value=4126148113, arguments_list_p=0xffffcb90, arguments_list_len=1) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1021 #10 0x56600538 in ecma_builtin_dispatch_call (obj_p=0xf5f00580, this_arg_value=4126148113, arguments_list_p=0xffffceec, arguments_list_len=1) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1046 #11 0x56622467 in ecma_op_function_call (func_obj_p=0xf5f00580, this_arg_value=4126148113, arguments_list_p=0xffffceec, arguments_list_len=1) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #12 0x566afd80 in opfunc_call (frame_ctx_p=0xffffcf90) at /jerryscript/jerry-core/vm/vm.c:581 #13 0x566c5113 in vm_execute (frame_ctx_p=0xffffcf90, arg_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3629 #14 0x566c59c2 in vm_run (bytecode_header_p=0xf5301ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3749 #15 0x566aebe6 in vm_run_global (bytecode_p=0xf5301ad0) at /jerryscript/jerry-core/vm/vm.c:282 #16 0x56570c6c in jerry_run (func_val=4126148931) at /jerryscript/jerry-core/api/jerry.c:570 #17 0x5656d5bf in main (argc=3, argv=0xffffd3f4) at /jerryscript/jerry-main/main-unix.c:743 ```
Assertion 'ecma_string_get_size (string_p) <= buffer_size' in ecma-helpers-string.c
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3105/comments
0
2019-09-13T09:27:55Z
2019-09-16T10:55:34Z
https://github.com/jerryscript-project/jerryscript/issues/3105
493,225,190
3,105
[ "jerryscript-project", "jerryscript" ]
I think that now that version 2.0 of JerryScript is out, we (as the maintainers/reviewers of the project) may acknowledge that our release strategy has been suboptimal. The project wasn't dead, as it was being continuously enhanced and extended. Yet, there had been no release for a period of almost 3 years. Yikes! So, I propose to adopt two concepts from now on (i.e., should this motion pass): - ["Release early, release often"](https://en.wikipedia.org/wiki/Release_early,_release_often) (*) - [Semantic versioning](https://semver.org) (* With the remark that "early" shouldn't and mustn't mean "buggy".) So, a bit more thoughts about these ideas: **Release Cadence** For v2.0, we wanted to give our community a nice well-polished set of new features, APIs, etc. I don't think that we've failed, but it just took too long. So, I propose to release a new version whenever a reasonable new feature or feature set is landed and stabilized in the project, even if we know that there will be related features implemented in the near (or not so near) future. Same goes for bug fixes and refactorings: even if the project is not extended feature-wise for some time but some useful internal refactorings or fixes are landed, we should come out with a new release. I'd encourage all contributors to be pro-active. If they land some features in the project and think that it forms a nice "package" of improvement of the project, they should raise their voice and advocate a new release. (Maintainers should still have the final word about releases, but this could ensure that a release potential will not slip their attention.) A GitHub Issue seems to be a good way of proposing a new release, it will allow discussion between interested parties. Should a motion for a new release pass, we'll have to ensure that it is in a reasonably stable state. CIs should be green. Known bugs should be fixed (as much as reasonably possible, at the discretion of the maintainers). Landing of features should be frozen for a short period to focus on stabilizing the release. (This should be some days or a week or so, when no new bugs pop up. This may depend on the volume of changes, but I'd prefer no overly long freezes. Just enough to make sure that we have a good level of confidence in the stability of the project.) Some notes: - This is NOT intended to mean a release after every commit. Of course not. - No strict periodicity. We may have some months between some releases (e.g., if heavier features are being implemented), but we may also have days or weeks between some releases (e.g., if we only land fixes, or smaller features). - Contributors may still open PRs and get reviews (modulo reviewers' availability) while the project is "frozen" before a new release. - GitHub Milestones might be used to track work left, once we have agreed on the necessity of a new release. **Semantic Versioning** I really think that this would fit very well to the above-suggested frequent release strategy. We got some annoying bugs fixed: great, let's have a release x.y.Z+1! We have support for a new ES6 language keyword, or some new builtins got implemented: great, let's have a release x.Y+1.0! We have reworked the API: ok, let's have a major version bump. (Now, that shouldn't happen *too* often. But we shouldn't be overly afraid of it either. The right balance is the key.) Some notes: - We could say that we're already using semver. But actually, we aren't. We'd at least require a patch version number. (This also means that if/when we add the patch version macro to our headers, thereby we extend our API, so our next release will be version 2.1.0 right away.) - We'll have to state clearly what constitutes our public API that falls under the jurisdiction of semver. (E.g., IMO, binary snapshots MUST NOT be considered as part of the public API. They are not for persistent storage between versions or between devices. A bump in the snapshot version SHOULD NOT imply a major version bump of the project.) - To state the obvious: adding a new public API function does not require increasing the major version, it only bumps the minor one. - We shouldn't be afraid of major version bumps, but it shouldn't happen on daily basis either. It has to be the maintainers' responsibility to have some foresight and plan breaking changes carefully. We have to offer some kind of API stability. (Foresight and planning also imply some kind of a feature roadmap. We'll have to have a (separate) discussion about that, too.) - This wouldn't mean the maintenance of multiple major version or LTS branches, backporting bugfixes, etc. I don't think that we have the resources for that. Versions (that follow semver) remain tags on the master branch. - We might also introduce a tag named "latest", which should always be moved to the latest release. (A good practice used by other projects out there.) (But this should be the only tag moving. Semver tags MUST stick.) *Looking forward to comments.*
Versioning and Release Cadence Plans
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3104/comments
0
2019-09-13T08:48:41Z
2019-10-16T13:14:57Z
https://github.com/jerryscript-project/jerryscript/issues/3104
493,207,868
3,104
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 376cfea4 ###### Build platform Linux-4.15.0-62-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 while ( $(($) => {}) ) { 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):792. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565797ef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661336b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566133ac in jerry_assert_fail (assertion=0x566a3e00 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a37a0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693e00 <__func__.5353.lto_priv.24> "parser_parse_while_statement_start", line=792) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565ae8ab in parser_parse_while_statement_start.lto_priv.189 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:792 #7 0x5656fcb8 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2407 #8 0x565d1817 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "var sum = 0 ; \nvar i = 0 , j = 0 ; \ntop : while ( print ( ( static , package ) => { id_0 = 5 ; \nreturn static + package \n} ( 4 , 5 ) == 9 ) ) { j = 0 ; \nwhile ( j ++ < 20 ) { if ( j > 9 && i % 2 ) \n\ns"..., source_size=258, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #9 0x565d457d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "var sum = 0 ; \nvar i = 0 , j = 0 ; \ntop : while ( print ( ( static , package ) => { id_0 = 5 ; \nreturn static + package \n} ( 4 , 5 ) == 9 ) ) { j = 0 ; \nwhile ( j ++ < 20 ) { if ( j > 9 && i % 2 ) \n\ns"..., source_size=258, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #10 0x56646c57 in jerry_parse (resource_name_p=0xffffcd9e "/home/reni/.fuzzinator_4700//jerryscript/picireny/226352238123353446202575254567104709806.js", resource_name_length=92, source_p=0x566eda80 <buffer.lto_priv> "var sum = 0 ; \nvar i = 0 , j = 0 ; \ntop : while ( print ( ( static , package ) => { id_0 = 5 ; \nreturn static + package \n} ( 4 , 5 ) == 9 ) ) { j = 0 ; \nwhile ( j ++ < 20 ) { if ( j > 9 && i % 2 ) \n\ns"..., source_size=258, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #11 0x56643bac in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_while_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3102/comments
0
2019-09-13T06:46:32Z
2019-09-17T15:28:13Z
https://github.com/jerryscript-project/jerryscript/issues/3102
493,163,178
3,102
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 376cfea4 ###### Build platform Linux-4.15.0-62-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 ( ; ; ( ) => 0) { for ( ; $; $) ; } ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_for_statement_start):1103. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565797ef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5661336b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566133ac in jerry_assert_fail (assertion=0x566a3e00 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a37a0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693ec0 <__func__.5372.lto_priv.199> "parser_parse_for_statement_start", line=1103) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565b06f4 in parser_parse_for_statement_start.lto_priv.188 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1103 #7 0x5656fccb in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2413 #8 0x565d1817 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "var x = 0 ; \nfor ( i = 0 ; i < 10 ; ++ i ) { lablemark : for ( j = 0 ; j < 10 ; ( ) => 1 ) { for ( k = 0 ; k < 10 ; ++ k ) { ++ x ; \n\n} \n\n} \n\n\n} \n\nprint ( x == 10 ) \n ", source_size=168, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #9 0x565d457d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda80 <buffer.lto_priv> "var x = 0 ; \nfor ( i = 0 ; i < 10 ; ++ i ) { lablemark : for ( j = 0 ; j < 10 ; ( ) => 1 ) { for ( k = 0 ; k < 10 ; ++ k ) { ++ x ; \n\n} \n\n} \n\n\n} \n\nprint ( x == 10 ) \n ", source_size=168, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #10 0x56646c57 in jerry_parse (resource_name_p=0xffffcd9e "/home/reni/.fuzzinator_4700//jerryscript/picireny/189250840335986162413794089751660266979.js", resource_name_length=92, source_p=0x566eda80 <buffer.lto_priv> "var x = 0 ; \nfor ( i = 0 ; i < 10 ; ++ i ) { lablemark : for ( j = 0 ; j < 10 ; ( ) => 1 ) { for ( k = 0 ; k < 10 ; ++ k ) { ++ x ; \n\n} \n\n} \n\n\n} \n\nprint ( x == 10 ) \n ", source_size=168, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #11 0x56643bac in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_for_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3101/comments
0
2019-09-13T06:44:15Z
2019-09-17T15:28:12Z
https://github.com/jerryscript-project/jerryscript/issues/3101
493,162,468
3,101
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 57de9237 ###### Build platform Linux-4.15.0-62-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 $($ = $, ... d) { for ( var $; $; $); } ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_for_statement_start):1103. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x565797cf in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56613186 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566131c7 in jerry_assert_fail (assertion=0x566a3c20 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a35c0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693ce0 <__func__.5372.lto_priv.197> "parser_parse_for_statement_start", line=1103) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565b06d4 in parser_parse_for_statement_start.lto_priv.186 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1103 #7 0x5656fcab in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2413 #8 0x565d37d3 in parser_parse_function (context_p=0xffffc4b0, status_flags=6) at jerryscript/jerry-core/parser/js/js-parser.c:2782 #9 0x5659718f in lexer_construct_function_object (context_p=0xffffc4b0, extra_status_flags=6) at jerryscript/jerry-core/parser/js/js-lexer.c:1978 #10 0x565acbed in parser_parse_function_statement.lto_priv.190 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:469 #11 0x5656fa83 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2371 #12 0x565d17f7 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda60 <buffer.lto_priv> "function CheckSyntaxError ( str ) { try { eval ( str ) ; \nprint ( false ) ; \n} catch ( e ) { print ( e instanceof SyntaxError ) ; \n} \ntry { eval ( 'switch (1) { default: ' + str + '}' ) ; \nprint ( fal"..., source_size=1634, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #13 0x565d455d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566eda60 <buffer.lto_priv> "function CheckSyntaxError ( str ) { try { eval ( str ) ; \nprint ( false ) ; \n} catch ( e ) { print ( e instanceof SyntaxError ) ; \n} \ntry { eval ( 'switch (1) { default: ' + str + '}' ) ; \nprint ( fal"..., source_size=1634, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #14 0x56646a72 in jerry_parse (resource_name_p=0xffffcd9e "/home/reni/.fuzzinator_4700//jerryscript/picireny/241539370413020919875576301442750382603.js", resource_name_length=92, source_p=0x566eda60 <buffer.lto_priv> "function CheckSyntaxError ( str ) { try { eval ( str ) ; \nprint ( false ) ; \n} catch ( e ) { print ( e instanceof SyntaxError ) ; \n} \ntry { eval ( 'switch (1) { default: ' + str + '}' ) ; \nprint ( fal"..., source_size=1634, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #15 0x566439c7 in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_for_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3100/comments
1
2019-09-12T15:06:34Z
2019-09-12T16:04:40Z
https://github.com/jerryscript-project/jerryscript/issues/3100
492,866,125
3,100
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision f3d3c34c ###### Build platform Linux-4.15.0-62-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 switch ($) { case $: function $( $ = $, ... c ) { } case $ : } ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_COLON' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_case_statement):1556. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657986c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56612a2c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612a6d in jerry_assert_fail (assertion=0x56692940 "context_p->token.type != LEXER_COLON", file=0x56692860 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693580 <__func__.5443> "parser_parse_case_statement", line=1556) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5656bf31 in parser_parse_case_statement (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1556 #7 0x5656fef0 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2458 #8 0x565d13d7 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "switch ( 1 ) { case 0 : function id_0 ( a = 5 , b = a + 1 , ... c ) { return a + b + c .length ; \n} \ncase 1 : break ; \ndefault : print ( false ) ; \n} \n ", source_size=152, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #9 0x565d413d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "switch ( 1 ) { case 0 : function id_0 ( a = 5 , b = a + 1 , ... c ) { return a + b + c .length ; \n} \ncase 1 : break ; \ndefault : print ( false ) ; \n} \n ", source_size=152, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #10 0x56646350 in jerry_parse (resource_name_p=0xffffcd9e "/home/reni/.fuzzinator_4700//jerryscript/picireny/274995507024498709233211231877734069138.js", resource_name_length=92, source_p=0x566edb00 <buffer.lto_priv> "switch ( 1 ) { case 0 : function id_0 ( a = 5 , b = a + 1 , ... c ) { return a + b + c .length ; \n} \ncase 1 : break ; \ndefault : print ( false ) ; \n} \n ", source_size=152, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #11 0x566432a5 in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_COLON in parser_parse_case_statement
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3097/comments
0
2019-09-11T20:27:58Z
2019-09-12T16:04:01Z
https://github.com/jerryscript-project/jerryscript/issues/3097
492,450,511
3,097
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision f3d3c34c ###### Build platform Linux-4.15.0-62-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 class $ { set ( ) { while ( done ) } } ``` ###### 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):792. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657986c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56612a2c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612a6d in jerry_assert_fail (assertion=0x566a3340 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a2ce0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693340 <__func__.5366.lto_priv.21> "parser_parse_while_statement_start", line=792) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565ae7d2 in parser_parse_while_statement_start.lto_priv.176 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:792 #7 0x5656fd18 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2407 #8 0x565d13d7 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { return a * b ; \n} static set ( a , b ) { return a / b ; \n} } \nwhile ( ! next .done "..., source_size=450, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #9 0x565d413d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { return a * b ; \n} static set ( a , b ) { return a / b ; \n} } \nwhile ( ! next .done "..., source_size=450, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #10 0x56646350 in jerry_parse (resource_name_p=0xffffcd9f "/home/reni/.fuzzinator_4700//jerryscript/picireny/71896983419169202541027381321550500806.js", resource_name_length=91, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { return a * b ; \n} static set ( a , b ) { return a / b ; \n} } \nwhile ( ! next .done "..., source_size=450, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #11 0x566432a5 in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_while_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3096/comments
1
2019-09-11T16:43:33Z
2019-09-12T14:09:14Z
https://github.com/jerryscript-project/jerryscript/issues/3096
492,348,960
3,096
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision f3d3c34c ###### Build platform Linux-4.15.0-62-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 class $ { set ( ) { switch ( $ ) { } } } ``` ###### Output ```text ICE: Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_switch_statement_start):1235. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657986c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56612a2c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612a6d in jerry_assert_fail (assertion=0x566a36e0 "context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH", file=0x566a2ce0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x566934a0 <__func__.5416.lto_priv.184> "parser_parse_switch_statement_start", line=1235) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565b158d in parser_parse_switch_statement_start.lto_priv.177 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1234 #7 0x5656fb29 in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2383 #8 0x565d33b3 in parser_parse_function (context_p=0xffffc4b0, status_flags=6) at jerryscript/jerry-core/parser/js/js-parser.c:2782 #9 0x565970f2 in lexer_construct_function_object (context_p=0xffffc4b0, extra_status_flags=6) at jerryscript/jerry-core/parser/js/js-lexer.c:1978 #10 0x5659cd78 in parser_parse_class_literal (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:552 #11 0x5659d55a in parser_parse_class (context_p=0xffffc4b0, is_statement=true) at jerryscript/jerry-core/parser/js/js-parser-expr.c:659 #12 0x5656faca in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2350 #13 0x565d13d7 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { switch ( 1 ) { } \n} static set ( a , b ) { return a / b ; \n} } \nprint ( A .get ( 1 "..., source_size=353, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #14 0x565d413d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { switch ( 1 ) { } \n} static set ( a , b ) { return a / b ; \n} } \nprint ( A .get ( 1 "..., source_size=353, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #15 0x56646350 in jerry_parse (resource_name_p=0xffffcd9e "/home/reni/.fuzzinator_4700//jerryscript/picireny/266178213241317289343316177130382572801.js", resource_name_length=92, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { switch ( 1 ) { } \n} static set ( a , b ) { return a / b ; \n} } \nprint ( A .get ( 1 "..., source_size=353, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #16 0x566432a5 in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH in parser_parse_switch_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3095/comments
0
2019-09-11T16:16:51Z
2019-09-12T14:09:14Z
https://github.com/jerryscript-project/jerryscript/issues/3095
492,336,549
3,095
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision f3d3c34c ###### Build platform Linux-4.15.0-62-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 class $ { set ( ) {} } for ( ; 10 ; i ) ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_for_statement_start):1103. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5079 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657986c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56612a2c in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612a6d in jerry_assert_fail (assertion=0x566a3340 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a2ce0 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693400 <__func__.5385.lto_priv.186> "parser_parse_for_statement_start", line=1103) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565b061b in parser_parse_for_statement_start.lto_priv.175 (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1103 #7 0x5656fd2b in parser_parse_statements (context_p=0xffffc4b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2413 #8 0x565d13d7 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { return a * b ; \n} static set ( a , b ) { return a / b ; \n} } \nfor ( var i = 0 ; i <"..., source_size=278, parse_opts=0, error_location_p=0xffffc6c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #9 0x565d413d in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { return a * b ; \n} static set ( a , b ) { return a / b ; \n} } \nfor ( var i = 0 ; i <"..., source_size=278, parse_opts=0, bytecode_data_p=0xffffc780) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #10 0x56646350 in jerry_parse (resource_name_p=0xffffcd9e "/home/reni/.fuzzinator_4700//jerryscript/picireny/318426948300507770507763748749293434364.js", resource_name_length=92, source_p=0x566edb00 <buffer.lto_priv> "class A { get ( a , b , c ) { return a + b + c ; \n} static get ( a , b , c ) { return a - b - c ; \n} set ( a , b ) { return a * b ; \n} static set ( a , b ) { return a / b ; \n} } \nfor ( var i = 0 ; i <"..., source_size=278, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #11 0x566432a5 in main (argc=3, argv=0xffffcb14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_for_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3094/comments
0
2019-09-11T16:05:52Z
2019-09-12T14:09:14Z
https://github.com/jerryscript-project/jerryscript/issues/3094
492,331,115
3,094
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision fbde788d ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript class $ { super ( ) { class B extends A { constructor ( ) { super.f for ( ; i ; i ) ``` ###### Output ```text ICE: Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at jerryscript/jerry-core/parser/js/js-parser-statm.c(parser_parse_for_statement_start):1103. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657984c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566126c6 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612707 in jerry_assert_fail (assertion=0x566a2fc0 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a2960 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56693080 <__func__.5384.lto_priv.190> "parser_parse_for_statement_start", line=1103) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565b0567 in parser_parse_for_statement_start.lto_priv.179 (context_p=0xffffc5b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1103 #7 0x5656fd0b in parser_parse_statements (context_p=0xffffc5b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2413 #8 0x565d1323 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566ecae0 <buffer.lto_priv> "class A { constructor ( ) { this .a = 5 ; \n} f ( ) { return 10 ; \n} super ( ) { this .super = 10 ; \nreturn 15 ; \n} } \nclass B extends A { constructor ( ) { super ( ) ; \nprint ( super .f === A .prototy"..., source_size=615, parse_opts=0, error_location_p=0xffffc7c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #9 0x565d4089 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566ecae0 <buffer.lto_priv> "class A { constructor ( ) { this .a = 5 ; \n} f ( ) { return 10 ; \n} super ( ) { this .super = 10 ; \nreturn 15 ; \n} } \nclass B extends A { constructor ( ) { super ( ) ; \nprint ( super .f === A .prototy"..., source_size=615, parse_opts=0, bytecode_data_p=0xffffc880) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #10 0x56645fea in jerry_parse (resource_name_p=0xffffce8a "/home/reni/.fuzzinator_26530//jerryscript/picireny/262652376692434160395848456431589147513.js", resource_name_length=93, source_p=0x566ecae0 <buffer.lto_priv> "class A { constructor ( ) { this .a = 5 ; \n} f ( ) { return 10 ; \n} super ( ) { this .super = 10 ; \nreturn 15 ; \n} } \nclass B extends A { constructor ( ) { super ( ) ; \nprint ( super .f === A .prototy"..., source_size=615, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #11 0x56642f3f in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_for_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3089/comments
0
2019-09-11T12:00:57Z
2019-09-11T14:55:59Z
https://github.com/jerryscript-project/jerryscript/issues/3089
492,193,785
3,089
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision fbde788d ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript class $ { super ( ) { class B extends A { constructor ( ) { super ( ) while ( 1 ) ``` ###### 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):792. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657984c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566126c6 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56612707 in jerry_assert_fail (assertion=0x566a2fc0 "context_p->token.type != LEXER_RIGHT_PAREN", file=0x566a2960 "jerryscript/jerry-core/parser/js/js-parser-statm.c", function=0x56692fc0 <__func__.5365.lto_priv.26> "parser_parse_while_statement_start", line=792) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565ae71e in parser_parse_while_statement_start.lto_priv.180 (context_p=0xffffc5b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:792 #7 0x5656fcf8 in parser_parse_statements (context_p=0xffffc5b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2407 #8 0x565d32ff in parser_parse_function (context_p=0xffffc5b0, status_flags=3146758) at jerryscript/jerry-core/parser/js/js-parser.c:2782 #9 0x5659ca52 in parser_parse_class_literal (context_p=0xffffc5b0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:524 #10 0x5659d4a6 in parser_parse_class (context_p=0xffffc5b0, is_statement=true) at jerryscript/jerry-core/parser/js/js-parser-expr.c:659 #11 0x5656faaa in parser_parse_statements (context_p=0xffffc5b0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2350 #12 0x565d1323 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x566ecae0 <buffer.lto_priv> "class A { constructor ( ) { this .a = 5 ; \n} f ( ) { return 10 ; \n} super ( ) { this .super = 10 ; \nreturn 15 ; \n} } \nclass B extends A { constructor ( ) { super ( ) ; \nwhile ( 1 ) { cnt ++ ; \nif ( cn"..., source_size=605, parse_opts=0, error_location_p=0xffffc7c0) at jerryscript/jerry-core/parser/js/js-parser.c:2530 #13 0x565d4089 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x566ecae0 <buffer.lto_priv> "class A { constructor ( ) { this .a = 5 ; \n} f ( ) { return 10 ; \n} super ( ) { this .super = 10 ; \nreturn 15 ; \n} } \nclass B extends A { constructor ( ) { super ( ) ; \nwhile ( 1 ) { cnt ++ ; \nif ( cn"..., source_size=605, parse_opts=0, bytecode_data_p=0xffffc880) at jerryscript/jerry-core/parser/js/js-parser.c:2993 #14 0x56645fea in jerry_parse (resource_name_p=0xffffce8b "/home/reni/.fuzzinator_26530//jerryscript/picireny/73940511702335612187254617459470340328.js", resource_name_length=92, source_p=0x566ecae0 <buffer.lto_priv> "class A { constructor ( ) { this .a = 5 ; \n} f ( ) { return 10 ; \n} super ( ) { this .super = 10 ; \nreturn 15 ; \n} } \nclass B extends A { constructor ( ) { super ( ) ; \nwhile ( 1 ) { cnt ++ ; \nif ( cn"..., source_size=605, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:420 #15 0x56642f3f in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:734 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion context_p->token.type != LEXER_RIGHT_PAREN in parser_parse_while_statement_start
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3088/comments
0
2019-09-11T11:58:40Z
2019-09-11T14:55:58Z
https://github.com/jerryscript-project/jerryscript/issues/3088
492,192,647
3,088
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 29339475 ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript String.prototype.repeat(1.1) ``` ###### Output ```text ASAN:DEADLYSIGNAL ================================================================= ==4704==ERROR: AddressSanitizer: FPE on unknown address 0x5661e0ba (pc 0x5661e0ba bp 0xffc6aaa8 sp 0xffc6a9f0 T0) #0 0x5661e0b9 in ecma_builtin_string_prototype_object_repeat jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1917 #1 0x5661ea4c in ecma_builtin_string_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2152 #2 0x566b6092 in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #3 0x566b62f3 in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #4 0x566c95f4 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #5 0x5667f2fe in opfunc_call jerryscript/jerry-core/vm/vm.c:581 #6 0x56690531 in vm_execute jerryscript/jerry-core/vm/vm.c:3622 #7 0x56690e35 in vm_run jerryscript/jerry-core/vm/vm.c:3742 #8 0x5667e595 in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #9 0x566d72c4 in jerry_run jerryscript/jerry-core/api/jerry.c:570 #10 0x566d3c28 in main jerryscript/jerry-main/main-unix.c:743 #11 0xf7799e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #12 0x566006f0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x166f0) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: FPE jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1917 in ecma_builtin_string_prototype_object_repeat ==4704==ABORTING ``` ###### Backtrace ```text bt #0 0x565890ba in ecma_builtin_string_prototype_object_repeat (original_string_p=0xd, count=4124051186) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1917 #1 0x56589a4d in ecma_builtin_string_prototype_dispatch_routine (builtin_routine_id=89, this_arg=4126148883, arguments_list_p=0xffffc4d0, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2152 #2 0x56621093 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_STRING_PROTOTYPE, builtin_routine_id=89, this_arg_value=4126148883, arguments_list_p=0xffffc4d0, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #3 0x566212f4 in ecma_builtin_dispatch_call (obj_p=0xf5f008b0, this_arg_value=4126148883, arguments_list_p=0xffffc770, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #4 0x566345f5 in ecma_op_function_call (func_obj_p=0xf5f008b0, this_arg_value=4126148883, arguments_list_p=0xffffc770, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #5 0x565ea2ff in opfunc_call (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:581 #6 0x565fb532 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3622 #7 0x565fbe36 in vm_run (bytecode_header_p=0xf63015e0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #8 0x565e9596 in vm_run_global (bytecode_p=0xf63015e0) at jerryscript/jerry-core/vm/vm.c:282 #9 0x566422c5 in jerry_run (func_val=4126148979) at jerryscript/jerry-core/api/jerry.c:570 #10 0x5663ec29 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
FPE in ecma_builtin_string_prototype_object_repeat
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3084/comments
0
2019-09-07T14:16:26Z
2019-09-10T13:03:54Z
https://github.com/jerryscript-project/jerryscript/issues/3084
490,640,427
3,084
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 4bdc3a1c46 I am not sure which version, recently updated ###### Build platform SylixOS ###### Test case ```js #! /bin/javascript var obj = { expires: 11223, secure: true, httpOnly: function() {console.log('test')}, domain: null, path: './', sameSite: undefined, sub1: {}, sub2: {id: 123}, sub3: [], sub4: [123, 'test'], } var session = { cookie: obj, views: { '/foo': 1 } } var str = JSON.stringify(session); console.log(str); var sess = JSON.parse(str); console.log(sess); ``` ###### Output ``` [JSRE-USR]{"cookie":{"expires":11223,"secure":true"domain":null,"path":"./""sub1":{},"sub2":{"id":123},"sub3":[],"sub4":[123,"test"]},"views":{"/foo":1}} [JSRE-SYS]Exception backtrace: 0: ./json.js:26 Script Except: SyntaxError: Invalid JSON format. ``` ###### Bug report JSON.stringify error: - "secure":true"domain":null - "path":"./""sub1":{} `JSON.stringify's result is error when object's member have `function()` or `undefined`.
BUG: JSON.stringify's result error.
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3082/comments
1
2019-09-07T08:43:08Z
2019-09-08T21:49:27Z
https://github.com/jerryscript-project/jerryscript/issues/3082
490,610,752
3,082
[ "jerryscript-project", "jerryscript" ]
###### Revision 57f389d ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript for (b = 0; b < 100; b++) { var setv = new Set(); setv.add(1); setv.add(Math.SQRT2); setv.forEach(function(value, key, set) { setv.clear(); (eval)("" + 123); }); } ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==114285==ERROR: AddressSanitizer: heap-use-after-free on address 0xf5f04ba4 at pc 0x5664b9b5 bp 0xffe37e38 sp 0xffe37e28 READ of size 1 at 0xf5f04ba4 thread T0 #0 0x5664b9b4 in ecma_find_named_property /jerryscript/jerry-core/ecma/base/ecma-helpers.c:560 #1 0x566bf8d9 in ecma_op_container_foreach /jerryscript/jerry-core/ecma/operations/ecma-container-object.c:469 #2 0x566978a8 in ecma_builtin_set_prototype_object_foreach /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c:99 #3 0x56697752 in ecma_builtin_set_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.inc.h:44 #4 0x566a8be1 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #5 0x566a8e42 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #6 0x566cab53 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #7 0x5674fbdf in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #8 0x56764d83 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #9 0x56765632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #10 0x5674ea45 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #11 0x56619a9b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #12 0x566163ee in main /jerryscript/jerry-main/main-unix.c:743 #13 0xf77d8e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #14 0x56613cc0 (/home/xyz/jerryscript/tmpmaster/jerry+0x15cc0) 0xf5f04ba4 is located 4 bytes inside of 24-byte region [0xf5f04ba0,0xf5f04bb8) freed by thread T0 here: #0 0xf7a7eb74 in __interceptor_free (/usr/lib32/libasan.so.4+0xe5b74) #1 0x566f9d79 in jmem_heap_free_block_internal /jerryscript/jerry-core/jmem/jmem-heap.c:481 #2 0x56628c06 in jmem_heap_free_block /jerryscript/jerry-core/jmem/jmem-heap.c:673 #3 0x56628c06 in ecma_dealloc_property_pair /jerryscript/jerry-core/ecma/base/ecma-alloc.c:236 #4 0x56628c06 in ecma_gc_free_object /jerryscript/jerry-core/ecma/base/ecma-gc.c:672 #5 0x5662aad8 in ecma_gc_run /jerryscript/jerry-core/ecma/base/ecma-gc.c:1066 #6 0x5662ae4e in ecma_free_unused_memory /jerryscript/jerry-core/ecma/base/ecma-gc.c:1124 #7 0x566f9bbb in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:290 #8 0x5671810c in jmem_heap_alloc_block_null_on_error /jerryscript/jerry-core/jmem/jmem-heap.c:345 #9 0x5671810c in parser_malloc /jerryscript/jerry-core/parser/js/js-parser-mem.c:43 #10 0x567194f7 in parser_stack_push_uint8 /jerryscript/jerry-core/parser/js/js-parser-mem.c:375 #11 0x5673d2d1 in parser_parse_source /jerryscript/jerry-core/parser/js/js-parser.c:2459 #12 0x567401a7 in parser_parse_script /jerryscript/jerry-core/parser/js/js-parser.c:2936 #13 0x566c795d in ecma_op_eval_chars_buffer /jerryscript/jerry-core/ecma/operations/ecma-eval.c:104 #14 0x566c76be in ecma_op_eval /jerryscript/jerry-core/ecma/operations/ecma-eval.c:58 #15 0x5666ecb7 in ecma_builtin_global_object_eval /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:111 #16 0x56672b5b in ecma_builtin_global_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-global.c:1164 #17 0x566a8be1 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #18 0x566a8e42 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #19 0x566cab53 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #20 0x5674fbdf in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #21 0x56764d83 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #22 0x56765632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #23 0x566cb0a7 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #24 0x566bfbc6 in ecma_op_container_foreach /jerryscript/jerry-core/ecma/operations/ecma-container-object.c:504 #25 0x566978a8 in ecma_builtin_set_prototype_object_foreach /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c:99 #26 0x56697752 in ecma_builtin_set_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.inc.h:44 #27 0x566a8be1 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #28 0x566a8e42 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #29 0x566cab53 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #30 0x5674fbdf in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #31 0x56764d83 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #32 0x56765632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 previously allocated by thread T0 here: #0 0xf7a7ef34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566f9b51 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x566f9bc9 in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x56649e89 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x56649e89 in ecma_alloc_property_pair /jerryscript/jerry-core/ecma/base/ecma-alloc.c:223 #5 0x56649e89 in ecma_create_property /jerryscript/jerry-core/ecma/base/ecma-helpers.c:401 #6 0x5664a886 in ecma_create_named_data_property /jerryscript/jerry-core/ecma/base/ecma-helpers.c:486 #7 0x566bf2b7 in ecma_op_container_set /jerryscript/jerry-core/ecma/operations/ecma-container-object.c:409 #8 0x5669783c in ecma_builtin_set_prototype_object_add /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c:50 #9 0x56697669 in ecma_builtin_set_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.inc.h:41 #10 0x566a8be1 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #11 0x566a8e42 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #12 0x566cab53 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #13 0x5674fbdf in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #14 0x56764d83 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #15 0x56765632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #16 0x5674ea45 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #17 0x56619a9b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #18 0x566163ee in main /jerryscript/jerry-main/main-unix.c:743 #19 0xf77d8e80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-use-after-free /jerryscript/jerry-core/ecma/base/ecma-helpers.c:560 in ecma_find_named_property Shadow bytes around the buggy address: 0x3ebe0920: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ebe0930: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ebe0940: fa fa fa fa fa fa fa fa fa fa 00 00 00 fa fa fa 0x3ebe0950: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x3ebe0960: fa fa 00 00 00 fa fa fa fd fd fd fa fa fa 00 00 =>0x3ebe0970: 00 fa fa fa[fd]fd fd fa fa fa 00 00 00 04 fa fa 0x3ebe0980: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x3ebe0990: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd 0x3ebe09a0: fd fa fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x3ebe09b0: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x3ebe09c0: fa fa fd fd fd fa fa fa fd fd 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 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 ==114285==ABORTING ```
heap-use-after-free in ecma_find_named_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3079/comments
0
2019-09-06T09:47:08Z
2019-09-09T08:36:34Z
https://github.com/jerryscript-project/jerryscript/issues/3079
490,234,871
3,079
[ "jerryscript-project", "jerryscript" ]
###### Revision 57f389d ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arrb = new ArrayBuffer(13); var arr = new Uint8Array(arrb, 9); arr.slice(1); ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==40977==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5300f7b at pc 0xf79a68be bp 0xffa46dd8 sp 0xffa469a8 READ of size 3 at 0xf5300f7b thread T0 #0 0xf79a68bd (/usr/lib32/libasan.so.4+0x778bd) #1 0x5661d6d8 in ecma_builtin_typedarray_prototype_slice /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:1973 #2 0x566141cf in ecma_builtin_typedarray_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.inc.h:76 #3 0x56612be1 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #4 0x56612e42 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #5 0x56634b53 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #6 0x566b9bdf in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #7 0x566ced83 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #8 0x566cf632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #9 0x566b8a45 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #10 0x56583a9b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #11 0x565803ee in main /jerryscript/jerry-main/main-unix.c:743 #12 0xf776ee80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #13 0x5657dcc0 (/home/xyz/jerryscript/tmpmaster/jerry+0x15cc0) 0xf5300f7b is located 6 bytes to the right of 37-byte region [0xf5300f50,0xf5300f75) allocated by thread T0 here: #0 0xf7a14f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x56663b51 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x56663bc9 in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x565b2342 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x565b2342 in ecma_alloc_extended_object /jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x565b2342 in ecma_create_object /jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x566239b8 in ecma_arraybuffer_new_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x56623f18 in ecma_op_create_arraybuffer_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x565d0532 in ecma_builtin_arraybuffer_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x566130d6 in ecma_builtin_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1084 #10 0x56636152 in ecma_op_function_construct /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #11 0x566ba1fe in opfunc_construct /jerryscript/jerry-core/vm/vm.c:665 #12 0x566ceda9 in vm_execute /jerryscript/jerry-core/vm/vm.c:3634 #13 0x566cf632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #14 0x566b8a45 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #15 0x56583a9b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #16 0x565803ee in main /jerryscript/jerry-main/main-unix.c:743 #17 0xf776ee80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.4+0x778bd) Shadow bytes around the buggy address: 0x3ea60190: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea601a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea601b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea601c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea601d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ea601e0: fa fa fa fa fa fa fa fa fa fa 00 00 00 00 05[fa] 0x3ea601f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60210: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60220: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea60230: 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 ==40977==ABORTING ```
heap-buffer-overflow in ecma_builtin_typedarray_prototype_slice
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3078/comments
0
2019-09-06T08:56:22Z
2019-09-07T10:22:20Z
https://github.com/jerryscript-project/jerryscript/issues/3078
490,210,652
3,078
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 57f389dc ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var arr = [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]; arr [ 4294967294 ] = 0 ``` ###### Output ```text ICE: Assertion 'ext_obj_p->u.array.hole_count <= ECMA_FAST_ARRAY_MAX_HOLE_COUNT' failed at jerryscript/jerry-core/ecma/operations/ecma-array-object.c(ecma_fast_array_set_property):277. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ac4c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56618af4 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56618b35 in jerry_assert_fail (assertion=0x566af220 "ext_obj_p->u.array.hole_count <= ECMA_FAST_ARRAY_MAX_HOLE_COUNT", file=0x566aef80 "jerryscript/jerry-core/ecma/operations/ecma-array-object.c", function=0x5667cea0 <__func__.4083.lto_priv.595> "ecma_fast_array_set_property", line=277) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56629798 in ecma_fast_array_set_property (object_p=0xf5f00730, property_name_p=0xf5d00570, value=4124051185) at jerryscript/jerry-core/ecma/operations/ecma-array-object.c:277 #7 0x56606737 in ecma_op_object_put (object_p=0xf5f00730, property_name_p=0xf5d00570, value=4124051185, is_throw=false) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1007 #8 0x565e9060 in vm_op_set_value (object=4126148403, property=4124050770, value=4124051185, is_strict=false) at jerryscript/jerry-core/vm/vm.c:212 #9 0x565f96f8 in vm_loop (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:3349 #10 0x565fb064 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3616 #11 0x565fb9c8 in vm_run (bytecode_header_p=0xf5103c80, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #12 0x565e9128 in vm_run_global (bytecode_p=0xf5103c80) at jerryscript/jerry-core/vm/vm.c:282 #13 0x56641db1 in jerry_run (func_val=4126148835) at jerryscript/jerry-core/api/jerry.c:570 #14 0x5663e715 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion ext_obj_p->u.array.hole_count <= ECMA_FAST_ARRAY_MAX_HOLE_COUNT in ecma_fast_array_set_property
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3075/comments
0
2019-09-05T21:42:08Z
2019-09-09T08:36:49Z
https://github.com/jerryscript-project/jerryscript/issues/3075
490,023,778
3,075
[ "jerryscript-project", "jerryscript" ]
###### Revision 57f389d ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arrb = new ArrayBuffer(13); var d = new DataView(arrb, 12, -Infinity); d.setFloat32(1, 1); ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==48937==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5100f75 at pc 0x56651652 bp 0xff92a1f8 sp 0xff92a1e8 WRITE of size 4 at 0xf5100f75 thread T0 #0 0x56651651 in ecma_set_typedarray_element /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:140 #1 0x566244e9 in ecma_op_dataview_get_set_view_value /jerryscript/jerry-core/ecma/operations/ecma-dataview-object.c:316 #2 0x565c3f4f in ecma_builtin_dataview_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c:188 #3 0x56605be1 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #4 0x56605e42 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #5 0x56627b53 in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #6 0x566acbdf in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #7 0x566c1d83 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #8 0x566c2632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #9 0x566aba45 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #10 0x56576a9b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #11 0x565733ee in main /jerryscript/jerry-main/main-unix.c:743 #12 0xf779ee80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #13 0x56570cc0 (/home/xyz/jerryscript/tmpmaster/jerry+0x15cc0) 0xf5100f75 is located 0 bytes to the right of 37-byte region [0xf5100f50,0xf5100f75) allocated by thread T0 here: #0 0xf7a44f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x56656b51 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x56656bc9 in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x565a5342 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x565a5342 in ecma_alloc_extended_object /jerryscript/jerry-core/ecma/base/ecma-alloc.c:109 #5 0x565a5342 in ecma_create_object /jerryscript/jerry-core/ecma/base/ecma-helpers.c:81 #6 0x566169b8 in ecma_arraybuffer_new_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:49 #7 0x56616f18 in ecma_op_create_arraybuffer_object /jerryscript/jerry-core/ecma/operations/ecma-arraybuffer-object.c:149 #8 0x565c3532 in ecma_builtin_arraybuffer_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c:94 #9 0x566060d6 in ecma_builtin_dispatch_construct /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1084 #10 0x56629152 in ecma_op_function_construct /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1077 #11 0x566ad1fe in opfunc_construct /jerryscript/jerry-core/vm/vm.c:665 #12 0x566c1da9 in vm_execute /jerryscript/jerry-core/vm/vm.c:3634 #13 0x566c2632 in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #14 0x566aba45 in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #15 0x56576a9b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #16 0x565733ee in main /jerryscript/jerry-main/main-unix.c:743 #17 0xf779ee80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow /jerryscript/jerry-core/ecma/operations/ecma-typedarray-object.c:140 in ecma_set_typedarray_element Shadow bytes around the buggy address: 0x3ea20190: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea201d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x3ea201e0: fa fa fa fa fa fa fa fa fa fa 00 00 00 00[05]fa 0x3ea201f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20210: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20220: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea20230: 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 ==48937==ABORTING ```
heap-buffer-overflow in ecma_set_typedarray_element
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3072/comments
0
2019-09-05T14:47:46Z
2019-09-09T08:37:02Z
https://github.com/jerryscript-project/jerryscript/issues/3072
489,814,478
3,072
[ "jerryscript-project", "jerryscript" ]
###### Revision 57f389d ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var set = new Set(); var arrb = new ArrayBuffer(1); var arr8 = new Uint8Array(arrb, 0); delete set.add(arr8); ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` ICE: Assertion 'id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT' failed at /jerryscript/jerry-core/lit/lit-magic-strings.c(lit_get_magic_string_size):82. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7841452 in raise () from /lib32/libc.so.6 #2 0xf7842871 in abort () from /lib32/libc.so.6 #3 0x566bdfef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566513cf in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56651410 in jerry_assert_fail (assertion=0x566e5f20 "id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT", file=0x566e5ec0 "/jerryscript/jerry-core/lit/lit-magic-strings.c", function=0x567029a0 <__func__.18616> "lit_get_magic_string_size", line=82) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56653132 in lit_get_magic_string_size (id=319) at /jerryscript/jerry-core/lit/lit-magic-strings.c:82 #7 0x5658e02e in ecma_string_get_chars_fast (string_p=0x27ed, size_p=0xffffc740) at /jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:147 #8 0x5659369e in ecma_string_to_number (string_p=0x27ed) at /jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:951 #9 0x5662f394 in ecma_op_object_get_own_property (object_p=0xf5f006d0, property_name_p=0x27ed, property_ref_p=0xffffca20, options=0) at /jerryscript/jerry-core/ecma/operations/ecma-objects.c:203 #10 0x5661585b in ecma_op_container_to_key (key_arg=4126148307) at /jerryscript/jerry-core/ecma/operations/ecma-container-object.c:250 #11 0x56616285 in ecma_op_container_set (this_arg=4126148739, key_arg=4126148307, value_arg=4126148307, lit_id=LIT_MAGIC_STRING_SET_UL) at /jerryscript/jerry-core/ecma/operations/ecma-container-object.c:403 #12 0x565ee83d in ecma_builtin_set_prototype_object_add (this_arg=4126148739, value_arg=4126148307) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c:50 #13 0x565ee66a in ecma_builtin_set_prototype_dispatch_routine (builtin_routine_id=71, this_arg_value=4126148739, arguments_list=0xffffcba0, arguments_number=1) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.inc.h:41 #14 0x565ffbe2 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_SET_PROTOTYPE, builtin_routine_id=71, this_arg_value=4126148739, arguments_list_p=0xffffcba0, arguments_list_len=1) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #15 0x565ffe43 in ecma_builtin_dispatch_call (obj_p=0xf5f006a0, this_arg_value=4126148739, arguments_list_p=0xffffcefc, arguments_list_len=1) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #16 0x56621b54 in ecma_op_function_call (func_obj_p=0xf5f006a0, this_arg_value=4126148739, arguments_list_p=0xffffcefc, arguments_list_len=1) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #17 0x566a6be0 in opfunc_call (frame_ctx_p=0xffffcf90) at /jerryscript/jerry-core/vm/vm.c:581 #18 0x566bbd84 in vm_execute (frame_ctx_p=0xffffcf90, arg_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3622 #19 0x566bc633 in vm_run (bytecode_header_p=0xf5301ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3742 #20 0x566a5a46 in vm_run_global (bytecode_p=0xf5301ad0) at /jerryscript/jerry-core/vm/vm.c:282 #21 0x56570a9c in jerry_run (func_val=4126148979) at /jerryscript/jerry-core/api/jerry.c:570 #22 0x5656d3ef in main (argc=3, argv=0xffffd3f4) at /jerryscript/jerry-main/main-unix.c:743 ```
Assertion 'id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT' in lit-magic-strings.c
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3071/comments
2
2019-09-05T14:24:49Z
2019-09-09T08:38:49Z
https://github.com/jerryscript-project/jerryscript/issues/3071
489,795,006
3,071
[ "jerryscript-project", "jerryscript" ]
###### Revision 57f389d ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var r = new RegExp("([X]{6}|.*)", "g"); var s = "a"; s.replace(r, () => r.compile("[PqaCZlWQUT]{0}", "m")) ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` ICE: Assertion 'start <= end' failed at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c(ecma_builtin_string_prototype_object_replace_append_substr):542. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7841452 in raise () from /lib32/libc.so.6 #2 0xf7842871 in abort () from /lib32/libc.so.6 #3 0x566bdfef in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x566513cf in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56651410 in jerry_assert_fail (assertion=0x566da500 "start <= end", file=0x566da100 "/jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c", function=0x566f94c0 <__func__.13780> "ecma_builtin_string_prototype_object_replace_append_substr", line=542) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565f17cc in ecma_builtin_string_prototype_object_replace_append_substr (base_string_p=0xf5f00490, appended_string_p=0xf5d00670, start=1, end=0) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:542 #7 0x565f427a in ecma_builtin_string_prototype_object_replace_loop (context_p=0xffffca80) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:960 #8 0x565f4c58 in ecma_builtin_string_prototype_object_replace_main (context_p=0xffffca80, replace_value=4126148163) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1054 #9 0x565f580d in ecma_builtin_string_prototype_object_replace (to_string_value=4124051057, search_value=4126148691, replace_value=4126148163) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1159 #10 0x565fa6cc in ecma_builtin_string_prototype_dispatch_routine (builtin_routine_id=79, this_arg=4124051057, arguments_list_p=0xffffcba0, arguments_number=2) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2103 #11 0x565ffbe2 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_STRING_PROTOTYPE, builtin_routine_id=79, this_arg_value=4124051057, arguments_list_p=0xffffcba0, arguments_list_len=2) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #12 0x565ffe43 in ecma_builtin_dispatch_call (obj_p=0xf5f006a0, this_arg_value=4124051057, arguments_list_p=0xffffcefc, arguments_list_len=2) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #13 0x56621b54 in ecma_op_function_call (func_obj_p=0xf5f006a0, this_arg_value=4124051057, arguments_list_p=0xffffcefc, arguments_list_len=2) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #14 0x566a6be0 in opfunc_call (frame_ctx_p=0xffffcf90) at /jerryscript/jerry-core/vm/vm.c:581 #15 0x566bbd84 in vm_execute (frame_ctx_p=0xffffcf90, arg_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3622 #16 0x566bc633 in vm_run (bytecode_header_p=0xf5101ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3742 #17 0x566a5a46 in vm_run_global (bytecode_p=0xf5101ad0) at /jerryscript/jerry-core/vm/vm.c:282 #18 0x56570a9c in jerry_run (func_val=4126148883) at /jerryscript/jerry-core/api/jerry.c:570 #19 0x5656d3ef in main (argc=3, argv=0xffffd3f4) at /jerryscript/jerry-main/main-unix.c:743 ```
Assertion 'start <= end' in ecma-builtin-string-prototype.c
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3070/comments
0
2019-09-05T14:17:07Z
2019-11-08T11:15:31Z
https://github.com/jerryscript-project/jerryscript/issues/3070
489,783,845
3,070
[ "jerryscript-project", "jerryscript" ]
###### Revision 96edec1 ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arr = [0, Infinity]; Object.defineProperties(arr, { length: { value: 1, } }); ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at /jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):106. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7841452 in raise () from /lib32/libc.so.6 #2 0xf7842871 in abort () from /lib32/libc.so.6 #3 0x566bdc6b in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x5665136f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566513b0 in jerry_assert_fail (assertion=0x566e43e0 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x566e4380 "/jerryscript/jerry-core/jmem/jmem-heap.c", function=0x566fdb20 <__func__.18313> "jmem_heap_finalize", line=106) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x56650a75 in jmem_heap_finalize () at /jerryscript/jerry-core/jmem/jmem-heap.c:106 #7 0x566508cb in jmem_finalize () at /jerryscript/jerry-core/jmem/jmem-allocator.c:170 #8 0x5656fd59 in jerry_cleanup () at /jerryscript/jerry-core/api/jerry.c:231 #9 0x5656db7e in main (argc=3, argv=0xffffd3f4) at /jerryscript/jerry-main/main-unix.c:941 ```
Assertion JERRY_CONTEXT (jmem_heap_allocated_size) == 0 in jmem-heap.c
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3068/comments
1
2019-09-05T10:14:21Z
2019-09-09T08:44:51Z
https://github.com/jerryscript-project/jerryscript/issues/3068
489,660,142
3,068
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 086c4ebf ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript function f ( ) { } var B = class extends f { constructor ( ) { super(0) super.$ this.$= $ } } C = class extends B { g ( ) { return function ( ) { } } } D = class extends C { constructor ( ) { super ( ) } g ( ) { } } new D ``` ###### Output ```text ICE: Assertion 'byte_code_start_p[-1] == CBC_EXT_PUSH_SUPER || byte_code_start_p[-1] == CBC_EXT_PUSH_CONSTRUCTOR_SUPER_PROP' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):1621. Error: ERR_FAILED_INTERNAL_ASSERTION ``` ###### Backtrace ```text bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6 #2 0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6 #3 0x5657ae47 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56617934 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x56617975 in jerry_assert_fail (assertion=0x566a6940 "byte_code_start_p[-1] == CBC_EXT_PUSH_SUPER || byte_code_start_p[-1] == CBC_EXT_PUSH_CONSTRUCTOR_SUPER_PROP", file=0x566a5ee0 "jerryscript/jerry-core/vm/vm.c", function=0x566862c0 <__func__.5931.lto_priv.427> "vm_loop", line=1621) at jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x565ee089 in vm_loop (frame_ctx_p=0xffffc160) at jerryscript/jerry-core/vm/vm.c:1620 #7 0x565f9958 in vm_execute (frame_ctx_p=0xffffc160, arg_p=0xffffc434, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3616 #8 0x565fa2bc in vm_run (bytecode_header_p=0xf5103dc0, this_binding_value=4124050355, lex_env_p=0xf5d00370, parse_opts=0, arg_list_p=0xffffc434, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #9 0x56633d9d in ecma_op_function_call (func_obj_p=0xf5f00520, this_arg_value=4124050355, arguments_list_p=0xffffc434, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #10 0x56634a20 in ecma_op_function_construct (func_obj_p=0xf5f00520, this_arg_value=4124050355, arguments_list_p=0xffffc435, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1134 #11 0x565e81d7 in vm_super_call (frame_ctx_p=0xffffc4a0) at jerryscript/jerry-core/vm/vm.c:495 #12 0x565f99c8 in vm_execute (frame_ctx_p=0xffffc4a0, arg_p=0xffffc764, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3628 #13 0x565fa2bc in vm_run (bytecode_header_p=0xf4f00e90, this_binding_value=4124050355, lex_env_p=0xf5d00390, parse_opts=0, arg_list_p=0xffffc764, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #14 0x56633d9d in ecma_op_function_call (func_obj_p=0xf5f00340, this_arg_value=4124050355, arguments_list_p=0xffffc764, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:807 #15 0x56634a20 in ecma_op_function_construct (func_obj_p=0xf5f00340, this_arg_value=4124050355, arguments_list_p=0xffffc765, arguments_list_len=0) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1134 #16 0x565e8cfd in opfunc_construct (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:665 #17 0x565f99d8 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3634 #18 0x565fa2bc in vm_run (bytecode_header_p=0xf5103c40, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #19 0x565e7a1c in vm_run_global (bytecode_p=0xf5103c40) at jerryscript/jerry-core/vm/vm.c:282 #20 0x5664170c in jerry_run (func_val=4126148259) at jerryscript/jerry-core/api/jerry.c:570 #21 0x5663e070 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
Assertion byte_code_start_p[-1] == CBC_EXT_PUSH_SUPER || byte_code_start_p[-1] == CBC_EXT_PUSH_CONSTRUCTOR_SUPER_PROP in vm_loop
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3067/comments
1
2019-09-05T09:48:31Z
2019-09-06T14:56:40Z
https://github.com/jerryscript-project/jerryscript/issues/3067
489,646,996
3,067
[ "jerryscript-project", "jerryscript" ]
###### Revision 1088273 ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var str = "123" + "test123"; str.repeat([1073741823]); ``` ###### Backtrace Run with `jerry poc.js` ``` ================================================================= ==88915==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf54ff7f6 at pc 0xf799690e bp 0xffbbcda8 sp 0xffbbc978 WRITE of size 10 at 0xf54ff7f6 thread T0 #0 0xf799690d (/usr/lib32/libasan.so.4+0x7790d) #1 0x56717127 in ecma_string_copy_to_cesu8_buffer /jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1040 #2 0x56643eb5 in ecma_builtin_string_prototype_object_repeat /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1924 #3 0x566447be in ecma_builtin_string_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2146 #4 0x566dc3a6 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #5 0x566dc607 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #6 0x566ee96b in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #7 0x566a36b4 in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #8 0x566b48e7 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #9 0x566b51eb in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #10 0x566a294b in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #11 0x566fc63b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #12 0x566f8f9f in main /jerryscript/jerry-main/main-unix.c:743 #13 0xf775ee80 in __libc_start_main (/lib32/libc.so.6+0x18e80) #14 0x56626610 (/home/xyz/jerryscript/tmpmaster/build/bin/jerry+0x16610) 0xf54ff7f6 is located 0 bytes to the right of 2147483638-byte region [0x754ff800,0xf54ff7f6) allocated by thread T0 here: #0 0xf7a04f34 in malloc (/usr/lib32/libasan.so.4+0xe5f34) #1 0x566d1bd8 in jmem_heap_alloc /jerryscript/jerry-core/jmem/jmem-heap.c:258 #2 0x566d1cb6 in jmem_heap_gc_and_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:293 #3 0x566d1d48 in jmem_heap_alloc_block /jerryscript/jerry-core/jmem/jmem-heap.c:327 #4 0x56643e83 in ecma_builtin_string_prototype_object_repeat /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:1918 #5 0x566447be in ecma_builtin_string_prototype_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:2146 #6 0x566dc3a6 in ecma_builtin_dispatch_routine /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #7 0x566dc607 in ecma_builtin_dispatch_call /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #8 0x566ee96b in ecma_op_function_call /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #9 0x566a36b4 in opfunc_call /jerryscript/jerry-core/vm/vm.c:581 #10 0x566b48e7 in vm_execute /jerryscript/jerry-core/vm/vm.c:3622 #11 0x566b51eb in vm_run /jerryscript/jerry-core/vm/vm.c:3742 #12 0x566a294b in vm_run_global /jerryscript/jerry-core/vm/vm.c:282 #13 0x566fc63b in jerry_run /jerryscript/jerry-core/api/jerry.c:570 #14 0x566f8f9f in main /jerryscript/jerry-main/main-unix.c:743 #15 0xf775ee80 in __libc_start_main (/lib32/libc.so.6+0x18e80) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib32/libasan.so.4+0x7790d) Shadow bytes around the buggy address: 0x3ea9fea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9feb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9fec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9fed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x3ea9fee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x3ea9fef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[06]fa 0x3ea9ff00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9ff10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9ff20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9ff30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x3ea9ff40: 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 ==88915==ABORTING ```
heap-buffer-overflow in ecma_string_copy_to_cesu8_buffer
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3063/comments
0
2019-09-04T20:53:13Z
2019-09-07T10:20:58Z
https://github.com/jerryscript-project/jerryscript/issues/3063
489,393,143
3,063
[ "jerryscript-project", "jerryscript" ]
###### Revision 1088273 ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var map = new Map(); map.set(Object.freeze({}), 1); ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` ICE: Assertion 'ecma_is_value_true (put_comp)' failed at /jerryscript/jerry-core/ecma/operations/ecma-container-object.c(ecma_op_container_to_key):265. Error: ERR_FAILED_INTERNAL_ASSERTION Program received signal SIGABRT, Aborted. 0xf7fd5059 in __kernel_vsyscall () (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7841452 in raise () from /lib32/libc.so.6 #2 0xf7842871 in abort () from /lib32/libc.so.6 #3 0x5657ad77 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56617864 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566178a5 in jerry_assert_fail (assertion=0x56697700 "ecma_is_value_true (put_comp)", file=0x56698020 "/jerryscript/jerry-core/ecma/operations/ecma-container-object.c", function=0x5668bec0 <__func__.4056.lto_priv.251> "ecma_op_container_to_key", line=265) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x5658b183 in ecma_op_container_to_key (key_arg=4124051251) at /jerryscript/jerry-core/ecma/operations/ecma-container-object.c:265 #7 0x5658b745 in ecma_op_container_set (this_arg=4126148787, key_arg=4124051251, value_arg=16, lit_id=LIT_MAGIC_STRING_MAP_UL) at /jerryscript/jerry-core/ecma/operations/ecma-container-object.c:403 #8 0x565c23fc in ecma_builtin_map_prototype_object_set (this_arg=4126148787, key_arg=4124051251, value_arg=16) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c:132 #9 0x565c22ab in ecma_builtin_map_prototype_dispatch_routine (builtin_routine_id=76, this_arg_value=4126148787, arguments_list=0xffffcc90, arguments_number=2) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.inc.h:46 #10 0x566213a7 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_MAP_PROTOTYPE, builtin_routine_id=76, this_arg_value=4126148787, arguments_list_p=0xffffcc90, arguments_list_len=2) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #11 0x56621608 in ecma_builtin_dispatch_call (obj_p=0xf5f00880, this_arg_value=4126148787, arguments_list_p=0xffffcf2c, arguments_list_len=2) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #12 0x5663396c in ecma_op_function_call (func_obj_p=0xf5f00880, this_arg_value=4126148787, arguments_list_p=0xffffcf2c, arguments_list_len=2) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #13 0x565e86b5 in opfunc_call (frame_ctx_p=0xffffcfa0) at /jerryscript/jerry-core/vm/vm.c:581 #14 0x565f98e8 in vm_execute (frame_ctx_p=0xffffcfa0, arg_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3622 #15 0x565fa1ec in vm_run (bytecode_header_p=0xf63015e0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3742 #16 0x565e794c in vm_run_global (bytecode_p=0xf63015e0) at /jerryscript/jerry-core/vm/vm.c:282 #17 0x5664163c in jerry_run (func_val=4126148979) at /jerryscript/jerry-core/api/jerry.c:570 #18 0x5663dfa0 in main (argc=3, argv=0xffffd3d4) at /jerryscript/jerry-main/main-unix.c:743 ```
Assertion ecma_is_value_true (put_comp) in ecma-container-object.c
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3062/comments
0
2019-09-04T20:30:10Z
2019-09-09T08:38:22Z
https://github.com/jerryscript-project/jerryscript/issues/3062
489,383,211
3,062
[ "jerryscript-project", "jerryscript" ]
###### Revision 1088273 ###### Build ./tools/build.py --clean --debug --compile-flag=-fsanitize=address --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --compile-flag=-g --strip=off --system-allocator=on --logging=on --error-messages=on --profile=es2015-subset ###### OS Linux 4.15.0-58-generic #64-Ubuntu x86_64 GNU/Linux ###### Test case ```javascript var arr = []; arr.length = 10; arr.splice(0, 17); arr.length = 4294967294; arr.splice(1, 1, 1); ``` ###### Backtrace Run with `jerry --abort-on-fail poc.js` ``` 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 (gdb) bt #0 0xf7fd5059 in __kernel_vsyscall () #1 0xf7841452 in raise () from /lib32/libc.so.6 #2 0xf7842871 in abort () from /lib32/libc.so.6 #3 0x5657ad77 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-port/default/default-fatal.c:71 #4 0x56617864 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at /jerryscript/jerry-core/jrt/jrt-fatals.c:58 #5 0x566178a5 in jerry_assert_fail (assertion=0x566a9ce0 "compressed_pointer != JMEM_CP_NULL", file=0x566a9ba0 "/jerryscript/jerry-core/jmem/jmem-allocator.c", function=0x5667f100 <__func__.4606.lto_priv.506> "jmem_decompress_pointer", line=215) at /jerryscript/jerry-core/jrt/jrt-fatals.c:82 #6 0x566169d2 in jmem_decompress_pointer (compressed_pointer=0) at /jerryscript/jerry-core/jmem/jmem-allocator.c:215 #7 0x5660472b in ecma_op_object_find_own (base_value=4126148883, object_p=0xf5f00910, property_name_p=0x35) at /jerryscript/jerry-core/ecma/operations/ecma-objects.c:492 #8 0x56605014 in ecma_op_object_find (object_p=0xf5f00910, property_name_p=0x35) at /jerryscript/jerry-core/ecma/operations/ecma-objects.c:717 #9 0x56604f4b in ecma_op_object_find_by_uint32_index (object_p=0xf5f00910, index=1) at /jerryscript/jerry-core/ecma/operations/ecma-objects.c:670 #10 0x5660194e in ecma_builtin_array_prototype_object_splice.lto_priv.397 (args=0xffffcf2c, args_number=3, obj_p=0xf5f00910, len=4294967294) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:1176 #11 0x565b454f in ecma_builtin_array_prototype_dispatch_routine (builtin_routine_id=81, this_arg=4126148883, arguments_list_p=0xffffcf2c, arguments_number=3) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:2195 #12 0x566213a7 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_ARRAY_PROTOTYPE, builtin_routine_id=81, this_arg_value=4126148883, arguments_list_p=0xffffcf2c, arguments_list_len=3) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1025 #13 0x56621608 in ecma_builtin_dispatch_call (obj_p=0xf5f008e0, this_arg_value=4126148883, arguments_list_p=0xffffcf2c, arguments_list_len=3) at /jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1050 #14 0x5663396c in ecma_op_function_call (func_obj_p=0xf5f008e0, this_arg_value=4126148883, arguments_list_p=0xffffcf2c, arguments_list_len=3) at /jerryscript/jerry-core/ecma/operations/ecma-function-object.c:729 #15 0x565e86b5 in opfunc_call (frame_ctx_p=0xffffcfa0) at /jerryscript/jerry-core/vm/vm.c:581 #16 0x565f98e8 in vm_execute (frame_ctx_p=0xffffcfa0, arg_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3622 #17 0x565fa1ec in vm_run (bytecode_header_p=0xf63015e0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at /jerryscript/jerry-core/vm/vm.c:3742 #18 0x565e794c in vm_run_global (bytecode_p=0xf63015e0) at /jerryscript/jerry-core/vm/vm.c:282 #19 0x5664163c in jerry_run (func_val=4126148979) at /jerryscript/jerry-core/api/jerry.c:570 #20 0x5663dfa0 in main (argc=3, argv=0xffffd3d4) at /jerryscript/jerry-main/main-unix.c:743 ```
Assertion compressed_pointer != JMEM_CP_NULL
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3060/comments
0
2019-09-04T19:09:30Z
2019-09-05T08:16:28Z
https://github.com/jerryscript-project/jerryscript/issues/3060
489,342,217
3,060
[ "jerryscript-project", "jerryscript" ]
###### JerryScript revision 1088273b ###### Build platform Linux-4.15.0-54-generic-x86_64-with-Ubuntu-18.04-bionic ###### Build steps ``` ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \ --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \ --compile-flag=-fno-common --compile-flag=-g \ --strip=off --system-allocator=on --logging=on \ --linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset ``` ###### Test case ```javascript var b = [$, ""]; function dConstr ( ) { } dConstr.prototype = b; var d = new dConstr; for (var $ in d); ``` ###### Output ```text ASAN:DEADLYSIGNAL ================================================================= ==49145==ERROR: AddressSanitizer: SEGV on unknown address 0x00000068 (pc 0x5668a412 bp 0xff944168 sp 0xff944150 T0) ==49145==The signal is caused by a READ memory access. ==49145==Hint: address points to the zero page. #0 0x5668a411 in ecma_ref_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:825 #1 0x5668d5ab in ecma_string_from_property_name jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1632 #2 0x56636ed5 in ecma_op_object_get_property_names jerryscript/jerry-core/ecma/operations/ecma-objects.c:1849 #3 0x565a47e3 in opfunc_for_in jerryscript/jerry-core/vm/opcodes.c:248 #4 0x56623bff in vm_loop jerryscript/jerry-core/vm/vm.c:2840 #5 0x56628957 in vm_execute jerryscript/jerry-core/vm/vm.c:3616 #6 0x566292bb in vm_run jerryscript/jerry-core/vm/vm.c:3742 #7 0x56616a1b in vm_run_global jerryscript/jerry-core/vm/vm.c:282 #8 0x5667070b in jerry_run jerryscript/jerry-core/api/jerry.c:570 #9 0x5666d06f in main jerryscript/jerry-main/main-unix.c:743 #10 0xf7788e80 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18e80) #11 0x5659a6e0 (jerryscript/build_gcc_asan_es2015/bin/jerry+0x166e0) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:825 in ecma_ref_ecma_string ==49145==ABORTING ``` ###### Backtrace ```text bt #0 0x5665b412 in ecma_ref_ecma_string (string_p=0x68) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:825 #1 0x5665e5ac in ecma_string_from_property_name (property=9 '\t', prop_name_cp=104) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1632 #2 0x56607ed6 in ecma_op_object_get_property_names (obj_p=0xf5d00650, opts=6) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1849 #3 0x565757e4 in opfunc_for_in (left_value=4124051027, result_obj_p=0xffffc680) at jerryscript/jerry-core/vm/opcodes.c:248 #4 0x565f4c00 in vm_loop (frame_ctx_p=0xffffc7e0) at jerryscript/jerry-core/vm/vm.c:2840 #5 0x565f9958 in vm_execute (frame_ctx_p=0xffffc7e0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3616 #6 0x565fa2bc in vm_run (bytecode_header_p=0xf5101ea0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3742 #7 0x565e7a1c in vm_run_global (bytecode_p=0xf5101ea0) at jerryscript/jerry-core/vm/vm.c:282 #8 0x5664170c in jerry_run (func_val=4126148835) at jerryscript/jerry-core/api/jerry.c:570 #9 0x5663e070 in main (argc=3, argv=0xffffcc14) at jerryscript/jerry-main/main-unix.c:743 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
SEGV in ecma_ref_ecma_string
https://api.github.com/repos/jerryscript-project/jerryscript/issues/3059/comments
2
2019-09-04T18:59:14Z
2019-09-05T07:51:32Z
https://github.com/jerryscript-project/jerryscript/issues/3059
489,337,946
3,059