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"
] | ###### Jerry version:
```
Checked revision: 924f4bbd
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --error-messages=on --logging=on
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```javascript
var v1 = Object(Symbol("symbol"))
var v2 = new RegExp();
var v3 = new Array(v1)
var v4 = v3.forEach(function(p_0, p_1, p_2) { return p_0 + p_1 + p_2; }, v2)
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_boolean (value)' failed at jerryscript/jerry-core/ecma/operations/ecma-conversion.c(ecma_get_number):363.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f23a in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558a76e in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558a7c0 in jerry_assert_fail (assertion=0x5555555e69e9 "ecma_is_value_boolean (value)",
file=0x5555555e43d0 "jerryscript/jerry-core/ecma/operations/ecma-conversion.c",
function=0x5555555d5190 <__func__.4030.lto_priv.554> "ecma_get_number", line=363)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x000055555559d5b6 in ecma_get_number (value=300, number_p=0x7fffffffce00)
at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:363
#6 0x000055555555c825 in opfunc_addition (left_value=300, right_value=0)
at jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c:161
#7 0x0000555555598977 in vm_loop (frame_ctx_p=0x7fffffffd390) at jerryscript/jerry-core/vm/vm.c:2212
#8 0x000055555559b3a2 in vm_execute (frame_ctx_p=0x7fffffffd390, arg_p=0x7fffffffd5ac, arg_list_len=3)
at jerryscript/jerry-core/vm/vm.c:3478
#9 0x000055555559b67b in vm_run (bytecode_header_p=0x5555558fb708 <jerry_global_heap+816>, this_binding_value=379,
lex_env_p=0x5555558fb408 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x7fffffffd5ac, arg_list_len=3)
at jerryscript/jerry-core/vm/vm.c:3581
#10 0x000055555559fd03 in ecma_op_function_call (func_obj_p=0x5555558fb6b8 <jerry_global_heap+736>, this_arg_value=379,
arguments_list_p=0x7fffffffd5ac, arguments_list_len=3)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:721
#11 0x000055555557abd8 in ecma_builtin_array_apply (this_arg=571, arg1=739, arg2=379, mode=ARRAY_ROUTINE_FOREACH)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:1866
#12 0x000055555557ad3d in ecma_builtin_array_prototype_object_for_each.lto_priv.466 (this_arg=571, arg1=739, arg2=379)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c:1961
#13 0x000055555559b9a4 in ecma_builtin_array_prototype_dispatch_routine (builtin_routine_id=78, this_arg_value=571,
arguments_list=0x7fffffffd694, arguments_number=2)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.inc.h:58
#14 0x00005555555bca54 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_ARRAY_PROTOTYPE, builtin_routine_id=78,
this_arg_value=571, arguments_list_p=0x7fffffffd694, arguments_list_len=2)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1007
#15 0x00005555555bcba6 in ecma_builtin_dispatch_call (obj_p=0x5555558fb630 <jerry_global_heap+600>, this_arg_value=571,
arguments_list_p=0x7fffffffd93c, arguments_list_len=2)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:1032
#16 0x000055555559fa9a in ecma_op_function_call (func_obj_p=0x5555558fb630 <jerry_global_heap+600>, this_arg_value=571,
arguments_list_p=0x7fffffffd93c, arguments_list_len=2)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:645
#17 0x00005555555951fa in opfunc_call (frame_ctx_p=0x7fffffffd980) at jerryscript/jerry-core/vm/vm.c:534
#18 0x000055555559b3cb in vm_execute (frame_ctx_p=0x7fffffffd980, arg_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3484
#19 0x000055555559b67b in vm_run (bytecode_header_p=0x5555558fb650 <jerry_global_heap+632>, this_binding_value=27,
lex_env_p=0x5555558fb408 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3581
#20 0x0000555555594c9b in vm_run_global (bytecode_p=0x5555558fb650 <jerry_global_heap+632>)
at jerryscript/jerry-core/vm/vm.c:235
#21 0x00005555555c3565 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:544
#22 0x00005555555c1e61 in main (argc=3, argv=0x7fffffffddb8) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [JsProFuzz](https://www.researchgate.net/publication/303482425_Fuzzing_JavaScript_Engine_APIs). </sup>
| Assertion 'ecma_is_value_boolean (value)' failed in ecma_get_number | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2743/comments | 0 | 2019-01-31T10:29:47Z | 2019-02-07T15:07:36Z | https://github.com/jerryscript-project/jerryscript/issues/2743 | 405,178,495 | 2,743 |
[
"jerryscript-project",
"jerryscript"
] | as i know, java supports multi-thead, and lua support coroutine mechanism, so,
did the jerry vm implemetation supports the mechanism like corotine or native supported multi-threaded?
thanks for your support. | did jerryscript support "multi-threaded" or "coroutine" mechanism? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2735/comments | 2 | 2019-01-28T11:57:59Z | 2019-06-28T17:09:32Z | https://github.com/jerryscript-project/jerryscript/issues/2735 | 403,779,374 | 2,735 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 924f4bbd
Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```javascript
var fz_globalObject = this
function fz_is_primitive(value) {
var value_type = typeof value
if (value_type !== "function" && value_type !== "object")
return value_type
}
function fz_starts_with(str, pattern) {
for (var i = 0; i < pattern.length; i++)
if (str[i] !== pattern[i])
return
return true
}
function fz_collect_values(value) {
var primitive = fz_is_primitive(value)
if (primitive)
return
var prop_names = Object.getOwnPropertyNames(value)
for (var i = 0; i < prop_names.length; i++) {
var prop_name = prop_names[i]
if (!fz_starts_with(prop_name, "fz_")) {
fz_collect_values(value[prop_name])
}
}
}
fz_collect_values(fz_globalObject)
```
###### Backtrace:
```
ICE: Assertion 'id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT' failed at jerryscript/jerry-core/lit/lit-magic-strings.c(lit_get_magic_string_size):77.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
0xf7fd5059 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fd5059 in __kernel_vsyscall ()
#1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x5655ca1e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x565a009a in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x565a00d4 in jerry_assert_fail (assertion=0x565dfc54 "id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT",
file=0x565dc248 "jerryscript/jerry-core/lit/lit-magic-strings.c",
function=0x565d2278 <__func__.3343.lto_priv.454> "lit_get_magic_string_size", line=77)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x565a10fc in lit_get_magic_string_size (id=LIT_GLOBAL_SYMBOL_TO_STRING_TAG)
at jerryscript/jerry-core/lit/lit-magic-strings.c:77
#7 0x565c36ca in ecma_string_get_ascii_size (string_p=0x23cd)
at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1989
#8 0x565c38b6 in ecma_string_get_length (string_p=0x23cd)
at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2025
#9 0x56596b7f in ecma_op_object_find_own (base_value=9165, object_p=0x566f8a80, property_name_p=0x15)
at jerryscript/jerry-core/ecma/operations/ecma-objects.c:435
#10 0x5656744e in ecma_op_get_value_object_base (base_value=9165, property_name_p=0x15)
at jerryscript/jerry-core/ecma/operations/ecma-get-put-value.c:116
#11 0x5658c01d in vm_op_get_value (object=9165, property=0) at jerryscript/jerry-core/vm/vm.c:118
#12 0x5658ec6e in vm_loop (frame_ctx_p=0xffffc48c) at jerryscript/jerry-core/vm/vm.c:1694
#13 0x565922c6 in vm_execute (frame_ctx_p=0xffffc48c, arg_p=0xffffc668, arg_list_len=2)
at jerryscript/jerry-core/vm/vm.c:3478
#14 0x565924f3 in vm_run (bytecode_header_p=0x566f76b0, this_binding_value=1450144131, lex_env_p=0x566f71b0, parse_opts=0,
arg_list_p=0xffffc668, arg_list_len=2) at jerryscript/jerry-core/vm/vm.c:3581
#15 0x565ae1a2 in ecma_op_function_call (func_obj_p=0x566f79a0, this_arg_value=72, arguments_list_p=0xffffc668,
arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:721
#16 0x5658c77e in opfunc_call (frame_ctx_p=0xffffc68c) at jerryscript/jerry-core/vm/vm.c:534
#17 0x565922f0 in vm_execute (frame_ctx_p=0xffffc68c, arg_p=0xffffc868, arg_list_len=1)
at jerryscript/jerry-core/vm/vm.c:3484
#18 0x565924f3 in vm_run (bytecode_header_p=0x566f77c0, this_binding_value=1450144131, lex_env_p=0x566f71b0, parse_opts=0,
arg_list_p=0xffffc868, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3581
#19 0x565ae1a2 in ecma_op_function_call (func_obj_p=0x566f79c0, this_arg_value=72, arguments_list_p=0xffffc868,
arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:721
#20 0x5658c77e in opfunc_call (frame_ctx_p=0xffffc88c) at jerryscript/jerry-core/vm/vm.c:534
#21 0x565922f0 in vm_execute (frame_ctx_p=0xffffc88c, arg_p=0xffffca68, arg_list_len=1)
at jerryscript/jerry-core/vm/vm.c:3484
#22 0x565924f3 in vm_run (bytecode_header_p=0x566f77c0, this_binding_value=1450144131, lex_env_p=0x566f71b0, parse_opts=0,
arg_list_p=0xffffca68, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3581
#23 0x565ae1a2 in ecma_op_function_call (func_obj_p=0x566f79c0, this_arg_value=72, arguments_list_p=0xffffca68,
arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:721
#24 0x5658c77e in opfunc_call (frame_ctx_p=0xffffca8c) at jerryscript/jerry-core/vm/vm.c:534
#25 0x565922f0 in vm_execute (frame_ctx_p=0xffffca8c, arg_p=0xffffcc54, arg_list_len=1)
at jerryscript/jerry-core/vm/vm.c:3484
#26 0x565924f3 in vm_run (bytecode_header_p=0x566f77c0, this_binding_value=1450144131, lex_env_p=0x566f71b0, parse_opts=0,
arg_list_p=0xffffcc54, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3581
#27 0x565ae1a2 in ecma_op_function_call (func_obj_p=0x566f79c0, this_arg_value=72, arguments_list_p=0xffffcc54,
arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:721
#28 0x5658c77e in opfunc_call (frame_ctx_p=0xffffcc6c) at jerryscript/jerry-core/vm/vm.c:534
#29 0x565922f0 in vm_execute (frame_ctx_p=0xffffcc6c, arg_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3484
#30 0x565924f3 in vm_run (bytecode_header_p=0x566f78e0, this_binding_value=1450144131, lex_env_p=0x566f71b0, parse_opts=0,
arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3581
#31 0x5658c221 in vm_run_global (bytecode_p=0x566f78e0) at jerryscript/jerry-core/vm/vm.c:235
#32 0x565b4e9e in jerry_run (func_val=1450146115) at jerryscript/jerry-core/api/jerry.c:544
#33 0x565b3866 in main (argc=3, argv=0xffffcf04) at jerryscript/jerry-main/main-unix.c:676
``` | Assertion 'id < LIT_NON_INTERNAL_MAGIC_STRING__COUNT' failed in lit_get_magic_string_size | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2733/comments | 0 | 2019-01-28T10:28:33Z | 2019-01-31T12:42:19Z | https://github.com/jerryscript-project/jerryscript/issues/2733 | 403,744,163 | 2,733 |
[
"jerryscript-project",
"jerryscript"
] | Handle scopes greatly simplify variables lifetime management. Also handle scope apis are part of N-API. Would like to have handle scope support in JerryScript natively.
There is a naïve implementation available in ShadowNode project for JerryScript: https://github.com/yodaos-project/ShadowNode/tree/master/deps/jerry/jerry-ext/handle-scope
| Handle scope support in JerryScript | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2732/comments | 2 | 2019-01-28T10:14:29Z | 2019-03-27T13:50:00Z | https://github.com/jerryscript-project/jerryscript/issues/2732 | 403,738,033 | 2,732 |
[
"jerryscript-project",
"jerryscript"
] | take lua for example ,it is obvioulsy compile language because the source language first comiple by luac to mid-binrary code and then execute the byte code by lua vm.
so, is the same logic for jerryscript, i have not found the jerry cunterpart like luac compiler
.thank you. | is the jerryscript implementation "compileable" or "interpreterable"? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2730/comments | 2 | 2019-01-25T11:14:54Z | 2019-01-25T15:08:49Z | https://github.com/jerryscript-project/jerryscript/issues/2730 | 403,113,161 | 2,730 |
[
"jerryscript-project",
"jerryscript"
] | Is there any plan to release a new version of Jerryscript recently? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2729/comments | 1 | 2019-01-24T10:28:42Z | 2019-01-24T11:50:13Z | https://github.com/jerryscript-project/jerryscript/issues/2729 | 402,639,752 | 2,729 |
|
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: a42f239a
Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```javascript
var obj = { reverse : Int32Array.prototype.join } ;
Object.defineProperty( obj, 'length', { 'get' : function(toPrecision) { return Object.create(/x/); }});
obj.reverse("$01$02$11$20");
```
###### Backtrace:
```
Script Error: TypeError: Incomplete RegExp type
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
0xf7fd5059 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fd5059 in __kernel_vsyscall ()
#1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x5655c9ec in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x5659fee0 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x5659ff1a in jerry_assert_fail (assertion=0x565e630c "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)",
file=0x565e62c0 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c",
function=0x565cea88 <__func__.3807.lto_priv.89> "ecma_free_string_list", line=43)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x565c9bf0 in ecma_free_string_list (string_list_p=0x566f77f0)
at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43
#7 0x565c9c8c in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:63
#8 0x565c9428 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:63
#9 0x565b4659 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:210
#10 0x565b3b0c in main (argc=3, argv=0xffffcf74) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup> | Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2724/comments | 0 | 2019-01-22T14:41:56Z | 2019-01-25T10:03:12Z | https://github.com/jerryscript-project/jerryscript/issues/2724 | 401,796,330 | 2,724 |
[
"jerryscript-project",
"jerryscript"
] | This issue is created in order to improve branch coverage of functions of `Array.prototype` routines.
The following script is made for testing branch coverage with all the test suites (`--jerry-test-suite --test262 --unittests --jerry-tests`), or with only one `.js` file.
https://github.com/matedabis/jerryscript/blob/gcov_coverage_tester/tests/gcov-tests/gcovtester.py
While measuring the branch coverage we dont count JERRY_ASSERT s. The results are measured by running all the test scripts, with the modifications in the PRs.
If you start working on a function, or open a PR, please leave a comment about it on this issue, so I can keep this issue up to date.
| Function | Branch coverage | Progress |
| :--- | :---: | :--- |
| helper set length | 0/0 | All covered |
| toString | 6/6 | #2717 |
| toLocaleString | 18/18 | #2716 |
| concat | 11/16 | @repasics is working on it |
| get separator string | 2/2 | All covered |
| at index | 5/6 | @matedabis is working on it |
| join | 20/20 | #2727 |
| pop | 13/16 | @repasics is working on it |
| push | 13/16 | @repasics is working on it |
| reverse | 37/38 | #2728 |
| shift | 22/30 | @matedabis is working on it |
| slice | 15/22 | @repasics is working on it |
| sort compare helper| 20/26 | @repasics is working on it |
| sort | 48/48 | #2674 |
| splice | 78/78 | #2682 |
| unshift | 24/28 | @matedabis is working on it |
| indexOf | 26/26 | All covered |
| lastIndexOf | 40/40 | All covered |
| apply | 32/32 | All covered |
| map | 21/22 | Remaining branch is unreachable according to us |
| filter | 22/22 | All covered |
| reduce from | 45/46 | Remaining branch is unreachable according to us |
| reduce | 0/0 | All covered |
| reduce right | 0/0 | All covered |
| find | 19/22 | @matedabis is working on it | | Increase branch coverage: Array.prototype routines | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2721/comments | 1 | 2019-01-21T09:44:03Z | 2019-07-03T07:53:26Z | https://github.com/jerryscript-project/jerryscript/issues/2721 | 401,268,607 | 2,721 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: c23cf417
Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```javascript
JSON.stringify(URIError, valueOf, new String('abc\u2040\u2030cba'));
```
###### Backtrace:
```
Script Error: TypeError: The structure is cyclical.
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
0xf7fd5059 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fd5059 in __kernel_vsyscall ()
#1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x5655c9ec in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x5659fe80 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x5659feba in jerry_assert_fail (assertion=0x565e624c "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)", file=0x565e6200 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c",
function=0x565ce9c8 <__func__.3807.lto_priv.89> "ecma_free_string_list", line=43) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x565c9b3b in ecma_free_string_list (string_list_p=0x566f7590) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43
#7 0x565c9bd7 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:63
#8 0x565c9373 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:63
#9 0x565b45a4 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:210
#10 0x565b3a57 in main (argc=3, argv=0xffffd304) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup> | Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2719/comments | 0 | 2019-01-19T20:50:46Z | 2019-01-22T00:26:35Z | https://github.com/jerryscript-project/jerryscript/issues/2719 | 401,033,549 | 2,719 |
[
"jerryscript-project",
"jerryscript"
] | The same reproducing steps like the previous issues with Stensal SDK (https://stensal.com)
Feel free to reach out to me if you need help to interprete the error message.
DTS_MSG: Stensal DTS detected a fatal program error!
DTS_MSG: Continuing the execution will cause unexpected behaviors, abort!
DTS_MSG: OOB Read:reading 4 bytes at 0xfffe15ac will read undefined values.
DTS_MSG: Diagnostic information:
- The object to-be-read (start:0xfffe15ac, size:2 bytes) is allocated at
- file:/home/sbuilder/workspace/jerryscript/jerry-ext/include/jerryscript-ext/arg.impl.h::106, 1
- 0xfffe15ac 0xfffe15ad
- +------------------------+
- | the object to-be-read |......
- +------------------------+
- ^~~~~~~~~~
- the read starts at the object begin.
- Stack trace (most recent call first):
-[1] file:/home/sbuilder/workspace/jerryscript/jerry-ext/include/jerryscript-ext/arg.impl.h::106, 1
-[2] file:/home/sbuilder/workspace/jerryscript/tests/unit-ext/test-ext-arg.c::384, 5
-[3] file:/home/sbuilder/workspace/jerryscript/jerry-core/ecma/operations/ecma-function-object.c::744, 32
-[4] file:/home/sbuilder/workspace/jerryscript/jerry-core/vm/vm.c::534, 24
-[5] file:/home/sbuilder/workspace/jerryscript/jerry-core/vm/vm.c::3467, 9
-[6] file:/home/sbuilder/workspace/jerryscript/jerry-core/vm/vm.c::3564, 10
-[7] file:/home/sbuilder/workspace/jerryscript/jerry-core/vm/vm.c::235, 10
-[8] file:/home/sbuilder/workspace/jerryscript/jerry-core/api/jerry.c::544, 24
-[9] file:/home/sbuilder/workspace/jerryscript/tests/unit-ext/test-ext-arg.c::830, 23
-[10] file:/home/nwang/acore/musl/src/env/__libc_start_main.c::180, 11
| jerryscript-ext/arg.impl.h@106 has an out-of-bounds read | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2713/comments | 1 | 2019-01-18T05:13:29Z | 2019-01-21T08:29:34Z | https://github.com/jerryscript-project/jerryscript/issues/2713 | 400,575,198 | 2,713 |
[
"jerryscript-project",
"jerryscript"
] | Reproducing step:
1. I use my Stensal SDK (https://stensal.com), it's free for open source project
2. build jerryscript with stensal-c
3. Run ./build/tests/unit-test-api-strings
The following is what I got. Notes safe_memcpy is a safe version of memcpy that does array bounds checking. You can treat it like memcpy. I think the fixes is to make sure the length is passed correctly.
DTS_MSG: Stensal DTS detected a fatal program error!
DTS_MSG: Continuing the execution will cause unexpected behaviors, abort!
DTS_MSG: OOB Write:writing 15 bytes at 0xffac10dc will corrupt the adjacent data.
DTS_MSG: Diagnostic information:
- The object to-be-written (start:0xffac10dc, size:5 bytes) is allocated at
- file:/home/sbuilder/workspace/jerryscript/tests/unit-core/test-api-strings.c::213, 8
- 0xffac10dc 0xffac10e0
- +------------------------+
- |the object to-be-written|......
- +------------------------+
- ^~~~~~~~~~
- the write starts at the object begin.
- Stack trace (most recent call first):
-[1] file:/home/nwang/acore/musl/src/malloc/safe_memcpy.c::18, 2
-[2] file:/home/sbuilder/workspace/jerryscript/jerry-core/ecma/base/ecma-helpers-string.c::1221, 5
-[3] file:/home/sbuilder/workspace/jerryscript/jerry-core/api/jerry.c::1758, 10
-[4] file:/home/sbuilder/workspace/jerryscript/tests/unit-core/test-api-strings.c::241, 8
-[5] file:/home/nwang/acore/musl/src/env/__libc_start_main.c::180, 11
| ecma-helpers-string.c@1221 has an out-of-bounds write (buffer overflow) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2712/comments | 1 | 2019-01-18T05:10:40Z | 2019-01-21T11:40:28Z | https://github.com/jerryscript-project/jerryscript/issues/2712 | 400,574,702 | 2,712 |
[
"jerryscript-project",
"jerryscript"
] | Reproducing steps:
1. I use my Stensal SDK (https://stensal.com)
2. build jerryscript with stensal-c
3. Run ./build/tests/unit-test-api
This is what I got:
ok 148343051 148341491 0xfff0e4a8 2
ok construct 148343083 148343163 0xfff11bec 1
ok 148343251 148341491 0xfff0e4b4 0
ok object free callback
DTS_MSG: Stensal DTS detected a fatal program error!
DTS_MSG: Continuing the execution will cause unexpected behaviors, abort!
DTS_MSG: OOB Write:writing 1 bytes at 0xfff11570 will corrupt the adjacent data.
DTS_MSG: Diagnostic information:
-
- The object to-be-written (start:0xfff1156c, size:4 bytes) is allocated at
- file:/home/sbuilder/workspace/jerryscript/tests/unit-core/test-api.c::881, 10
- 0xfff1156c 0xfff1156f
- +------------------------+
- |the object to-be-written|......
- +------------------------+
- ^~~~~~~~~~
- the write starts at 0xfff11570 that is right after the object end.
- Stack trace (most recent call first):
-[1] file:/home/sbuilder/workspace/jerryscript/tests/unit-core/test-api.c::884, 5
-[2] file:/home/nwang/acore/musl/src/env/__libc_start_main.c::180, 11
| test-api.c has an out-of-bounds write (buffer overflow) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2711/comments | 1 | 2019-01-18T05:06:58Z | 2019-01-21T11:40:28Z | https://github.com/jerryscript-project/jerryscript/issues/2711 | 400,574,019 | 2,711 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: adb80c20
Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```javascript
Promise.race(new Array(0xfffffffe));
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_integer_number (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_integer_from_value):611.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
0xf7fd5059 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fd5059 in __kernel_vsyscall ()
#1 0xf7de1832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7de2cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x5655c93a in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x5659f587 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x5659f5c1 in jerry_assert_fail (assertion=0x565e3948 "ecma_is_value_integer_number (value)", file=0x565e37ec "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c",
function=0x565cd0d8 <__func__.3339.lto_priv.664> "ecma_get_integer_from_value", line=611) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x565c419f in ecma_get_integer_from_value (value=1450137234) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:611
#7 0x565814dd in ecma_builtin_promise_do_race (array=1450137299, capability=1450137331, ctor=1450137075) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:208
#8 0x56582118 in ecma_builtin_promise_race_or_all (this_arg=1450137075, array=1450137299, is_race=true) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:598
#9 0x56582184 in ecma_builtin_promise_race (this_arg=1450137075, array=1450137299) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:628
#10 0x56581035 in ecma_builtin_promise_dispatch_routine (builtin_routine_id=62, this_arg_value=1450137075, arguments_list=0xffffd05c, arguments_number=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.inc.h:42
#11 0x565a5c5d in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_PROMISE, builtin_routine_id=62, this_arg_value=1450137075, arguments_list_p=0xffffd05c, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:952
#12 0x565a5da8 in ecma_builtin_dispatch_call (obj_p=0x566f5610, this_arg_value=1450137075, arguments_list_p=0xffffd05c, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:977
#13 0x565ad4f1 in ecma_op_function_call (func_obj_p=0x566f5610, this_arg_value=1450137075, arguments_list_p=0xffffd05c, arguments_list_len=1)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:645
#14 0x5658c0df in opfunc_call (frame_ctx_p=0xffffd07c) at jerryscript/jerry-core/vm/vm.c:526
#15 0x56591b8a in vm_execute (frame_ctx_p=0xffffd07c, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3455
#16 0x56591d8d in vm_run (bytecode_header_p=0x566f55a0, this_binding_value=1450135939, lex_env_p=0x566f51b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3552
#17 0x5658bb82 in vm_run_global (bytecode_p=0x566f55a0) at jerryscript/jerry-core/vm/vm.c:227
#18 0x565b43b4 in jerry_run (func_val=1450137043) at jerryscript/jerry-core/api/jerry.c:544
#19 0x565b2d7c in main (argc=3, argv=0xffffd314) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup> | Assertion 'ecma_is_value_integer_number (value)' failed in ecma_get_integer_from_value | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2700/comments | 0 | 2019-01-14T08:45:23Z | 2019-01-15T16:32:00Z | https://github.com/jerryscript-project/jerryscript/issues/2700 | 398,792,172 | 2,700 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 93ec2266
Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```javascript
Uint8Array.from(Uint32Array,
function ( JSON ) {
arguments
function JSON( ) { }
});
```
###### Backtrace:
```
ICE: Assertion 'literal_p->prop.index >= register_count' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_post_processing):2089.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b3a3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558b3f5 in jerry_assert_fail (assertion=0x5555555de9d8 "literal_p->prop.index >= register_count", file=0x5555555de600 "jerryscript/jerry-core/parser/js/js-parser.c",
function=0x5555555d4ab0 <__func__.5156.lto_priv.396> "parser_post_processing", line=2089) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x0000555555590fd1 in parser_post_processing (context_p=0x7fffffffdc30) at jerryscript/jerry-core/parser/js/js-parser.c:2089
#6 0x0000555555591e22 in parser_parse_function (context_p=0x7fffffffdc30, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser.c:2640
#7 0x000055555556f516 in lexer_construct_function_object (context_p=0x7fffffffdc30, extra_status_flags=14) at jerryscript/jerry-core/parser/js/js-lexer.c:1992
#8 0x0000555555571d14 in parser_parse_function_expression (context_p=0x7fffffffdc30, status_flags=14) at jerryscript/jerry-core/parser/js/js-parser-expr.c:954
#9 0x0000555555572640 in parser_parse_unary_expression (context_p=0x7fffffffdc30, grouping_level_p=0x7fffffffda58) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1324
#10 0x0000555555574352 in parser_parse_expression (context_p=0x7fffffffdc30, options=4) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2158
#11 0x0000555555572eaf in parser_process_unary_expression (context_p=0x7fffffffdc30) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1624
#12 0x000055555557435e in parser_parse_expression (context_p=0x7fffffffdc30, options=2) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2163
#13 0x000055555555a657 in parser_parse_statements (context_p=0x7fffffffdc30) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2110
#14 0x00005555555916c4 in parser_parse_source (arg_list_p=0x0, arg_list_size=0,
source_p=0x5555557f5100 <buffer.lto_priv> "Uint8Array.from(Uint32Array,\n function ( JSON ) {\n arguments \n function JSON( ) { }\n});\n", source_size=105, parse_opts=0,
error_location_p=0x7fffffffde44) at jerryscript/jerry-core/parser/js/js-parser.c:2397
#15 0x0000555555592356 in parser_parse_script (arg_list_p=0x0, arg_list_size=0,
source_p=0x5555557f5100 <buffer.lto_priv> "Uint8Array.from(Uint32Array,\n function ( JSON ) {\n arguments \n function JSON( ) { }\n});\n", source_size=105, parse_opts=0,
bytecode_data_p=0x7fffffffde90) at jerryscript/jerry-core/parser/js/js-parser.c:2848
#16 0x00005555555c236a in jerry_parse (resource_name_p=0x7fffffffe4d2 "test.js", resource_name_length=7,
source_p=0x5555557f5100 <buffer.lto_priv> "Uint8Array.from(Uint32Array,\n function ( JSON ) {\n arguments \n function JSON( ) { }\n});\n", source_size=105, parse_opts=0)
at jerryscript/jerry-core/api/jerry.c:401
#17 0x00005555555c0f0c in main (argc=3, argv=0x7fffffffe1b8) at jerryscript/jerry-main/main-unix.c:667
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup> | Assertion 'literal_p->prop.index >= register_count' failed in parser_post_processing | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2699/comments | 1 | 2019-01-12T22:01:16Z | 2019-04-12T11:48:03Z | https://github.com/jerryscript-project/jerryscript/issues/2699 | 398,596,237 | 2,699 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 93ec2266
Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```javascript
Uint8Array.prototype.join.call([ "2015-01-01T00:", { toString : '2,1,3,4,0' } ], [ ])
```
###### Backtrace:
```
Script Error: TypeError
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b3a3 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558b3f5 in jerry_assert_fail (assertion=0x5555555e4880 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)",
file=0x5555555e4830 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x5555555d0bd0 <__func__.4142.lto_priv.619> "ecma_free_string_list", line=43)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x00005555555b5886 in ecma_free_string_list (string_list_p=0x5555558f6598 <jerry_global_heap+472>) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43
#6 0x00005555555b590b in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:60
#7 0x00005555555b5035 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:63
#8 0x00005555555c2035 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:210
#9 0x00005555555c1454 in main (argc=3, argv=0x7fffffffe1b8) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup> | Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2698/comments | 0 | 2019-01-12T11:40:17Z | 2019-01-15T08:01:33Z | https://github.com/jerryscript-project/jerryscript/issues/2698 | 398,546,772 | 2,698 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 93ec2266
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Array.prototype, 0, { get : function ( ) {throw $} });
Promise.all([,]);
```
###### Backtrace:
```
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6e43801 in __GI_abort () at abort.c:79
#2 0x00000000006d9055 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x00000000005d474f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x00000000005d47a6 in jerry_assert_fail (assertion=0x72be80 <.str.2> "JERRY_CONTEXT (jmem_heap_allocated_size) == 0",
file=0x72bde0 <.str.1> "jerryscript/jerry-core/jmem/jmem-heap.c",
function=0x72bee0 <__func__.jmem_heap_finalize> "jmem_heap_finalize", line=143)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x00000000005d198d in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143
#6 0x00000000005d0d2d in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170
#7 0x000000000051b428 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:225
#8 0x000000000051616d in main (argc=3, argv=0x7fffffffdda8) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2693/comments | 0 | 2019-01-11T12:21:01Z | 2019-01-14T22:46:02Z | https://github.com/jerryscript-project/jerryscript/issues/2693 | 398,266,842 | 2,693 |
[
"jerryscript-project",
"jerryscript"
] | I just noticed the original jerryscript repo is now gone from github and replaced (?) with `pando-project/jerryscript`. Can someone explain what's going on? It would be nice to announce changes like these on the mailing list or something along those lines?
I also noticed the `escargot` repo with yet another JS engine. It'd be nice to know how this relates to JerryScript. Will Escargot replace JerryScript? Will JerryScript still be developed and maintained? | pando-project? what's happening? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2689/comments | 2 | 2019-01-10T10:44:28Z | 2019-02-01T00:44:36Z | https://github.com/jerryscript-project/jerryscript/issues/2689 | 397,771,150 | 2,689 |
[
"jerryscript-project",
"jerryscript"
] | Hello everyone,
Heap Spray is a widely used payload-delivery technique, most JS engines nowadays integrate special mechanisms to mitigate it. Such as nozzle, bubble, etc. I recently came to conclusion that in JerryScript there are also a kind of mitigation to Heap-Spray, can you guys maybe confirm this and tell me what are the mechanisms being used in JerryScript to mitigate Heap-Spray?
If you refer me to any documentation that I can read considering this issue, I will also be very thankful.
Thank you so much. | Diskussion about the possibility of Heap-Spray in JerryScript: | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2677/comments | 6 | 2019-01-07T00:14:33Z | 2019-01-08T17:45:27Z | https://github.com/jerryscript-project/jerryscript/issues/2677 | 396,310,056 | 2,677 |
[
"jerryscript-project",
"jerryscript"
] | I would like to nominate Robert Fancsik (@rerobika) to become a committer. He already has 56 landed PRs (plus 11 currently under review).
https://github.com/pando-project/jerryscript/pulls?utf8=✓&q=is%3Apr+author%3Arerobika+
| Nominating Robert Fancsik (@rerobika) to become a JerryScript committer | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2676/comments | 5 | 2019-01-06T15:56:57Z | 2019-01-14T09:52:16Z | https://github.com/jerryscript-project/jerryscript/issues/2676 | 396,270,055 | 2,676 |
[
"jerryscript-project",
"jerryscript"
] | # jerry version
aae50c9da089974b2da9bb3df71e0d0dffce467b
# build command
```
python ./tools/build.py --clean --debug --compile-flag="-O1 -g -fsanitize=address -fno-omit-frame-pointer" --lto=off --error-message=on
```
# OS
Ubuntu 18.04
# vulnerability
global buffer overflow
# test case
https://transfer.sh/9BXc6/test.js
# analysis
The global buffer overflow happened in the function `print_unhandled_exception`, here it tries to seek the correct position to print. However the size of `buffer` is limited to 1048576.
If we can make the `pos` over 1048576, the buffer overflow will be triggered.
```C
/* 2. seek and print */
while (buffer[pos] != '\0')
{
if (buffer[pos] == '\n')
{
curr_line++;
}
if (err_line < SYNTAX_ERROR_CONTEXT_SIZE
|| (err_line >= curr_line
&& (err_line - curr_line) <= SYNTAX_ERROR_CONTEXT_SIZE))
{
/* context must be printed */
is_printing_context = true;
}
if (curr_line > err_line)
{
break;
}
if (is_printing_context)
{
jerry_port_log (JERRY_LOG_LEVEL_ERROR, "%c", buffer[pos]);
}
pos++;
}
``` | global-buffer-overflow in print_unhandled_exception | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2675/comments | 2 | 2019-01-06T11:12:38Z | 2019-01-21T11:22:28Z | https://github.com/jerryscript-project/jerryscript/issues/2675 | 396,248,893 | 2,675 |
[
"jerryscript-project",
"jerryscript"
] | Jerry version:
```
Checked revision: b69f3fd0
Build command: tools/build.py --profile=es2015-subset --clean --error-messages ON
```
OS:
```
Ubuntu 16.04
```
Test case:
```js
class Shape {
constructor (id,x,y) {
this.id = id
this.x = x
this.y = y
}
toString () {
return "Shape(" + this.id + ")"
}
}
class Rectangle extends Shape {
constructor (id, x, y, width, height) {
super(id, x, y)
}
toString () {
return "Rectangle > " + super.toString()
}
}
class Circle extends Shape {
constructor (id, x, y, radius) {
super(id, x, y)
}
toString () {
return "Circle > " + super.toString()
}
}
var shape = new Shape(0,0,0);
var rec = new Rectangle(1,0,0,4,4);
var circ = new Circle(2,0,0,4);
print(Object.keys(shape))
print(rec.id)
print(circ.id
print(rec.toString())
print(circ.toString())
```
Expected result:
```
id,x,y
1
2
Rectangle > Shape(1)
Circle > Shape(2)
```
Given result:
```
id,x,y
1
2
Rectangle > Shape(undefined)
Circle > Shape(undefined)
``` | Calling parent's function from child handles properties incorrectly | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2671/comments | 1 | 2019-01-03T11:32:09Z | 2019-01-08T08:33:27Z | https://github.com/jerryscript-project/jerryscript/issues/2671 | 395,540,837 | 2,671 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: b69f3fd0
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
new Strin = class extends f ()() {
constructor () {
var C = class extends$B {}
```
###### Backtrace:
```
ICE: Assertion 'context_p->byte_code_size > (branch_p->offset >> 8)' failed at jerryscript/jerry-core/parser/js/js-parser-util.c(parser_set_branch_to_current_position):672.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555cf8f8 "context_p->byte_code_size > (branch_p->offset >> 8)",
file=0x5555555cf610 "jerryscript/jerry-core/parser/js/js-parser-util.c", function=0x5555555d95e0 <__func__.3905> "parser_set_branch_to_current_position", line=672)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x000055555555c400 in parser_set_branch_to_current_position (context_p=0x7fffffffdac0, branch_p=0x7fffffffd600) at jerryscript/jerry-core/parser/js/js-parser-util.c:672
#6 0x0000555555576ba3 in parser_parse_super_class_context_end (context_p=0x7fffffffdac0, is_statement=false) at jerryscript/jerry-core/parser/js/js-parser-statm.c:660
#7 0x000055555557168b in parser_parse_class (context_p=0x7fffffffdac0, is_statement=false) at jerryscript/jerry-core/parser/js/js-parser-expr.c:623
#8 0x0000555555572894 in parser_parse_unary_expression (context_p=0x7fffffffdac0, grouping_level_p=0x7fffffffd6b8) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1401
#9 0x0000555555574471 in parser_parse_expression (context_p=0x7fffffffdac0, options=5) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2166
#10 0x00005555555762db in parser_parse_var_statement.lto_priv.175 (context_p=0x7fffffffdac0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:352
#11 0x000055555555a08c in parser_parse_statements (context_p=0x7fffffffdac0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1880
#12 0x00005555555920f7 in parser_parse_function (context_p=0x7fffffffdac0, status_flags=3146758) at jerryscript/jerry-core/parser/js/js-parser.c:2639
#13 0x0000555555571228 in parser_parse_class_literal (context_p=0x7fffffffdac0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:483
#14 0x00005555555715da in parser_parse_class (context_p=0x7fffffffdac0, is_statement=false) at jerryscript/jerry-core/parser/js/js-parser-expr.c:606
#15 0x0000555555572894 in parser_parse_unary_expression (context_p=0x7fffffffdac0, grouping_level_p=0x7fffffffd978) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1401
#16 0x0000555555574471 in parser_parse_expression (context_p=0x7fffffffdac0, options=2) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2166
#17 0x000055555555a657 in parser_parse_statements (context_p=0x7fffffffdac0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2110
#18 0x00005555555919a5 in parser_parse_source (arg_list_p=0x0, arg_list_size=0,
source_p=0x5555557f6100 <buffer.lto_priv> "new Strin = class extends f ()() {\n constructor () {\n var C = class extends$B {}\n", source_size=91, parse_opts=0,
error_location_p=0x7fffffffdcd4) at jerryscript/jerry-core/parser/js/js-parser.c:2397
#19 0x0000555555592637 in parser_parse_script (arg_list_p=0x0, arg_list_size=0,
source_p=0x5555557f6100 <buffer.lto_priv> "new Strin = class extends f ()() {\n constructor () {\n var C = class extends$B {}\n", source_size=91, parse_opts=0,
bytecode_data_p=0x7fffffffdd20) at jerryscript/jerry-core/parser/js/js-parser.c:2848
#20 0x00005555555c22c9 in jerry_parse (resource_name_p=0x7fffffffe384 "test.js", resource_name_length=7,
source_p=0x5555557f6100 <buffer.lto_priv> "new Strin = class extends f ()() {\n constructor () {\n var C = class extends$B {}\n", source_size=91, parse_opts=0)
at jerryscript/jerry-core/api/jerry.c:401
#21 0x00005555555c0e6b in main (argc=3, argv=0x7fffffffe048) at jerryscript/jerry-main/main-unix.c:667
```
| Assertion 'context_p->byte_code_size > (branch_p->offset >> 8)' failed in parser_set_branch_to_current_position | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2667/comments | 0 | 2019-01-03T08:45:28Z | 2019-01-03T12:36:37Z | https://github.com/jerryscript-project/jerryscript/issues/2667 | 395,494,111 | 2,667 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: b69f3fd0
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
class C {
static D () {}
}
class D extends C {}
```
###### Backtrace:
```
ICE: Assertion 'ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND' failed at jerryscript/jerry-core/ecma/operations/ecma-lex-env.c(ecma_op_set_mutable_binding):211.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555e1cd0 "ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND",
file=0x5555555e1bc0 "jerryscript/jerry-core/ecma/operations/ecma-lex-env.c", function=0x5555555d3110 <__func__.4518.lto_priv.530> "ecma_op_set_mutable_binding", line=211)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555a220b in ecma_op_set_mutable_binding (lex_env_p=0x5555558f74e0 <jerry_global_heap+288>, name_p=0x5555558f7598 <jerry_global_heap+472>, value=299, is_strict=false)
at jerryscript/jerry-core/ecma/operations/ecma-lex-env.c:211
#6 0x000055555556c1c0 in ecma_op_put_value_lex_env_base (ref_base_lex_env_p=0x5555558f74e0 <jerry_global_heap+288>, var_name_string_p=0x5555558f7598 <jerry_global_heap+472>, is_strict=false, value=299)
at jerryscript/jerry-core/ecma/operations/ecma-get-put-value.c:190
#7 0x000055555559b44e in vm_loop (frame_ctx_p=0x7fffffffdbf0) at jerryscript/jerry-core/vm/vm.c:3142
#8 0x000055555559bcfe in vm_execute (frame_ctx_p=0x7fffffffdbf0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3428
#9 0x000055555559bfd7 in vm_run (bytecode_header_p=0x5555558f75d0 <jerry_global_heap+528>, this_binding_value=27, lex_env_p=0x5555558f73f0 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0,
arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3531
#10 0x00005555555958f6 in vm_run_global (bytecode_p=0x5555558f75d0 <jerry_global_heap+528>) at jerryscript/jerry-core/vm/vm.c:227
#11 0x00005555555c2595 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:544
#12 0x00005555555c0ea0 in main (argc=3, argv=0x7fffffffe028) at jerryscript/jerry-main/main-unix.c:676
```
| Assertion 'ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND' failed in ecma_op_set_mutable_binding | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2666/comments | 0 | 2019-01-03T08:33:33Z | 2019-01-03T12:37:02Z | https://github.com/jerryscript-project/jerryscript/issues/2666 | 395,491,278 | 2,666 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
new RegExp("\{{91[06,456}");
```
Note: although the assert message is the same as in #2652 but since the test cases are quite different the issues are probably different, too.
###### Backtrace:
```
Script Error: SyntaxError
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555de388 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x5555555de308 "jerryscript/jerry-core/jmem/jmem-heap.c",
function=0x5555555d3c00 <__func__.3881.lto_priv.456> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x000055555558ac67 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143
#6 0x000055555558a8dc in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170
#7 0x00005555555c2020 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:225
#8 0x00005555555c13b3 in main (argc=3, argv=0x7fffffffe038) at jerryscript/jerry-main/main-unix.c:874
```
| Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2660/comments | 0 | 2019-01-01T11:27:38Z | 2019-01-08T08:04:58Z | https://github.com/jerryscript-project/jerryscript/issues/2660 | 395,075,148 | 2,660 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
`eval`("eval ('super (a, b, c)')");
```
###### Backtrace:
```
ICE: Assertion 'context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL' failed at jerryscript/jerry-core/parser/js/js-parser-expr.c(parser_process_unary_expression):1554.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555dba48 "context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL",
file=0x5555555db5c8 "jerryscript/jerry-core/parser/js/js-parser-expr.c", function=0x5555555d8e00 <__func__.4701.lto_priv.204> "parser_process_unary_expression", line=1554)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x0000555555572d1f in parser_process_unary_expression (context_p=0x7fffffffdab0) at jerryscript/jerry-core/parser/js/js-parser-expr.c:1554
#6 0x000055555557447d in parser_parse_expression (context_p=0x7fffffffdab0, options=2) at jerryscript/jerry-core/parser/js/js-parser-expr.c:2171
#7 0x000055555555a657 in parser_parse_statements (context_p=0x7fffffffdab0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:2110
#8 0x00005555555919a5 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557f6100 <buffer.lto_priv> "`eval`(\"eval ('super (a, b, c)')\");\n", source_size=36, parse_opts=0,
error_location_p=0x7fffffffdcc4) at jerryscript/jerry-core/parser/js/js-parser.c:2397
#9 0x0000555555592637 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557f6100 <buffer.lto_priv> "`eval`(\"eval ('super (a, b, c)')\");\n", source_size=36, parse_opts=0,
bytecode_data_p=0x7fffffffdd10) at jerryscript/jerry-core/parser/js/js-parser.c:2848
#10 0x00005555555c22c9 in jerry_parse (resource_name_p=0x7fffffffe383 "test.js", resource_name_length=7, source_p=0x5555557f6100 <buffer.lto_priv> "`eval`(\"eval ('super (a, b, c)')\");\n",
source_size=36, parse_opts=0) at jerryscript/jerry-core/api/jerry.c:401
#11 0x00005555555c0e6b in main (argc=3, argv=0x7fffffffe038) at jerryscript/jerry-main/main-unix.c:667
```
| Assertion 'context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL' failed in parser_process_unary_expression | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2659/comments | 0 | 2018-12-31T11:23:36Z | 2019-01-15T12:29:57Z | https://github.com/jerryscript-project/jerryscript/issues/2659 | 394,966,472 | 2,659 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
var A = class extends null {}
new A;
```
###### Backtrace:
```
ICE: Assertion 'type == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION' failed at jerryscript/jerry-core/ecma/operations/ecma-function-object.c(ecma_op_function_construct):1054.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555e1970 "type == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION",
file=0x5555555e1338 "jerryscript/jerry-core/ecma/operations/ecma-function-object.c", function=0x5555555d2e90 <__func__.4934.lto_priv.539> "ecma_op_function_construct", line=1054)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555a0e55 in ecma_op_function_construct (func_obj_p=0x5555558f7498 <jerry_global_heap+216>, this_arg_value=291, arguments_list_p=0x7fffffffdbb4, arguments_list_len=0)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1054
#6 0x00005555555a0e22 in ecma_op_function_construct (func_obj_p=0x5555558f74a8 <jerry_global_heap+232>, this_arg_value=291, arguments_list_p=0x7fffffffdbb4, arguments_list_len=0)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1045
#7 0x000055555559602f in opfunc_construct (frame_ctx_p=0x7fffffffdbf0) at jerryscript/jerry-core/vm/vm.c:610
#8 0x000055555559bd43 in vm_execute (frame_ctx_p=0x7fffffffdbf0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3446
#9 0x000055555559bfd7 in vm_run (bytecode_header_p=0x5555558f75c0 <jerry_global_heap+512>, this_binding_value=27, lex_env_p=0x5555558f73f0 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0,
arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3531
#10 0x00005555555958f6 in vm_run_global (bytecode_p=0x5555558f75c0 <jerry_global_heap+512>) at jerryscript/jerry-core/vm/vm.c:227
#11 0x00005555555c2595 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:544
#12 0x00005555555c0ea0 in main (argc=3, argv=0x7fffffffe028) at jerryscript/jerry-main/main-unix.c:676
```
| Assertion 'type == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION' failed in ecma_op_function_construct | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2658/comments | 0 | 2018-12-31T00:23:25Z | 2019-01-09T13:27:51Z | https://github.com/jerryscript-project/jerryscript/issues/2658 | 394,913,191 | 2,658 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
var Mixin1 = (superclass) => class extends super.lass {};
var Mixin2 = (superclass) => class extends superclass {};
class S {}
class C extends Mixin1 (Mixin2 (S)) {}
```
###### Backtrace:
```
ICE: Assertion 'lex_env_p != NULL' failed at jerryscript/jerry-core/ecma/operations/ecma-reference.c(ecma_op_resolve_super_reference_value):73.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555e3318 "lex_env_p != NULL", file=0x5555555e2aa8 "jerryscript/jerry-core/ecma/operations/ecma-reference.c",
function=0x5555555d3760 <__func__.3802.lto_priv.122> "ecma_op_resolve_super_reference_value", line=73) at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555a9257 in ecma_op_resolve_super_reference_value (lex_env_p=0x0) at jerryscript/jerry-core/ecma/operations/ecma-reference.c:73
#6 0x0000555555597f4b in vm_loop (frame_ctx_p=0x7fffffffd8d0) at jerryscript/jerry-core/vm/vm.c:1520
#7 0x000055555559bcfe in vm_execute (frame_ctx_p=0x7fffffffd8d0, arg_p=0x7fffffffdba4, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3428
#8 0x000055555559bfd7 in vm_run (bytecode_header_p=0x5555558f7638 <jerry_global_heap+632>, this_binding_value=27, lex_env_p=0x5555558f73f0 <jerry_global_heap+48>, parse_opts=0,
arg_list_p=0x7fffffffdba4, arg_list_len=1) at jerryscript/jerry-core/vm/vm.c:3531
#9 0x00005555555a0551 in ecma_op_function_call (func_obj_p=0x5555558f74b8 <jerry_global_heap+248>, this_arg_value=72, arguments_list_p=0x7fffffffdba4, arguments_list_len=1)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:784
#10 0x0000555555595e53 in opfunc_call (frame_ctx_p=0x7fffffffdbe0) at jerryscript/jerry-core/vm/vm.c:526
#11 0x000055555559bd27 in vm_execute (frame_ctx_p=0x7fffffffdbe0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3434
#12 0x000055555559bfd7 in vm_run (bytecode_header_p=0x5555558f7660 <jerry_global_heap+672>, this_binding_value=27, lex_env_p=0x5555558f73f0 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0,
arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3531
#13 0x00005555555958f6 in vm_run_global (bytecode_p=0x5555558f7660 <jerry_global_heap+672>) at jerryscript/jerry-core/vm/vm.c:227
#14 0x00005555555c2595 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:544
#15 0x00005555555c0ea0 in main (argc=3, argv=0x7fffffffe018) at jerryscript/jerry-main/main-unix.c:676
```
| Assertion 'lex_env_p != NULL' failed in ecma_op_resolve_super_reference_value | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2657/comments | 0 | 2018-12-30T22:04:35Z | 2019-01-22T08:21:28Z | https://github.com/jerryscript-project/jerryscript/issues/2657 | 394,904,865 | 2,657 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
function testcase ( ) {
obj.hasOwnProperty("arguments") ;
}
```
###### Backtrace:
```
ICE: Assertion '(literal_p->status_flags & ~(LEXER_FLAG_SOURCE_PTR | LEXER_FLAG_LATE_INIT)) == 0' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_compute_indicies):363.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555dece8 "(literal_p->status_flags & ~(LEXER_FLAG_SOURCE_PTR | LEXER_FLAG_LATE_INIT)) == 0",
file=0x5555555deca0 "jerryscript/jerry-core/parser/js/js-parser.c", function=0x5555555d5070 <__func__.5115.lto_priv.396> "parser_compute_indicies", line=363)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x000055555558ecd5 in parser_compute_indicies (context_p=0x7fffffffdab0, ident_end=0x7fffffffd720, uninitialized_var_end=0x7fffffffd71e, initialized_var_end=0x7fffffffd71c,
const_literal_end=0x7fffffffd71a) at jerryscript/jerry-core/parser/js/js-parser.c:363
#6 0x000055555558fed6 in parser_post_processing (context_p=0x7fffffffdab0) at jerryscript/jerry-core/parser/js/js-parser.c:1489
#7 0x0000555555592103 in parser_parse_function (context_p=0x7fffffffdab0, status_flags=6) at jerryscript/jerry-core/parser/js/js-parser.c:2640
#8 0x000055555556f684 in lexer_construct_function_object (context_p=0x7fffffffdab0, extra_status_flags=6) at jerryscript/jerry-core/parser/js/js-lexer.c:1992
#9 0x000055555557655d in parser_parse_function_statement.lto_priv.174 (context_p=0x7fffffffdab0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:438
#10 0x000055555555a0b9 in parser_parse_statements (context_p=0x7fffffffdab0) at jerryscript/jerry-core/parser/js/js-parser-statm.c:1894
#11 0x00005555555919a5 in parser_parse_source (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557f6100 <buffer.lto_priv> "function testcase ( ) { \n obj.hasOwnProperty(\"arguments\") ; \n} \n",
source_size=67, parse_opts=0, error_location_p=0x7fffffffdcc4) at jerryscript/jerry-core/parser/js/js-parser.c:2397
#12 0x0000555555592637 in parser_parse_script (arg_list_p=0x0, arg_list_size=0, source_p=0x5555557f6100 <buffer.lto_priv> "function testcase ( ) { \n obj.hasOwnProperty(\"arguments\") ; \n} \n",
source_size=67, parse_opts=0, bytecode_data_p=0x7fffffffdd10) at jerryscript/jerry-core/parser/js/js-parser.c:2848
#13 0x00005555555c22c9 in jerry_parse (resource_name_p=0x7fffffffe383 "test.js", resource_name_length=7,
source_p=0x5555557f6100 <buffer.lto_priv> "function testcase ( ) { \n obj.hasOwnProperty(\"arguments\") ; \n} \n", source_size=67, parse_opts=0)
at jerryscript/jerry-core/api/jerry.c:401
#14 0x00005555555c0e6b in main (argc=3, argv=0x7fffffffe038) at jerryscript/jerry-main/main-unix.c:667
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion '(literal_p->status_flags & ~(LEXER_FLAG_SOURCE_PTR | LEXER_FLAG_LATE_INIT)) == 0' failed in parser_compute_indicies | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2656/comments | 1 | 2018-12-30T21:44:25Z | 2019-01-15T12:29:57Z | https://github.com/jerryscript-project/jerryscript/issues/2656 | 394,903,685 | 2,656 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
--null.static ? this : [ , ] instanceof true;
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_undefined (value) || ecma_is_value_null (value) || ecma_is_value_boolean (value) || ecma_is_value_number (value) || ecma_is_value_string (value) || ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_check_value_type_is_spec_defined):386.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (
assertion=0x5555555e3c78 "ecma_is_value_undefined (value) || ecma_is_value_null (value) || ecma_is_value_boolean (value) || ecma_is_value_number (value) || ecma_is_value_string (value) || ecma_is_value_object (value)", file=0x5555555e3c28 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c",
function=0x5555555d0ac0 <__func__.3728.lto_priv.660> "ecma_check_value_type_is_spec_defined", line=386) at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555b0570 in ecma_check_value_type_is_spec_defined (value=24) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:381
#6 0x000055555559dd8c in ecma_op_to_number (value=24) at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:244
#7 0x00005555555988a3 in vm_loop (frame_ctx_p=0x7fffffffdc00) at jerryscript/jerry-core/vm/vm.c:1819
#8 0x000055555559bcfe in vm_execute (frame_ctx_p=0x7fffffffdc00, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3428
#9 0x000055555559bfd7 in vm_run (bytecode_header_p=0x5555558f75c0 <jerry_global_heap+512>, this_binding_value=27, lex_env_p=0x5555558f73f0 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0,
arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3531
#10 0x00005555555958f6 in vm_run_global (bytecode_p=0x5555558f75c0 <jerry_global_heap+512>) at jerryscript/jerry-core/vm/vm.c:227
#11 0x00005555555c2595 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:544
#12 0x00005555555c0ea0 in main (argc=3, argv=0x7fffffffe038) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ecma_is_value_undefined (value) || ecma_is_value_null (value) || ecma_is_value_boolean (value) || ecma_is_value_number (value) || ecma_is_value_string (value) || ecma_is_value_object (value)' failed in ecma_check_value_type_is_spec_defined | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2654/comments | 1 | 2018-12-30T18:09:35Z | 2019-01-02T11:56:03Z | https://github.com/jerryscript-project/jerryscript/issues/2654 | 394,890,750 | 2,654 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty (Object.prototype, "" , { 'set' : function ( ) { throw new ReferenceError ( "foo" ) ; } } ) ;
JSON.stringify( )
```
###### Backtrace:
```
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2f6 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b684 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b6d6 in jerry_assert_fail (assertion=0x5555555e4d78 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)",
file=0x5555555e4d28 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x5555555d1270 <__func__.4207.lto_priv.618> "ecma_free_string_list", line=43)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555b50bf in ecma_free_string_list (string_list_p=0x5555558f7648 <jerry_global_heap+648>) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43
#6 0x00005555555b5144 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:60
#7 0x00005555555b486e in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:63
#8 0x00005555555c1f94 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:210
#9 0x00005555555c13b3 in main (argc=3, argv=0x7fffffffe038) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2653/comments | 0 | 2018-12-30T17:54:28Z | 2019-01-03T14:30:22Z | https://github.com/jerryscript-project/jerryscript/issues/2653 | 394,889,875 | 2,653 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: ec142f5f
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Object.prototype,"",{'set':function(){throw ReferenceError("")}});
print(JSON.stringify())
```
###### Backtrace:
```
undefined
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555efd5 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558ab64 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558abb6 in jerry_assert_fail (assertion=0x5555555e0188 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x5555555e0108 "jerryscript/jerry-core/jmem/jmem-heap.c",
function=0x5555555d5220 <__func__.3881.lto_priv.453> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x000055555558a147 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143
#6 0x0000555555589dbc in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170
#7 0x00005555555c2660 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:225
#8 0x00005555555c19f3 in main (argc=3, argv=0x7fffffffe038) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2652/comments | 0 | 2018-12-30T17:40:31Z | 2019-01-03T14:30:22Z | https://github.com/jerryscript-project/jerryscript/issues/2652 | 394,889,008 | 2,652 |
[
"jerryscript-project",
"jerryscript"
] | Hi, i want to extend jerryscript, and add `Number.isInteger` method, but i have encountered difficulties.
I learn `jerry-core/ecma/builtin-objects` codes, then i write these code:
```c
/* in lit-magic-strings.inc.h */
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_NAN, "isNaN")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_INTEGER, "isInteger") // new
```
```c
/* in ecma-builtin-number.inc.h */
/* ECMA-262 v5, 15.7.3.1 */
OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
ECMA_PROPERTY_FIXED)
ROUTINE (LIT_MAGIC_STRING_IS_INTEGER, ecma_builtin_number_object_is_integer, 0, 0) // new
```
```c
/* in ecma-builtin-number.c */
static ecma_value_t
ecma_builtin_number_object_is_integer (ecma_value_t this_arg /**< this argument */){
return ECMA_VALUE_UNDEFINED;
}
```
```c
/* in lit-magic-strings.ini */
LIT_MAGIC_STRING_IS_NAN = "isNaN"
LIT_MAGIC_STRING_IS_INTEGER = isInteger
```
finally, i compile my work, and run bin/jerry and example code, i got undefined.
```javascript
console.log(Number.isInteger) // undefined
```
But when i replace `LIT_MAGIC_STRING_IS_INTEGER` to `LIT_MAGIC_STRING_IS_NAN`, and run example code, it workes
```javascript
console.log(Number.isNaN) // not undefined
```
I don't know why I got the error. I didn't see the relevant documentation. I hope I can solve this problem for you. Thank you.
| add Number.isInteger Implement not work | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2651/comments | 0 | 2018-12-25T08:37:05Z | 2018-12-26T04:47:46Z | https://github.com/jerryscript-project/jerryscript/issues/2651 | 393,986,927 | 2,651 |
[
"jerryscript-project",
"jerryscript"
] | When I use scientific notation to assign a value to a variable, I find that in some specific cases, Jerry introduces errors, causing subsequent operations to fail.
The common feature of these specific numbers is that the 5th decimal place is odd and the exponent is 21, just like `1.00001e+21`, `1.0003e+21`, etc. When the assignment is over, the value of the variable introduces a small error.
For example:
```javascript
var num = 1.00517e+21;
print(num);
// print(String(num));
```
The result of the program running is `1.0051700000000001e+21`.
A similar operation has no errors on `nodejs`, `v8`, or `SpiderMonkey`.
After debugging analysis, it is found that the numerical value literal has been introduced into the error after being processed by the `ecma_utf8_string_to_number()` function.
I think there is a problem here, please fix it or or give a relevant explanation, thank you. | An error occurred when using scientific notation | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2638/comments | 5 | 2018-12-12T02:22:57Z | 2019-01-23T03:28:51Z | https://github.com/jerryscript-project/jerryscript/issues/2638 | 390,037,261 | 2,638 |
[
"jerryscript-project",
"jerryscript"
] | Recording a scenario from #2606
> [A] failure was found when debugging IoT.js with static snapshots turned on, if an error was thrown an assertion failure was caused. The reason is the frame context's `bytecode_header_p` pointer was not a heap pointer. The `jerry_debugger_breakpoint_hit` function tries to set a compressed pointer which points to `bytecode_header_p` with the `JMEM_CP_SET_NON_NULL_POINTER` macro, which has an assertion that requires the above mentioned `bytecode_header_p` to be a heap pointer, which is obviously not.
> [Creating a a JerryScript-only test environment is n]ot a trivial task. You need a unit test which creates such an environment, and you also need the python debugger to do debugging. Hence it needs a new infrastructure basically, where instead of a .js, a binary is run by the debugger tester driver. | Add test environment for debugging with static snapshots enabled | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2637/comments | 0 | 2018-12-11T17:45:57Z | 2018-12-11T17:45:57Z | https://github.com/jerryscript-project/jerryscript/issues/2637 | 389,879,572 | 2,637 |
[
"jerryscript-project",
"jerryscript"
] | Please consider moving libc dependency to a standalone file, e.g. jerryscript-libc.h and add to jerryscript-compiler.h, and then remove include <> in the sources....
The reason is that, in future we might have better options that libc dependencies removed for some how OS (w/- libc) or libdl-in-use anyway.
----
e.g.
+ jerry-core/include/jerryscript-libc.h
```
#ifndef _JERRY_LIBC_H
#define _JERRY_LIBC_H
#if defined JERRY_USING_LIBDL && JERRY_USING_LIBDL
#define LIBC(sym) jerry_syms[JERY_SYM_##sym];
#else
#define LIBC(sym) sym
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include <setjmp.h>
#include <float.h>
#include <ctype.h>
#include <stdarg.h>
#include <math.h>
#ifdef JERRY_DEBUGGER
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/socket.h>
#endif
#include <assert.h>
#ifdef HAVE_TIME_H
#include <time.h>
#elif defined (HAVE_UNISTD_H)
#include <unistd.h>
#endif /* HAVE_TIME_H */
//default-date.c
#ifdef HAVE_TM_GMTOFF
#include <time.h>
#endif /* HAVE_TM_GMTOFF */
#ifdef __GNUC__
#include <sys/time.h>
#endif /* __GNUC__ */
#endif//JERRY_USING_LIBDL
#endif//_JERRY_LIBC_H
```
| Proposal: relocation of libc dependency | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2624/comments | 6 | 2018-11-30T08:27:39Z | 2019-01-19T01:42:19Z | https://github.com/jerryscript-project/jerryscript/issues/2624 | 386,085,032 | 2,624 |
[
"jerryscript-project",
"jerryscript"
] | Code execution latency | Code execution latency | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2621/comments | 0 | 2018-11-28T10:29:09Z | 2018-11-28T10:37:53Z | https://github.com/jerryscript-project/jerryscript/issues/2621 | 385,200,121 | 2,621 |
[
"jerryscript-project",
"jerryscript"
] | The 'lexer_parse_number' function will process .5. as a number.
Can we modify the code at line 961
`
do
{
source_p++;
}
while (source_p < source_end_p
&& source_p[0] >= LIT_CHAR_0
&& source_p[0] <= LIT_CHAR_9);
`
to
`
while (source_p < source_end_p
&& source_p[0] >= LIT_CHAR_0
&& source_p[0] <= LIT_CHAR_9)
{
source_p++;
}
` | Parsing code like ".5.toString(4)" will cause a error "identifier start after number" | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2614/comments | 0 | 2018-11-22T07:24:29Z | 2018-12-01T16:22:40Z | https://github.com/jerryscript-project/jerryscript/issues/2614 | 383,409,476 | 2,614 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 704eb45c
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty( Array.prototype, 0, { set : function ( ) { throw "MyError" } } );
Promise.all( [ .86456 ] ) ;
```
This issue is probably related to #2602 because of the similarity in the repros.
###### Backtrace:
```
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):143.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2cf in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b5a5 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b5f7 in jerry_assert_fail (assertion=0x5555555ddd58 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0", file=0x5555555ddce0 "jerryscript/jerry-core/jmem/jmem-heap.c",
function=0x5555555d36a0 <__func__.3877.lto_priv.115> "jmem_heap_finalize", line=143) at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x000055555558ab88 in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:143
#6 0x000055555558a7fd in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:170
#7 0x00005555555c1d90 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:225
#8 0x00005555555c1123 in main (argc=3, argv=0x7fffffffe078) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2603/comments | 0 | 2018-11-19T22:53:47Z | 2018-11-20T13:40:35Z | https://github.com/jerryscript-project/jerryscript/issues/2603 | 382,426,488 | 2,603 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 704eb45c
Build command: ./tools/build.py --clean --debug --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty ( Array.prototype , 0 , { set : function ( ) { throw "MyError" } } ) ;
Promise.all ( [ "2015-01-01" ] ) ;
```
###### Backtrace:
```
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43.
Error: ERR_FAILED_INTERNAL_ASSERTION
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f2cf in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558b5a5 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x000055555558b5f7 in jerry_assert_fail (assertion=0x5555555e46c8 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)",
file=0x5555555e4680 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x5555555d0db0 <__func__.4203.lto_priv.618> "ecma_free_string_list", line=43)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555b5062 in ecma_free_string_list (string_list_p=0x5555558f6648 <jerry_global_heap+648>) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43
#6 0x00005555555b50e7 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:60
#7 0x00005555555b4811 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:63
#8 0x00005555555c1d04 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:210
#9 0x00005555555c1123 in main (argc=3, argv=0x7fffffffe078) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2602/comments | 0 | 2018-11-19T22:46:21Z | 2018-11-20T13:40:35Z | https://github.com/jerryscript-project/jerryscript/issues/2602 | 382,424,464 | 2,602 |
[
"jerryscript-project",
"jerryscript"
] | after I open the JMEM_STATS define try to print the heap info, then I find out that at jmem-heap.c jmem_heap_stat_free function the waste_bytes is bigger than heap_stats->waste_bytes. | jmem_heap_stats_t.waste_bytes became a minus value | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2600/comments | 3 | 2018-11-16T14:13:40Z | 2019-01-19T01:36:06Z | https://github.com/jerryscript-project/jerryscript/issues/2600 | 381,615,890 | 2,600 |
[
"jerryscript-project",
"jerryscript"
] | @martijnthe @jimmy-huang
Zephyr build currently throws this error:
`FileNotFoundError: [Errno 2] No such file or directory: 'pyocd/_version.py'``
`Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-rd78ltjr/pyocd/`
Currently all PRs are blocked. Please fix it. | Zephyr build fails on Travis | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2593/comments | 1 | 2018-11-13T07:45:54Z | 2018-11-30T11:51:59Z | https://github.com/jerryscript-project/jerryscript/issues/2593 | 380,097,649 | 2,593 |
[
"jerryscript-project",
"jerryscript"
] | There is regression after the Class implementation landed.
**Build command**:
```bash
tools/build.py --clean --debug --profile=es2015-subset
```
**Test case**:
```js
function f(a,b,c) {
var args = Array.prototype.slice.call(arguments, 3);
print(typeof args.splice);
}
f();
```
**Output**:
```
undefined
```
**Expected output**:
```
function
```
| Missing prototype functions in ES2015 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2587/comments | 2 | 2018-11-08T09:01:39Z | 2018-11-09T08:42:17Z | https://github.com/jerryscript-project/jerryscript/issues/2587 | 378,635,861 | 2,587 |
[
"jerryscript-project",
"jerryscript"
] | Hi,
This is Qihoo360 CodeSafe Team, we found a suspicious unsigned integer wrap issue, see
https://github.com/jerryscript-project/jerryscript/blob/3c1d0e61002c5424d2b882a8044b75a11c0dd58c/jerry-core/ecma/base/ecma-helpers-number.c#L539. At line 539, when the program execute `fraction--`, there is a chance that the value of `fraction` is 0. For the condition expression at line 531, if `fraction` and `biased_exp` are all zero, else branch will be chosen.
Since I not familiar with `jerryscript`, I am not sure `fraction` and `biased_exp` are absolutely independent, that is can them be zero at the same time?
Cheers
Qihoo360 CodeSafe Team | A possible unsigned integer wrap? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2582/comments | 2 | 2018-10-31T07:18:52Z | 2018-11-12T02:16:06Z | https://github.com/jerryscript-project/jerryscript/issues/2582 | 375,829,527 | 2,582 |
[
"jerryscript-project",
"jerryscript"
] | Folks,
tl;dr: I need to "un-pop" the argument stack -- go to the last paragraph (starting with "Finally,...") for my suggested addition to the `jerryx_arg` routines...
I'm working extensively with the `jerryx_arg` routines/types, and I've hit a snag:
I need to query the argument stack without changing it. For example, I might be expecting a parameter that is _either_ a number or a string.
Thus, I'd like to do something like (simplified, not accurate :-) :
```
result = jerryx_arg_number(...)
if (jerry_value_is_error(result))
result = jerryx_arg_string(...)
```
I could write my own "`jerryx_arg_number_or_string`", but the permutations of all the arguments are too numerous, it'd be a copy of a whole lot of code that already exists, and I don't get the continuity of behavior with my own code -- specifically, it's not easy to mimic the behavior of the `JERRYX_ARG_COERCE` flag, so a simple call to jerryx_arg_number vs my own homegrown version of the above code would likely give different results given certain inputs.
One solution would be to give more power to the `JERRYX_ARG_OPTIONAL` flag -- if a type check fails, that `jerryx_arg_*` function would not pop the stack. I dislike that solution, b/c it would mean overloading the meaning of that flag.
A second solution would be to add a flag to all of the `jerryx_arg_*` functions to specify whether the stack top should be popped on failure. We could add a new enum type like jerry_arg_coerce_t, _etc_., to control this behavior. I think this solution has the some merit: it keeps the minimalistic interface of the `jerryx_arg_*` functions and lets us maintain the current behavior as the default. Its downside is that it adds some logic to the `jerryx_arg_*` routines...
To implement this solution, I propose adding a new enum type in the extension code, the documentation for which would read as follows:
> **jerryx_arg_pop_on_failure_t**
> Enum that indicates whether a failed transformation attempt modifies the stack.
> - `JERRYX_ARG_POP_ON_FAILURE` -- calling the transform has the effect of popping the top value off of the argument stack
> - `JERRYX_ARG_DO_NOT_POP_ON_FAILURE` -- if the transform returns an error, the stack is left unchanged
Finally, the solution I'd like to propose is to add a new call to the custom-validation support routines that would let us "restore" the value just popped. This solution would normally not work, but in our case, "pop" just moves a pointer through an array, so like we increment the pointer on a pop, we decrement that pointer on a restore. I have written this code (and use it now in my work), and it is as follows:
```
/**
* Restore the previous JS argument from the iterator.
* It will change the index and js_arg_p value in the iterator.
*
* @return the restored (now current) JS argument.
*/
jerry_value_t
jerryx_arg_js_iterator_restore (jerryx_arg_js_iterator_t *js_arg_iter_p) /**< the JS arg iterator */
{
if (js_arg_iter_p->js_arg_idx == 0)
return jerry_create_undefined();
else
{
--js_arg_iter_p->js_arg_idx;
--js_arg_iter_p->js_arg_p;
return *js_arg_iter_p->js_arg_p;
}
} /* jerryx_arg_js_iterator_restore */
```
Discussion?
Thanks,
Tim
| Add a new enum type to jerryx_arg_* routines -- EDIT: add a new jerryx_arg_js_iterator_restore() function | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2581/comments | 4 | 2018-10-30T19:47:24Z | 2019-01-16T10:51:09Z | https://github.com/jerryscript-project/jerryscript/issues/2581 | 375,662,963 | 2,581 |
[
"jerryscript-project",
"jerryscript"
] | Hello,
The quickstart says you can:
git clone https://github.com/ARMmbed/mbed-js-example
cd mbed-js-example
npm install
gulp --target=YOUR_TARGET_NAME
However although the nRF52840 dev kit is claimed to be a supported board, running:
gulp --target=NRF52840_DK
fails with:
$ make BOARD=nrf52840_dk EXTRAS=
[15:39:30] build/make
[15:39:30] Finished 'build' after 2.63 s
[15:39:30] Starting 'default'...
[15:39:30] Finished 'default' after 86 μs
cd jerryscript/targets/mbedos5 && pip install -r tools/requirements.txt && rm -f source/js_encoded.cpp && rm -f source/pins.cpp && rm -f source/main.cpp && make BOARD=nrf52840_dk EXTRA_SRC="../../../source" EXTERN_BUILD_DIR=../../../out/nrf52840_dk NO_JS=1
Requirement already satisfied: pycparser<=2.17 in /usr/local/lib/python2.7/site-packages (from -r tools/requirements.txt (line 1)) (2.17)
Requirement already satisfied: simpleeval in /usr/local/lib/python2.7/site-packages (from -r tools/requirements.txt (line 2)) (0.9.6)
Requirement already satisfied: pycparserext in /usr/local/lib/python2.7/site-packages (from -r tools/requirements.txt (line 3)) (2016.2)
Requirement already satisfied: ply>=3.4 in /usr/local/lib/python2.7/site-packages (from pycparserext->-r tools/requirements.txt (line 3)) (3.11)
python tools/generate_pins.py nrf52840_dk
In file included from ./mbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/device/nrf.h:74:0,
from ./mbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/drivers_nrf/hal/nrf_gpio.h:41,
from ./mbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/TARGET_NRF52840_DK/PinNames.h:43:
./mbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/device/nrf52840.h:143:10: fatal error: core_cm4.h: No such file or directory
#include "core_cm4.h" /*!< Cortex-M4 processor and core peripherals */
^~~~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
File "tools/generate_pins.py", line 247, in <module>
main()
File "tools/generate_pins.py", line 240, in main
pins = [(x, pins[x]) for x in pins] # turn dict into tuples, which can be sorted
TypeError: 'NoneType' object is not iterable
make[1]: *** [source/pins.cpp] Error 1
make: *** [all] Error 2
events.js:167
throw er; // Unhandled 'error' event
^
Error: Command `make BOARD=nrf52840_dk EXTRAS=` exited with code 2
at ChildProcess.handleSubShellExit (/Users/user/Documents/GitHub/mbed-js-example/node_modules/gulp-run/command.js:166:13)
at Object.onceWrapper (events.js:273:13)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at GulpRunner.afterTransform (_stream_transform.js:94:3)
at ChildProcess.handleSubShellExit (/Users/user/Documents/GitHub/mbed-js-example/node_modules/gulp-run/command.js:169:14)
at Object.onceWrapper (events.js:273:13)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
Tried a few things including updating mbed-os from what is included by jerryscript but no luck. Any thoughts on a fix? Tends to be difficult to fix simple things like missing include dirs with all the magic Mbed CLI does and now with another layer of gulp, I thought I'd ask before trying to dig in further.
Thanks,
Ed | Issue using mbedos5 target (nRF52840) | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2569/comments | 6 | 2018-10-20T16:25:18Z | 2019-04-11T15:51:45Z | https://github.com/jerryscript-project/jerryscript/issues/2569 | 372,227,901 | 2,569 |
[
"jerryscript-project",
"jerryscript"
] | Folks,
I'm stymied, and I'd appreciate a tutorial...
I'm trying to use the jerryx_arg* functions to do parameter checking --the example for jerryx_arg_array shows how to get a static array (e.g., if you expected a parameter that looked like: [int, float, string]), but I'm looking to validate a parameter that is an arbitrarily long array of \<Type>s (e.g., in C, an int[]).
I'm writing my own jerryx_arg_transform_funct_t: the first thing I'll do is pop the element off the args list, which returns a jerry_value_t, but my mental model is that it should instead return an array of jerryx_arg_t's which I'll then need to call jerryx_arg_\<Type> over to build up my array.
...and there's where I'm stuck. Help is most(!) appreciated!
Tim
P.S. I've already written one transform_func_t for floats, as I needed to encapsulate the type conversion from double (which is provided by jerryx_arg_number, which requires a double*), which I've shown below; any comments would be likewise appreciated:
```
#define jerryx_arg_float(x, z) \
jerryx_arg_custom(x, \
(uintptr_t)&((uintptr_t []){(uintptr_t)JERRYX_ARG_COERCE, \
(uintptr_t)z}), \
jerryx_arg_to_float)
// the transform function for floating-point numbers is defined only
// for doubles, so we need a wrapper that will call the version for
// doubles and then convert that value to a float
jerry_value_t jerryx_arg_to_float(jerryx_arg_js_iterator_t *js_arg_iter_p,
const jerryx_arg_t *c_arg_p)
{
double intermediate_result = 0.0;
uintptr_t *extra_info = (uintptr_t*)(c_arg_p->extra_info);
jerryx_arg_t get_double = jerryx_arg_number(&intermediate_result,
extra_info[0],
extra_info[1]);
jerry_value_t convert_to_double_result =
get_double.func(js_arg_iter_p, &get_double);
if (!jerry_value_is_error(convert_to_double_result))
*((float*)(c_arg_p->dest)) = (float)intermediate_result;
return convert_to_double_result;
} /* jerryx_arg_to_float */
``` | How to use the jerryx_arg* for arrays? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2568/comments | 4 | 2018-10-19T22:03:29Z | 2020-07-29T20:18:18Z | https://github.com/jerryscript-project/jerryscript/issues/2568 | 372,130,705 | 2,568 |
[
"jerryscript-project",
"jerryscript"
] | Folks,
Disclaimer: if I've misunderstood something in my explanation: a) mea culpa; feel free to beat me up :-), and b) please explain the truth not only to me, but maybe also include the explanation in the docs...
The jerry_object_native_info_t structure contains exactly one field, a pointer to the function that the garbage collector calls to free the native object. A crude form of type checking is performed every time the native object is accessed: the address of the native_info_t structure is recorded when the native object is created, and subsequent accesses include a check against this address.
...this design has bitten me, but instead of trying to explain the vagaries of separate compilation and const pointers (I'll gladly do so, but it'll be long and tedious... :-), I'd rather make the case to change this from a design perspective:
In general, a structure with only one field does not need to exist -- the field can just be used as it is; as a simple example: imagine if every integer were a struct containing a single int...
Of course, some systems do exactly that: wrap a struct around simple data types, but they do so for really specific reasons, none of which(?) apply to the native-object code: the "type checking" is only against a constant address of a structure -- probing the system indicates that the contents of the structure aren't even accessed; but even if they are, the only thing in the structure is a function pointer that, by definition, is itself a constant address.
Can we fix this so that the native-object code just makes sure that the free_cb function remains unchanged? (That is, wherever we now send in a pointer to the native_info_t struct, instead send in the free_cb-function pointer instead.)
(No need to read this paragraph is you're already convinced :-) -- The current abstraction is excellent, in that it says: every time you access this otherwise-opaque pointer, make sure it's the right kind of thing by checking against a type signature (which happens to just be the pointer used to free the object). If we implement my proposed change, the abstraction becomes: every time you access this pointer, make sure the guy accessing it knows that a particular function is the function used to free it -- yuck. So to maintain the abstraction with the native_object_t struct, we should not check the address of the struct, but, rather, do a field-by-field comparison of the structs. That way, two otherwise identical structs would match. This, obviously, would require more processing, but would maintain the nice design.
Thanks,
Tim
P.S. This is not a particularly urgent issue -- careful #def'ing solved my specific problem, but it was a little tricky to get right, and the docs aren't very helpful -- thus this suggestion to simplify the design. | Scrap the jerry_object_native_info_t type and just use jerry_object_native_free_callback_t for native objects | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2562/comments | 3 | 2018-10-17T16:54:30Z | 2019-10-18T11:40:09Z | https://github.com/jerryscript-project/jerryscript/issues/2562 | 371,174,060 | 2,562 |
[
"jerryscript-project",
"jerryscript"
] | uintptr_t in arg checking? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2561/comments | 0 | 2018-10-12T15:44:58Z | 2018-10-12T15:52:01Z | https://github.com/jerryscript-project/jerryscript/issues/2561 | 369,607,074 | 2,561 |
|
[
"jerryscript-project",
"jerryscript"
] | Hi,
We are seeing some behavior which we didn't expect when processing an object (jerry_value_t) in c, returned from a javascript function. I am not sure if this is normal behavior, as I am not very familiar with Javascript. Any comments or responses to shed some light on this would be appreciated.
We parse and run the following script:
`function(input) {
var x = 0;
var a = [x];
return { "name_x" : a };
}";`
Then, in c, we extract the array `a` and check it's type and size using: `jerry_value_is_array(a)` and `jerry_get_array_length(a)`. These return `true` and `1`, as expected.
We then call `jerry_get_property_by_index(a, 0)`. This call returns NULL, which is unexpected. We were expecting the call to return an object containing a float value of 0.
Is this normal? | jerry_get_property_by_index returns NULL when array item initialized with zero | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2552/comments | 5 | 2018-10-04T19:16:34Z | 2018-10-09T20:04:27Z | https://github.com/jerryscript-project/jerryscript/issues/2552 | 366,932,110 | 2,552 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 7717d2ee
Build command: ./tools/build.py --clean --debug --error-messages=on --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Array.prototype, 0, { get : function ( ) { throw $; } } ) ;
Promise.race([, this]).then(Error)
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_undefined (value) || ecma_is_value_null (value) || ecma_is_value_boolean (value) || ecma_is_value_number (value) || ecma_is_value_string (value) || ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_check_value_type_is_spec_defined):386.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f1b0 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x0000555555589695 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x00005555555896e7 in jerry_assert_fail (
assertion=0x5555555e3238 "ecma_is_value_undefined (value) || ecma_is_value_null (value) || ecma_is_value_boolean (value) || ecma_is_value_number (value) || ecma_is_value_string (value) || ecma_is_value_object (value)", file=0x5555555e31f0 "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c",
function=0x5555555cfa20 <__func__.3658.lto_priv.638> "ecma_check_value_type_is_spec_defined", line=386) at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555aed3e in ecma_check_value_type_is_spec_defined (value=24) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:381
#6 0x000055555559e7ce in ecma_op_to_string (value=24) at jerryscript/jerry-core/ecma/operations/ecma-conversion.c:374
#7 0x0000555555580f62 in ecma_builtin_helper_error_dispatch_call (error_type=ECMA_ERROR_COMMON, arguments_list_p=0x5555558f65fc <jerry_global_heap+572>, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-error.c:52
#8 0x000055555557c10b in ecma_builtin_error_dispatch_call (arguments_list_p=0x5555558f65fc <jerry_global_heap+572>, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-error.c:54
#9 0x00005555555bae91 in ecma_builtin_dispatch_call (obj_p=0x5555558f6b90 <jerry_global_heap+2000>, this_arg_value=72, arguments_list_p=0x5555558f65fc <jerry_global_heap+572>, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:951
#10 0x00005555555a05cf in ecma_op_function_call (func_obj_p=0x5555558f6b90 <jerry_global_heap+2000>, this_arg_value=72, arguments_list_p=0x5555558f65fc <jerry_global_heap+572>, arguments_list_len=1)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:495
#11 0x00005555555a1aaf in ecma_process_promise_reaction_job (obj_p=0x5555558f65f8 <jerry_global_heap+568>) at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:170
#12 0x00005555555a1ecd in ecma_process_all_enqueued_jobs () at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:343
#13 0x00005555555c0c4d in jerry_run_all_enqueued_jobs () at jerryscript/jerry-core/api/jerry.c:573
#14 0x00005555555bf96b in main (argc=3, argv=0x7fffffffe068) at jerryscript/jerry-main/main-unix.c:863
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ecma_is_value_undefined (value) || ecma_is_value_null (value) || ecma_is_value_boolean (value) || ecma_is_value_number (value) || ecma_is_value_string (value) || ecma_is_value_object (value)' failed in ecma_check_value_type_is_spec_defined | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2544/comments | 0 | 2018-09-29T18:22:06Z | 2018-10-03T09:39:44Z | https://github.com/jerryscript-project/jerryscript/issues/2544 | 365,155,228 | 2,544 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 7717d2ee
Build command: ./tools/build.py --clean --debug --error-messages=on --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
print (Promise.race( [ , , , , , , , , , , , , , , , this , , this , , , , , , { } , function() {} ] ).then ( function() { print ( 'The promise should be rejected' ) ;
} , function ( id_0 ) { TypeError.id_1 ( escape, URIError ) ;
} ).then ( -Math.PI ) < +RangeError ) ;
Object.defineProperty ( TypeError , "foo2",
{ get : Math ,
'' : gc ,
enumerable : true ,
configurable : false } ) ;
if ( undefined.toString() != "3.5,2.5,1.5" ) throw "Error: bad result: " + print ( RangeError ) ;
```
###### Backtrace:
```
false
Script Error: TypeError: Expected a function.
ICE: Assertion 'builtin_id < ECMA_BUILTIN_ID__COUNT' failed at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c(ecma_builtin_try_to_instantiate_property):641.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f1b0 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x0000555555589695 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x00005555555896e7 in jerry_assert_fail (assertion=0x5555555e4858 "builtin_id < ECMA_BUILTIN_ID__COUNT",
file=0x5555555e4808 "jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c",
function=0x5555555d0780 <__func__.4997.lto_priv.566> "ecma_builtin_try_to_instantiate_property", line=641)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555ba51e in ecma_builtin_try_to_instantiate_property (object_p=0x5555558f73d8 <jerry_global_heap+4120>,
string_p=0x1fcd) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:641
#6 0x00005555555a58ee in ecma_op_object_find_own (base_value=4123, object_p=0x5555558f73d8 <jerry_global_heap+4120>,
property_name_p=0x1fcd) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:514
#7 0x00005555555a5c6f in ecma_op_object_get (object_p=0x5555558f73d8 <jerry_global_heap+4120>, property_name_p=0x1fcd)
at jerryscript/jerry-core/ecma/operations/ecma-objects.c:683
#8 0x00005555555a1a05 in ecma_process_promise_reaction_job (obj_p=0x5555558f6488 <jerry_global_heap+200>)
at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:154
#9 0x00005555555a1ecd in ecma_process_all_enqueued_jobs ()
at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:343
#10 0x00005555555c0c4d in jerry_run_all_enqueued_jobs () at jerryscript/jerry-core/api/jerry.c:573
#11 0x00005555555bf96b in main (argc=3, argv=0x7fffffffdc58) at jerryscript/jerry-main/main-unix.c:863
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'builtin_id < ECMA_BUILTIN_ID__COUNT' failed in ecma_builtin_try_to_instantiate_property | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2541/comments | 0 | 2018-09-26T09:55:54Z | 2018-10-05T06:08:45Z | https://github.com/jerryscript-project/jerryscript/issues/2541 | 363,946,374 | 2,541 |
[
"jerryscript-project",
"jerryscript"
] | Folks,
I apologize if I'm being obtuse, but I'm stuck:
This morning, I cloned a clean repo and rebuilt a unix version of the repl (using jerry-main/main-unix.c).
The following Javascript:
`var x = new ArrayBuffer(128);`
...produces:
`Script Error: ReferenceError`
...I've also tried to use the API to create my own ArrayBuffer. In the following code, I've created two objects, one a long value (as a control) and one an ArrayBuffer -- the code is the same for both, with the exception of the creation of the actual data object -- and I've inserted the code into the main routine before the repl starts:
```
jerry_value_t new_thing = jerry_create_string((jerry_char_t *)"new_thing");
jerry_value_t new_thing2 = jerry_create_string((jerry_char_t *)"new_thing2");
jerry_value_t new_ab = jerry_create_arraybuffer(10);
jerry_value_t new_num = jerry_create_number(2.0);
jerry_value_t global_object = jerry_get_global_object();
jerry_set_property(global_object, new_thing, new_ab);
jerry_set_property(global_object, new_thing2, new_num);
jerry_release_value(global_object);
```
...and inside the repl:
```
jerry> new_thing
Script Error: ReferenceError
jerry> new_thing2
2
```
...so what am I doing wrong?
Thanks!
Tim
| ArrayBuffer tutorial/help, please... | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2539/comments | 2 | 2018-09-21T15:00:37Z | 2018-09-21T15:34:06Z | https://github.com/jerryscript-project/jerryscript/issues/2539 | 362,654,734 | 2,539 |
[
"jerryscript-project",
"jerryscript"
] | The jerryscript debugger exits when it is executing a program with timer callback function:
```
$ build/x86_64-linux/debug/bin/iotjs -d testcase.js
the 1 times running!
the 2 times running!
the 3 times running!
TCP Error: Resource temporarily unavailable
the 4 times running!
the 5 times running!
the 6 times running!
the 7 times running!
the 8 times running!
the 9 times running!
the 10 times running!
```
```
$ deps/jerry/jerry-debugger/jerry_client.py
Connecting to: localhost:5001
Stopped at /home/rayson/js/iotjs/testcase.js:1
(jerry-debugger) b testcase.js:9
Breakpoint 1 at /home/rayson/js/iotjs/testcase.js:9 (in function() at line:4, col:26)
(jerry-debugger) c
Press enter to stop JavaScript execution.
Stopped at breakpoint:1 /home/rayson/js/iotjs/testcase.js:9 (in function() at line:4, col:26)
(jerry-debugger)
Press enter to stop JavaScript execution.
Stopped at breakpoint:1 /home/rayson/js/iotjs/testcase.js:9 (in function() at line:4, col:26)
(jerry-debugger)
Press enter to stop JavaScript execution.
Traceback (most recent call last):
File "./deps/jerry/jerry-debugger/jerry_client.py", line 261, in <module>
main()
File "./deps/jerry/jerry-debugger/jerry_client.py", line 248, in main
result = debugger.process_messages()
File "/home/rayson/js/iotjs/deps/jerry/jerry-debugger/jerry_client_ws.py", line 725, in process_messages
data = self.get_message(False)
File "/home/rayson/js/iotjs/deps/jerry/jerry-debugger/jerry_client_ws.py", line 692, in get_message
data = self.client_socket.recv(MAX_BUFFER_SIZE)
error: [Errno 104] Connection reset by peer
Connection closed.
```
```
$ cat testcase
var time = require('timers');
var j = 1;
var t = time.setInterval(function(){
if(j>10){
time.clearInterval(t);
}else{
console.log("the " + j + " times running!")
j++;
}
},1000)
```
Note: It sometimes does not fail, but most of the time it does.
| iotjs timer callback causes debugger to exit | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2537/comments | 0 | 2018-09-21T04:19:24Z | 2018-09-24T07:21:36Z | https://github.com/jerryscript-project/jerryscript/issues/2537 | 362,450,404 | 2,537 |
[
"jerryscript-project",
"jerryscript"
] | The test code:
[regexp-simple-atom-and-iterations.js.txt](https://github.com/jerryscript-project/jerryscript/files/2393003/regexp-simple-atom-and-iterations.js.txt)
Compile like this:
python tools/build.py --error-messages=ON --line-info=ON --mem-heap 9 --debug
Then there will be an assertion fail to indicate the pointer to be freed is not pointing to the heap.
I think it's the double free of literal causing such a isuue.
First free at "js-parser.c" line 206,which is called by function "parser_post_processing" at line 1496

After error occurs at line 1726 for "out of memroy" error,the second free will happen at line 2416-->line 2413-->"common.c" line 42

Of course,when the second free happens,the address passed to function "jmem_heap_free_block" is totally wrong as it was changed at "js-parser.c" line 201,which is the reason why the assertion fails.
| The JS engine may free a literal twice if error occurs at function "parser_post_processing" | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2531/comments | 4 | 2018-09-18T01:53:33Z | 2018-10-17T23:17:53Z | https://github.com/jerryscript-project/jerryscript/issues/2531 | 361,105,981 | 2,531 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 2d83d8ed
Build command: ./tools/build.py --clean --debug --error-messages=on --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
for ( /a/ in yield => { } , yield => { } , yield => { } ) throw 1
```
###### Backtrace:
```
ICE: Assertion '((jmem_cpointer_t) uint_ptr) == uint_ptr' failed at jerryscript/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):219.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6e43801 in __GI_abort () at abort.c:79
#2 0x00000000006ce0c5 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x00000000005c40de in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x00000000005c4136 in jerry_assert_fail (assertion=0x71de20 <.str.7> "((jmem_cpointer_t) uint_ptr) == uint_ptr",
file=0x71dbc0 <.str.1> "jerryscript/jerry-core/jmem/jmem-allocator.c", function=0x71dde0 <__func__.jmem_decompress_pointer> "jmem_decompress_pointer", line=219)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00000000005c0abd in jmem_decompress_pointer (compressed_pointer=4325382) at jerryscript/jerry-core/jmem/jmem-allocator.c:219
#6 0x000000000059db93 in ecma_op_function_get_compiled_code (function_p=0x1559098 <jerry_global_heap+248>) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:299
#7 ecma_op_function_list_lazy_property_names (object_p=0x1559098 <jerry_global_heap+248>, separate_enumerable=true, main_collection_p=0x15590b8 <jerry_global_heap+280>,
non_enum_collection_p=0x15590b0 <jerry_global_heap+272>) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1122
#8 0x00000000005b34c2 in ecma_op_object_get_property_names (obj_p=0x1559098 <jerry_global_heap+248>, is_array_indices_only=false, is_enumerable_only=true, is_with_prototype_chain=true)
at jerryscript/jerry-core/ecma/operations/ecma-objects.c:1399
#9 0x00000000006c4df8 in opfunc_for_in (left_value=251, result_obj_p=0x7fffffffaf40) at jerryscript/jerry-core/vm/opcodes.c:259
#10 0x00000000006044f7 in vm_loop (frame_ctx_p=0x7fffffffd500) at jerryscript/jerry-core/vm/vm.c:2385
#11 0x00000000005f42e3 in vm_execute (frame_ctx_p=0x7fffffffd500, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3051
#12 0x00000000005f37d0 in vm_run (bytecode_header_p=0x15592e8 <jerry_global_heap+840>, this_binding_value=27, lex_env_p=0x1558fd0 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3144
#13 0x00000000005f2c2d in vm_run_global (bytecode_p=0x15592e8 <jerry_global_heap+840>) at jerryscript/jerry-core/vm/vm.c:227
#14 0x000000000051c2d3 in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:534
#15 0x000000000051514d in main (argc=3, argv=0x7fffffffe058) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion '((jmem_cpointer_t) uint_ptr) == uint_ptr' failed in jmem_decompress_pointer | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2528/comments | 0 | 2018-09-16T21:08:29Z | 2018-09-17T11:31:19Z | https://github.com/jerryscript-project/jerryscript/issues/2528 | 360,678,783 | 2,528 |
[
"jerryscript-project",
"jerryscript"
] | The Travis CI is green, but there is an error in the logs:
```
/home/travis/build/jerryscript-project/jerryscript/tools/check-magic-strings.sh
Traceback (most recent call last):
File "tools/gen-magic-strings.py", line 289, in <module>
main()
File "tools/gen-magic-strings.py", line 278, in main
uses = extract_magic_string_refs(debug=args.debug)
File "tools/gen-magic-strings.py", line 151, in extract_magic_string_refs
process_file(os.path.join(root, fname))
File "tools/gen-magic-strings.py", line 136, in process_file
guard_stack.pop()
IndexError: pop from empty list
``` | Travis check does not fail when it should do. | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2522/comments | 0 | 2018-09-12T10:20:33Z | 2018-09-14T11:37:52Z | https://github.com/jerryscript-project/jerryscript/issues/2522 | 359,413,094 | 2,522 |
[
"jerryscript-project",
"jerryscript"
] | The engine's code base has lots of macro guards, making it well-configurable. However, these macros grew somewhat organically and got named as `CONFIG_{EN,DIS}ABLE_xxx`, `CONFIG_xxx`, `{EN,DIS}ABLE_xxx`, `JERRY_{EN,DIS}ABLE_xxx`, `JERRY_xxx`, or `modulename_xxx`. Quite a mix. Moreover, right now it is encoded in some of the names of the macros whether they are enabled/disabled by default (but not in all of the names). And boolean configuration macros make their effect based on whether they are defined or not, while the rest carry their meaning via their content.
I propose to consolidate the configuration macros name and value wise, as shown in the table below:
<sub>
| Current macro | Proposed macro | Proposed value |
|-|-|-|
| **ES5.1 features** |
| CONFIG_DISABLE_BUILTINS | JERRY_BUILTINS | {0,*1*} |
| CONFIG_DISABLE_ANNEXB_BUILTIN | JERRY_ANNEXB_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_ARRAY_BUILTIN | JERRY_ARRAY_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_BOOLEAN_BUILTIN | JERRY_BOOLEAN_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_DATE_BUILTIN | JERRY_DATE_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_ERROR_BUILTINS | JERRY_ERROR_BUILTINS | {0,*1*} |
| CONFIG_DISABLE_JSON_BUILTIN | JERRY_JSON_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_MATH_BUILTIN | JERRY_MATH_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_NUMBER_BUILTIN | JERRY_NUMBER_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_REGEXP_BUILTIN | JERRY_REGEXP_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_STRING_BUILTIN | JERRY_STRING_BUILTIN | {0,*1*} |
| **ES2015 features** |
| CONFIG_DISABLE_ES2015 | JERRY_ES2015 | {0,*1*} |
| CONFIG_DISABLE_ES2015_ARROW_FUNCTION | JERRY_ES2015_ARROW_FUNCTION | {0,*1*} |
| CONFIG_DISABLE_ES2015_BUILTIN | JERRY_ES2015_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_ES2015_CLASS | JERRY_ES2015_CLASS | {0,*1*} |
| CONFIG_DISABLE_ES2015_MAP_BUILTIN | JERRY_ES2015_MAP_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER | JERRY_ES2015_OBJECT_INITIALIZER | {0,*1*} |
| CONFIG_DISABLE_ES2015_PROMISE_BUILTIN | JERRY_ES2015_PROMISE_BUILTIN | {0,*1*} |
| CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS | JERRY_ES2015_TEMPLATE_STRINGS | {0,*1*} |
| CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN | JERRY_ES2015_TYPEDARRAY_BUILTIN | {0,*1*} |
| **ES compatibility options** |
| CONFIG_DISABLE_UNICODE_CASE_CONVERSION | JERRY_UNICODE_CASE_CONVERSION | {0,*1*} |
| ENABLE_REGEXP_STRICT_MODE | JERRY_REGEXP_STRICT_MODE | {*0*,1} |
| **Engine features** |
| CONFIG_ECMA_NUMBER_TYPE | JERRY_NUMBER_TYPE | {float32,*float64*,float,double} (was: {1,2}) |
| JERRY_CPOINTER_32_BIT | JERRY_CPOINTER_32_BIT | {*0*,1} |
| JERRY_DEBUGGER | JERRY_DEBUGGER | {*0*,1} |
| JERRY_DISABLE_JS_PARSER | JERRY_PARSER | {0,*1*} |
| JERRY_ENABLE_ERROR_MESSAGES | JERRY_ERROR_MESSAGES | {*0*,1} |
| JERRY_ENABLE_EXTERNAL_CONTEXT | JERRY_EXTERNAL_CONTEXT | {*0*,1} |
| JERRY_ENABLE_LINE_INFO | JERRY_LINE_INFO | {*0*,1} |
| JERRY_ENABLE_LOGGING | JERRY_LOGGING | {*0*,1} |
| JERRY_ENABLE_SNAPSHOT_EXEC | JERRY_SNAPSHOT_EXEC | {*0*,1} |
| JERRY_ENABLE_SNAPSHOT_SAVE | JERRY_SNAPSHOT_SAVE | {*0*,1} |
| JERRY_SYSTEM_ALLOCATOR | JERRY_SYSTEM_ALLOCATOR | {*0*,1} |
| JERRY_VM_EXEC_STOP | JERRY_VM_EXEC_STOP | {*0*,1} |
| **Engine optimizations** |
| CONFIG_ECMA_LCACHE_DISABLE | JERRY_LCACHE | {0,*1*} |
| CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE | JERRY_PROPERTY_HASHMAP | {0,*1*} |
| **Data placement** |
| JERRY_CONST_DATA | JERRY_ATTR_CONST_DATA | anything |
| JERRY_HEAP_SECTION_ATTR | JERRY_ATTR_GLOBAL_HEAP | anything (was: a section name) |
| **Parser configuration** |
| PARSER_MAXIMUM_CODE_SIZE | JERRY_PARSER_MAXIMUM_CODE_SIZE | number |
| PARSER_MAXIMUM_IDENT_LENGTH | JERRY_PARSER_MAXIMUM_IDENT_LENGTH | number |
| PARSER_MAXIMUM_NUMBER_OF_LITERALS | JERRY_PARSER_MAXIMUM_NUMBER_OF_LITERALS | number |
| PARSER_MAXIMUM_NUMBER_OF_REGISTERS | JERRY_PARSER_MAXIMUM_NUMBER_OF_REGISTERS | number |
| PARSER_MAXIMUM_STACK_LIMIT | JERRY_PARSER_MAXIMUM_STACK_LIMIT | number |
| PARSER_MAXIMUM_STRING_LENGTH | JERRY_PARSER_MAXIMUM_STRING_LENGTH | number |
| **Allocator configuration** |
| CONFIG_MEM_HEAP_AREA_SIZE | JERRY_GLOBAL_HEAP_SIZE | number (in KB) |
| **Developer options** |
| JERRY_VALGRIND | JERRY_VALGRIND | {*0*,1} |
| JMEM_GC_BEFORE_EACH_ALLOC | JERRY_MEM_GC_BEFORE_EACH_ALLOC | {*0*,1} |
| JMEM_STATS | JERRY_MEM_STATS | {*0*,1} |
| PARSER_DUMP_BYTE_CODE | JERRY_PARSER_DUMP_BYTE_CODE | {*0*,1} |
| REGEXP_DUMP_BYTE_CODE | JERRY_REGEXP_DUMP_BYTE_CODE | {*0*,1} |
</sub>
Notes:
- Alternatively, the prefix of all configuration macros might be `JERRY_CONFIG_` instead of `JERRY_`.
- There is one 'boolean' config macro that cannot/shouldn't be rewritten to 0/1: `JERRY_NDEBUG`. Traditionally, the semantics of an `NDEBUG` that macro is defined/not-defined everywhere.
- I haven't listed `JERRY_GET_CURRENT_CONTEXT` above as I hope it goes away soon (see #2512).
- I find the value set of the existing `CONFIG_ECMA_NUMBER_TYPE` (1/2) somewhat counterintuitive. Thus, I've proposed to enable string values (float32,float64,float,double). I think that approach could be managed by some preprocessor magic (using `##` concatenation).
Some additionally observed problems:
- Not all of the above configuration options are available via the python build script and/or cmake options (i.e., they have to be passed as compiler arguments).
- Not all of the above configuration options are available as feature enum labels of the engine, so they are not queryable at run-time. (Among others,) this leads to leaking macro usage into users of the engine (e.g., jerry-main, jerry-ext, or jerry-port using jerry-core macros in `#if`s).
- Not all of the above macros are documented at all.
- Configuration macro names and cmake option names are quite unaligned, which adds one more layer to the naming mix.
Foreseen work items:
- Refactoring of the jerry-core code base to rename the macros and guard code blocks based on macro values.
- Follow up in the cmake build system to pass macros with values to the compiler.
- Follow up in the python build tool to pass the right cmake options.
- Follow up in the lit-magic-strings.inc.h generator tool (gen-magic-strings.py).
- Follow up in jerry-main, jerry-port, and jerry-ext, to ensure that 'leaked' macros are used according to the new semantics.
- Follow up in targets to adapt the builds (mostly: with which options cmake is called).
I think such a rework would help code quality, clarity, and maintainability. I'm also volunteering to work on this, but I'd like to get some feedback first so that it's not done in vain. So, please, let me know what you think about this in general, or about any of the details (e.g., preferred config macro names, values, etc.)
PS: I know that we have had quite some discussion about config macros before, even heated ones. I'm not afraid of putting the topic on the table again, believing that it may make the project better. | Consolidate configuration macros | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2520/comments | 5 | 2018-09-11T18:57:27Z | 2019-10-18T11:37:26Z | https://github.com/jerryscript-project/jerryscript/issues/2520 | 359,177,527 | 2,520 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: d270f82e
Build command: ./tools/build.py --clean --debug --error-messages=on --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
print(Promise.race([,,,,,,,,,,,,,,,this,,this,,,,,,{ },function(){}])
.then(function(){$('The promise should be rejected')},function(){$.id_1(escape,URIError)})
.then(-Math.PI/0)<+RangeError);Date.UTC("",0);
new Date( ).getHours(-{ });
$.$("arg1,arg2,arg3","arg1,arg2",$,$);
$.setYear
```
###### Backtrace:
```
false
Script Error: ReferenceError: $ is not defined
ICE: Assertion 'ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_find_named_property):627.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555efae in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x0000555555589c30 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:63
#4 0x0000555555589c82 in jerry_assert_fail (assertion=0x5555555e02e8 "ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p)",
file=0x5555555e1e18 "jerryscript/jerry-core/ecma/base/ecma-helpers.c",
function=0x5555555ceab0 <__func__.4374.lto_priv.126> "ecma_find_named_property", line=627)
at jerryscript/jerry-core/jrt/jrt-fatals.c:87
#5 0x00005555555b0117 in ecma_find_named_property (obj_p=0x5555558f5178 <jerry_global_heap+3528>, name_p=0x75)
at jerryscript/jerry-core/ecma/base/ecma-helpers.c:627
#6 0x00005555555a4abb in ecma_op_object_find_own (base_value=3531, object_p=0x5555558f5178 <jerry_global_heap+3528>,
property_name_p=0x75) at jerryscript/jerry-core/ecma/operations/ecma-objects.c:508
#7 0x00005555555a4e77 in ecma_op_object_get (object_p=0x5555558f5178 <jerry_global_heap+3528>, property_name_p=0x75)
at jerryscript/jerry-core/ecma/operations/ecma-objects.c:683
#8 0x00005555555a19f1 in ecma_process_promise_reaction_job (obj_p=0x5555558f4478 <jerry_global_heap+200>)
at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:154
#9 0x00005555555a1eb9 in ecma_process_all_enqueued_jobs ()
at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:343
#10 0x00005555555bf989 in jerry_run_all_enqueued_jobs () at jerryscript/jerry-core/api/jerry.c:570
#11 0x00005555555be6a0 in main (argc=3, argv=0x7fffffffdbf8) at jerryscript/jerry-main/main-unix.c:863
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p)' failed in ecma_find_named_property | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2506/comments | 1 | 2018-09-03T09:20:33Z | 2018-10-05T06:08:42Z | https://github.com/jerryscript-project/jerryscript/issues/2506 | 356,423,032 | 2,506 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 300e40ba
Build command: tools/build.py --debug --logging=on
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Object.prototype, "", {});
JSON.stringify()
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_true (put_comp_val)' failed at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c(ecma_builtin_json_str_helper):926.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f364 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558ac1f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558ac71 in jerry_assert_fail (assertion=0x5555555e0b58 "ecma_is_value_true (put_comp_val)",
file=0x5555555e0a58 "jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c",
function=0x5555555cdf30 <__func__.4944.lto_priv.569> "ecma_builtin_json_str_helper", line=926)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x00005555555b58a4 in ecma_builtin_json_str_helper (arg1=72, context=...)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:926
#6 0x00005555555b61ed in ecma_builtin_json_stringify (this_arg=291, arg1=72, arg2=72, arg3=72)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.c:1191
#7 0x00005555555b4528 in ecma_builtin_json_dispatch_routine (builtin_routine_id=59, this_arg_value=291,
arguments_list=0x7fffffffd7dc, arguments_number=0)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-json.inc.h:27
#8 0x00005555555b9152 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_JSON, builtin_routine_id=59,
this_arg_value=291, arguments_list_p=0x7fffffffd7dc, arguments_list_len=0)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:916
#9 0x00005555555b92a4 in ecma_builtin_dispatch_call (obj_p=0x5555558f14f0 <jerry_global_heap+320>, this_arg_value=291,
arguments_list_p=0x7fffffffd7dc, arguments_list_len=0)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:941
#10 0x00005555555a04ad in ecma_op_function_call (func_obj_p=0x5555558f14f0 <jerry_global_heap+320>, this_arg_value=291,
arguments_list_p=0x7fffffffd7dc, arguments_list_len=0)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:495
#11 0x0000555555594d6b in opfunc_call (frame_ctx_p=0x7fffffffd820) at jerryscript/jerry-core/vm/vm.c:436
#12 0x0000555555599dd1 in vm_execute (frame_ctx_p=0x7fffffffd820, arg_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3006
#13 0x000055555559a070 in vm_run (bytecode_header_p=0x5555558f15b0 <jerry_global_heap+512>, this_binding_value=27,
lex_env_p=0x5555558f13e0 <jerry_global_heap+48>, parse_opts=0, arg_list_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3090
#14 0x0000555555594996 in vm_run_global (bytecode_p=0x5555558f15b0 <jerry_global_heap+512>)
at jerryscript/jerry-core/vm/vm.c:225
#15 0x00005555555bef1d in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:533
#16 0x00005555555bd821 in main (argc=3, argv=0x7fffffffdc58) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ecma_is_value_true (put_comp_val)' failed in ecma_builtin_json_str_helper | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2494/comments | 0 | 2018-08-28T15:52:35Z | 2018-09-14T10:04:48Z | https://github.com/jerryscript-project/jerryscript/issues/2494 | 354,794,933 | 2,494 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 300e40ba
Build command: tools/build.py --debug --logging=on --profile=es2015-subset
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Object.prototype, 6, {});
Promise.all([0]);
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_integer_number (index_val)' failed at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c(ecma_builtin_promise_all_handler):348.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f364 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558ac1f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558ac71 in jerry_assert_fail (assertion=0x5555555da2b8 "ecma_is_value_integer_number (index_val)",
file=0x5555555da060 "jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c",
function=0x5555555d3e20 <__func__.5164.lto_priv.262> "ecma_builtin_promise_all_handler", line=348)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x0000555555587d41 in ecma_builtin_promise_all_handler (function=867, this=72, argv=0x5555558f18dc <jerry_global_heap+1324>,
argc=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:348
#6 0x00005555555a0776 in ecma_op_function_call (func_obj_p=0x5555558f1710 <jerry_global_heap+864>, this_arg_value=72,
arguments_list_p=0x5555558f18dc <jerry_global_heap+1324>, arguments_list_len=1)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:589
#7 0x00005555555a1955 in ecma_process_promise_reaction_job (obj_p=0x5555558f18d8 <jerry_global_heap+1320>)
at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:170
#8 0x00005555555a1d73 in ecma_process_all_enqueued_jobs ()
at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c:343
#9 0x00005555555befcb in jerry_run_all_enqueued_jobs () at jerryscript/jerry-core/api/jerry.c:570
#10 0x00005555555bdcf1 in main (argc=3, argv=0x7fffffffdc58) at jerryscript/jerry-main/main-unix.c:863
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ecma_is_value_integer_number (index_val)' failed in ecma_builtin_promise_all_handler | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2490/comments | 2 | 2018-08-28T08:13:31Z | 2018-09-24T11:49:42Z | https://github.com/jerryscript-project/jerryscript/issues/2490 | 354,619,096 | 2,490 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 300e40ba
Build command: tools/build.py --debug --logging=on --profile=es2015-subset
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Object.prototype, 0, {'get': function() { throw $ }});
Promise.all();
```
###### Backtrace:
```
ICE: Assertion 'object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE' failed at jerryscript/jerry-core/ecma/base/ecma-gc.c(ecma_deref_object):149.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f364 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558ac1f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558ac71 in jerry_assert_fail (assertion=0x5555555e2618 "object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE",
file=0x5555555e2558 "jerryscript/jerry-core/ecma/base/ecma-gc.c",
function=0x5555555cca10 <__func__.4599.lto_priv.681> "ecma_deref_object", line=149)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x00005555555c31fd in ecma_deref_object (object_p=0x5555558f16d0 <jerry_global_heap+800>)
at jerryscript/jerry-core/ecma/base/ecma-gc.c:149
#6 0x00005555555ae0d0 in ecma_free_value (value=803) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:921
#7 0x00005555555bfcd4 in jerry_release_value (value=803) at jerryscript/jerry-core/api/jerry.c:1193
#8 0x00005555555bdcec in main (argc=3, argv=0x7fffffffdc58) at jerryscript/jerry-main/main-unix.c:861
```
<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/2489/comments | 0 | 2018-08-28T08:10:23Z | 2018-09-17T16:27:01Z | https://github.com/jerryscript-project/jerryscript/issues/2489 | 354,617,987 | 2,489 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 300e40ba
Build command: tools/build.py --debug --logging=on --profile=es2015-subset
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Array.prototype, 0, {set: function() {throw "MyError"}});
Promise.all([0])
```
###### Backtrace:
```
ICE: Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c(ecma_free_string_list):43.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f364 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558ac1f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558ac71 in jerry_assert_fail (assertion=0x5555555e0710 "ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)",
file=0x5555555e06c8 "jerryscript/jerry-core/ecma/base/ecma-literal-storage.c", function=0x5555555cdb50 <__func__.4155.lto_priv.586> "ecma_free_string_list", line=43)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x00005555555b1c0b in ecma_free_string_list (string_list_p=0x5555558f1638 <jerry_global_heap+648>) at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:43
#6 0x00005555555b1c90 in ecma_finalize_lit_storage () at jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:60
#7 0x00005555555b1404 in ecma_finalize () at jerryscript/jerry-core/ecma/base/ecma-init-finalize.c:65
#8 0x00005555555be91c in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:201
#9 0x00005555555bdd34 in main (argc=3, argv=0x7fffffffe078) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)' failed in ecma_free_string_list | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2488/comments | 0 | 2018-08-27T21:29:15Z | 2018-09-06T19:05:38Z | https://github.com/jerryscript-project/jerryscript/issues/2488 | 354,485,547 | 2,488 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 300e40ba
Build command: tools/build.py --debug --logging=on --profile=es2015-subset
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.defineProperty(Array.prototype, 0, {set: function() {var $ = $()}});
Promise.all([0])
```
###### Backtrace:
```
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):152.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff7a24801 in __GI_abort () at abort.c:79
#2 0x000055555555f364 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#3 0x000055555558ac1f in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#4 0x000055555558ac71 in jerry_assert_fail (assertion=0x5555555dae60 "JERRY_CONTEXT (jmem_heap_allocated_size) == 0",
file=0x5555555dade8 "jerryscript/jerry-core/jmem/jmem-heap.c",
function=0x5555555d01a0 <__func__.3827.lto_priv.38> "jmem_heap_finalize", line=152)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#5 0x000055555558a21a in jmem_heap_finalize () at jerryscript/jerry-core/jmem/jmem-heap.c:152
#6 0x00005555555aa0f9 in jmem_finalize () at jerryscript/jerry-core/jmem/jmem-allocator.c:179
#7 0x00005555555be9a8 in jerry_cleanup () at jerryscript/jerry-core/api/jerry.c:216
#8 0x00005555555bdd34 in main (argc=3, argv=0x7fffffffdc38) at jerryscript/jerry-main/main-unix.c:874
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2487/comments | 0 | 2018-08-27T18:52:48Z | 2018-09-06T19:05:37Z | https://github.com/jerryscript-project/jerryscript/issues/2487 | 354,434,393 | 2,487 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 300e40ba
Build command: tools/build.py --debug --logging=on --profile=es2015-subset
```
###### OS:
```
Ubuntu 18.04, x86_64
```
###### Test case:
```javascript
Object.setPrototypeOf(Math, Int32Array);
for (var i = 0; i < 200; i++) {
Promise.race([, [,] % {}]).then();
}
```
The above test case can cause 3 different assertion failures if running multiple times:
###### Failure 1:
```
ICE: Assertion 'ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA || ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_is_property_lcached):1258.
Error: ERR_FAILED_INTERNAL_ASSERTION
```
###### Failure 2:
```
ICE: Assertion 'ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_find_named_property):627.
Error: ERR_FAILED_INTERNAL_ASSERTION
```
###### Failure 3:
```
ICE: Assertion 'ecma_is_value_boolean (handler) || ecma_op_is_callable (handler)' failed at jerryscript/jerry-core/ecma/operations/ecma-jobqueue.c(ecma_process_promise_reaction_job):158.
Error: ERR_FAILED_INTERNAL_ASSERTION
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA || ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR' failed in ecma_is_property_lcached | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2486/comments | 0 | 2018-08-27T14:14:45Z | 2018-10-05T06:08:42Z | https://github.com/jerryscript-project/jerryscript/issues/2486 | 354,337,027 | 2,486 |
[
"jerryscript-project",
"jerryscript"
] | The parser doesn't recognize a right brace after a return to be the end of a block
```js
function fn(x) {
switch (x) {
case 1: { return }
}
}
```
Produces: `Snapshot error: SyntaxError: Primary expression expected. [line: 3, column: 22]`
This issue is reproducible on 4e58ccf68070671e1fff5cd6673f0c1d5b80b166 . | Syntax error when closing block after return statement | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2478/comments | 0 | 2018-08-17T21:34:59Z | 2018-08-21T07:42:01Z | https://github.com/jerryscript-project/jerryscript/issues/2478 | 351,745,736 | 2,478 |
[
"jerryscript-project",
"jerryscript"
] | Version:
4e58ccf68070671e1fff5cd6673f0c1d5b80b166
Build command:
`python3 ./tools/build.py --clean --jerry-libc=off --system-allocator=on --profile=es2015-subset --compile-flag=-m32 --compile-flag=-fsanitize=address --strip=OFF`
Testcase:
`cat testcase | ./jerry`
Where testcase is as following:
```
0
/ð/
```
(`300a 2ff0 2f0a` in hex).
Stack trace:
```
==2342==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf580073b at pc 0x080f1a7a bp 0xffbb2b48 sp 0xffbb2b38
WRITE of size 1 at 0xf580073b thread T0
#0 0x80f1a79 in lit_char_to_utf8_bytes jerry-core/lit/lit-char-helpers.c:377
#1 0x811f6d8 in ecma_new_ecma_string_from_utf8_converted_to_cesu8 jerry-core/ecma/base/ecma-helpers-string.c:376
#2 0x811f6d8 in lexer_construct_regexp_object jerry-core/parser/js/js-lexer.c:2175
#3 0x817e286 in parser_parse_unary_expression jerry-core/parser/js/js-parser-expr.c:1116
#4 0x817e286 in parser_parse_expression jerry-core/parser/js/js-parser-expr.c:1858
#5 0x8193a71 in parser_parse_statements jerry-core/parser/js/js-parser-statm.c:2030
#6 0x80effc7 in parser_parse_source.lto_priv.160 jerry-core/parser/js/js-parser.c:2368
#7 0x804d1ef in parser_parse_script jerry-core/parser/js/js-parser.c:2881
#8 0x804d1ef in ecma_op_eval_chars_bufferjerry-core/ecma/operations/ecma-eval.c:101
#9 0x804d1ef in jerry_eval jerry-core/api/jerry.c:551
#10 0x804d1ef in main jerry-main/main-unix.c:814
#11 0xf702e636 in __libc_start_main (/lib32/libc.so.6+0x18636)
#12 0x804f1eb (build/bin/jerry+0x804f1eb)
``` | Heap buffer overflow in lit_char_to_utf8_bytes | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2476/comments | 0 | 2018-08-16T15:19:04Z | 2018-08-21T04:53:56Z | https://github.com/jerryscript-project/jerryscript/issues/2476 | 351,251,936 | 2,476 |
[
"jerryscript-project",
"jerryscript"
] | Following up on #2446, this issue tracks headers that still cause doxygen warnings and are therefore on the EXCLUDE list of Doxyfile.
- [ ] jerry-core/ecma/base/ecma-globals.h
- [ ] jerry-core/ecma/base/ecma-helpers.h
- [ ] jerry-core/ecma/operations/ecma-exceptions.h
- [ ] jerry-core/include/jerryscript-debugger-transport.h
- [ ] jerry-core/jcontext/jcontext.h
- [ ] jerry-core/parser/js/byte-code.h
- [ ] jerry-core/parser/js/common.h
- [ ] jerry-core/parser/js/js-lexer.h
- [ ] jerry-core/parser/js/js-parser-internal.h
- [ ] jerry-core/parser/regexp/re-parser.h
- [ ] jerry-core/vm/vm-stack.h
| Missing documentation from jerry-core headers | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2469/comments | 0 | 2018-08-13T09:34:14Z | 2018-08-13T09:34:14Z | https://github.com/jerryscript-project/jerryscript/issues/2469 | 349,955,108 | 2,469 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 29e7330b
Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g --jerry-libc=off \
--strip=off --system-allocator=on \
--linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 17.10, x86_64
```
###### Test case:
```javascript
Object.prototype[1] = 0;
Promise.race([]);
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_object (capability) && ecma_is_value_object (array) && ecma_is_value_object (ctor)' failed at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c(ecma_builtin_promise_do_race):199.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
0xf7fd5db9 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fd5db9 in __kernel_vsyscall ()
#1 0xf78057e2 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7806f51 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x56576c2c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x56611827 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x56611868 in jerry_assert_fail (assertion=0x5667c7a0 "ecma_is_value_object (capability) && ecma_is_value_object (array) && ecma_is_value_object (ctor)",
file=0x5667c720 "jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c", function=0x56666660 <__func__.4897.lto_priv.284> "ecma_builtin_promise_do_race", line=199)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x565c6564 in ecma_builtin_promise_do_race (array=4126148691, capability=24, ctor=4126148931) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:197
#7 0x565c78b9 in ecma_builtin_promise_race_or_all (this_arg=4126148931, array=4126148691, is_race=true) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:576
#8 0x565c7953 in ecma_builtin_promise_race (this_arg=4126148931, array=4126148691) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:606
#9 0x565c6019 in ecma_builtin_promise_dispatch_routine (builtin_routine_id=60, this_arg_value=4126148931, arguments_list=0xffffcd5c, arguments_number=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.inc.h:42
#10 0x56630a10 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_PROMISE, builtin_routine_id=60, this_arg_value=4126148931, arguments_list_p=0xffffcd5c, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:906
#11 0x56630c1e in ecma_builtin_dispatch_call (obj_p=0xf5f008e0, this_arg_value=4126148931, arguments_list_p=0xffffcd5c, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:931
#12 0x565ff595 in ecma_op_function_call (func_obj_p=0xf5f008e0, this_arg_value=4126148931, arguments_list_p=0xffffcd5c, arguments_list_len=1)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:495
#13 0x565e4f12 in opfunc_call (frame_ctx_p=0xffffcdd0) at jerryscript/jerry-core/vm/vm.c:436
#14 0x565f193a in vm_execute (frame_ctx_p=0xffffcdd0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3006
#15 0x565f218b in vm_run (bytecode_header_p=0xf5300f50, 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:3090
#16 0x565e4457 in vm_run_global (bytecode_p=0xf5300f50) at jerryscript/jerry-core/vm/vm.c:225
#17 0x5663cd1f in jerry_run (func_val=4126149123) at jerryscript/jerry-core/api/jerry.c:533
#18 0x566397fe in main (argc=3, argv=0xffffd1f4) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ecma_is_value_object (capability) && ecma_is_value_object (array) && ecma_is_value_object (ctor)' failed in ecma_builtin_promise_do_race | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2468/comments | 0 | 2018-08-12T23:05:30Z | 2018-08-31T14:45:33Z | https://github.com/jerryscript-project/jerryscript/issues/2468 | 349,851,604 | 2,468 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 29e7330b
Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g --jerry-libc=off \
--strip=off --system-allocator=on \
--linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 17.10, x86_64
```
###### Test case:
```javascript
Object.prototype [ 1 ] = 0;
Promise.all( )
```
###### Backtrace:
```
ICE: Assertion 'ecma_is_value_object (value)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_get_object_from_value):659.
Error: ERR_FAILED_INTERNAL_ASSERTION
bt
#0 0xf7fd5db9 in __kernel_vsyscall ()
#1 0xf7ca27e2 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7ca3f51 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x0835105e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x0822b25b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x0822b2d1 in jerry_assert_fail (assertion=0x838e000 <.str.10> "ecma_is_value_object (value)", file=0x838da80 <.str.1> "jerryscript/jerry-core/ecma/base/ecma-helpers-value.c", function=0x838e040 <__func__.ecma_get_object_from_value> "ecma_get_object_from_value", line=659) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x081ba692 in ecma_get_object_from_value (value=24) at jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:659
#7 0x082c10d7 in ecma_builtin_promise_reject_abrupt (capability=24) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:130
#8 0x082c0d43 in ecma_builtin_promise_race_or_all (this_arg=4128246035, array=16, is_race=false) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:567
#9 0x082c010a in ecma_builtin_promise_all (this_arg=4128246035, array=16) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c:622
#10 0x082bff07 in ecma_builtin_promise_dispatch_routine (builtin_routine_id=61, this_arg_value=4128246035, arguments_list=0xffffc7cc, arguments_number=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-promise.inc.h:43
#11 0x081eb9cf in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_PROMISE, builtin_routine_id=61, this_arg_value=4128246035, arguments_list_p=0xffffc7cc, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:906
#12 0x081eb69a in ecma_builtin_dispatch_call (obj_p=0xf61008e0, this_arg_value=4128246035, arguments_list_p=0xffffc7cc, arguments_list_len=1) at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:931
#13 0x08204982 in ecma_op_function_call (func_obj_p=0xf61008e0, this_arg_value=4128246035, arguments_list_p=0xffffc7cc, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:495
#14 0x08278684 in opfunc_call (frame_ctx_p=0xffffc810) at jerryscript/jerry-core/vm/vm.c:436
#15 0x0825f197 in vm_execute (frame_ctx_p=0xffffc810, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3006
#16 0x0825e49f in vm_run (bytecode_header_p=0xf5303ec0, this_binding_value=4128246611, lex_env_p=0xf5f007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3090
#17 0x0825d860 in vm_run_global (bytecode_p=0xf5303ec0) at jerryscript/jerry-core/vm/vm.c:225
#18 0x08177181 in jerry_run (func_val=4128246275) at jerryscript/jerry-core/api/jerry.c:533
#19 0x0816ee56 in main (argc=3, argv=0xffffd134) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'ecma_is_value_object (value)' failed in ecma_get_object_from_value | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2465/comments | 0 | 2018-08-11T13:42:08Z | 2018-08-31T14:45:33Z | https://github.com/jerryscript-project/jerryscript/issues/2465 | 349,734,982 | 2,465 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 1ac2903d
Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer
--compile-flag=-fno-common --compile-flag=-g --logging=on
--strip=off --system-allocator=on
--linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset
```
###### OS:
```
Ubuntu 17.10, x86_64
```
###### Test case:
```javascript
var src = "";
for ( var i = 0 ; i < 4000 ; i ++ )
src += 4 + i + ": a += a += a; break; " ;
src += "\\
\
" ;
print ( src ) ;
```
[Download test case.](https://github.com/jerryscript-project/jerryscript/files/2269627/test.txt)
###### Backtrace:
```
ICE: Assertion '(c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER' failed at jerryscript/jerry-core/lit/lit-strings.c(lit_read_code_unit_from_utf8):422.
Error: ERR_FAILED_INTERNAL_ASSERTION
bt
#0 0xf7fd5db9 in __kernel_vsyscall ()
#1 0xf7ca27e2 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7ca3f51 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x0835105e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x0822b25b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x0822b2d1 in jerry_assert_fail (assertion=0x83aa300 <.str.7> "(c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER", file=0x83a9fc0 <.str.1> "jerryscript/jerry-core/lit/lit-strings.c", function=0x83aa2c0 <__func__.lit_read_code_unit_from_utf8> "lit_read_code_unit_from_utf8", line=422) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x082334fa in lit_read_code_unit_from_utf8 (buf_p=0xd51a8809 "\222\001", code_point=0xffffb710) at jerryscript/jerry-core/lit/lit-strings.c:422
#7 0x082337cb in lit_get_utf8_length_of_cesu8_string (cesu8_buf_p=0xd51a8808 "\031\222\001", cesu8_buf_size=102941) at jerryscript/jerry-core/lit/lit-strings.c:330
#8 0x081b2beb in ecma_string_get_utf8_length (string_p=0xd51a8800) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2056
#9 0x081b16fa in ecma_substring_copy_to_utf8_buffer (string_desc_p=0xd51a8800, start_pos=0, end_pos=256, buffer_p=0xffffbbb0 "\020", buffer_size=256) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1234
#10 0x0817cc97 in jerry_substring_to_utf8_char_buffer (value=3575285761, start_pos=0, end_pos=256, buffer_p=0xffffbbb0 "\020", buffer_size=256) at jerryscript/jerry-core/api/jerry.c:1731
#11 0x0835036a in jerryx_handler_print (func_obj_val=4128246371, this_p=72, args_p=0xffffc3e4, args_cnt=1) at jerryscript/jerry-ext/handler/handler-print.c:68
#12 0x082051b7 in ecma_op_function_call (func_obj_p=0xf6100a60, this_arg_value=72, arguments_list_p=0xffffc3e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:589
#13 0x08278684 in opfunc_call (frame_ctx_p=0xffffc430) at jerryscript/jerry-core/vm/vm.c:436
#14 0x0825f197 in vm_execute (frame_ctx_p=0xffffc430, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3006
#15 0x0825e49f in vm_run (bytecode_header_p=0xf5301ad0, this_binding_value=4128246611, lex_env_p=0xf5f007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3090
#16 0x0825d860 in vm_run_global (bytecode_p=0xf5301ad0) at jerryscript/jerry-core/vm/vm.c:225
#17 0x08177181 in jerry_run (func_val=4128246227) at jerryscript/jerry-core/api/jerry.c:533
#18 0x0816ee56 in main (argc=3, argv=0xffffcd54) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion '(c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER' failed in lit_read_code_unit_from_utf8 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2453/comments | 0 | 2018-08-08T09:07:02Z | 2018-09-04T08:47:29Z | https://github.com/jerryscript-project/jerryscript/issues/2453 | 348,638,400 | 2,453 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 1ac2903d
Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer
--compile-flag=-fno-common --compile-flag=-g --logging=on
--strip=off --system-allocator=on
--linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset
```
###### OS:
```
Ubuntu 17.10, x86_64
```
###### Test case:
```javascript
var src = "";
for ( var i = 0 ; i < 4000 ; i ++ )
src += "\udc00%f0%90%80%80\udc00";
src += "} }" ;
print ( src ) ;
```
Note: this might be related to #2451 due to the similarity between the test cases.
###### Backtrace:
```
ICE: Assertion 'offset == cesu8_buf_size' failed at jerryscript/jerry-core/lit/lit-strings.c(lit_get_utf8_length_of_cesu8_string):340.
Error: ERR_FAILED_INTERNAL_ASSERTION
bt
#0 0xf7fd5db9 in __kernel_vsyscall ()
#1 0xf7ca27e2 in raise () from /lib/i386-linux-gnu/libc.so.6
#2 0xf7ca3f51 in abort () from /lib/i386-linux-gnu/libc.so.6
#3 0x0835105e in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x0822b25b in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x0822b2d1 in jerry_assert_fail (assertion=0x83aa060 <.str.2> "offset == cesu8_buf_size", file=0x83a9fc0 <.str.1> "jerryscript/jerry-core/lit/lit-strings.c", function=0x83aa100 <__func__.lit_get_utf8_length_of_cesu8_string> "lit_get_utf8_length_of_cesu8_string", line=340) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x0823399c in lit_get_utf8_length_of_cesu8_string (cesu8_buf_p=0xdd9dc808 "\344", <incomplete sequence \332>, cesu8_buf_size=72036) at jerryscript/jerry-core/lit/lit-strings.c:340
#7 0x081b2beb in ecma_string_get_utf8_length (string_p=0xdd9dc800) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:2056
#8 0x081b16fa in ecma_substring_copy_to_utf8_buffer (string_desc_p=0xdd9dc800, start_pos=0, end_pos=256, buffer_p=0xffffbbb0 "\020", buffer_size=256) at jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1234
#9 0x0817cc97 in jerry_substring_to_utf8_char_buffer (value=3718105089, start_pos=0, end_pos=256, buffer_p=0xffffbbb0 "\020", buffer_size=256) at jerryscript/jerry-core/api/jerry.c:1731
#10 0x0835036a in jerryx_handler_print (func_obj_val=4128246371, this_p=72, args_p=0xffffc3e4, args_cnt=1) at jerryscript/jerry-ext/handler/handler-print.c:68
#11 0x082051b7 in ecma_op_function_call (func_obj_p=0xf6100a60, this_arg_value=72, arguments_list_p=0xffffc3e4, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:589
#12 0x08278684 in opfunc_call (frame_ctx_p=0xffffc430) at jerryscript/jerry-core/vm/vm.c:436
#13 0x0825f197 in vm_execute (frame_ctx_p=0xffffc430, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3006
#14 0x0825e49f in vm_run (bytecode_header_p=0xf5301ad0, this_binding_value=4128246611, lex_env_p=0xf5f007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3090
#15 0x0825d860 in vm_run_global (bytecode_p=0xf5301ad0) at jerryscript/jerry-core/vm/vm.c:225
#16 0x08177181 in jerry_run (func_val=4128246179) at jerryscript/jerry-core/api/jerry.c:533
#17 0x0816ee56 in main (argc=3, argv=0xffffcd54) at jerryscript/jerry-main/main-unix.c:676
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup> | Assertion 'offset == cesu8_buf_size' failed in lit_get_utf8_length_of_cesu8_string | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2452/comments | 0 | 2018-08-08T08:53:47Z | 2018-09-04T08:47:29Z | https://github.com/jerryscript-project/jerryscript/issues/2452 | 348,633,856 | 2,452 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 1ac2903d
Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g \
--strip=off --system-allocator=on \
--linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset --logging=on
```
###### OS:
```
Ubuntu 17.10, x86_64
```
###### Test case:
```javascript
var src = "var a = 0; while(a) { switch(a) {" ;
for ( var i = 0 ; i < 4000 ; i ++ )
src += "-Infinity" + i + "\u00a0\u00a01.2e3" ;
src += "\udc00%f0%90%80%80\udc00" ;
print ( src ) ;
```
###### Backtrace:
```
=================================================================
==18380==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xd9845ba9 at pc 0x5669f5c3 bp 0xfffc6248 sp 0xfffc6238
READ of size 1 at 0xd9845ba9 thread T0
#0 0x5669f5c2 in lit_read_code_unit_from_utf8 jerryscript/jerry-core/lit/lit-strings.c:406
#1 0x56726b4a in ecma_substring_copy_to_utf8_buffer jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:1292
#2 0x56710bf3 in jerry_substring_to_utf8_char_buffer jerryscript/jerry-core/api/jerry.c:1731
#3 0x5664746f in jerryx_handler_print jerryscript/jerry-ext/handler/handler-print.c:68
#4 0x566d0eea in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:589
#5 0x566b64a8 in opfunc_call jerryscript/jerry-core/vm/vm.c:436
#6 0x566c2ed0 in vm_execute jerryscript/jerry-core/vm/vm.c:3006
#7 0x566c3721 in vm_run jerryscript/jerry-core/vm/vm.c:3090
#8 0x566b59ed in vm_run_global jerryscript/jerry-core/vm/vm.c:225
#9 0x5670e2ca in jerry_run jerryscript/jerry-core/api/jerry.c:533
#10 0x5670ada1 in main jerryscript/jerry-main/main-unix.c:676
#11 0xf7739985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
#12 0x566394b0 (jerryscript/build/bin/jerry+0x134b0)
0xd9845ba9 is located 0 bytes to the right of 86953-byte region [0xd9830800,0xd9845ba9)
allocated by thread T0 here:
#0 0xf79f8bc4 in malloc (/usr/lib32/libasan.so.4+0xe4bc4)
#1 0x566e25f7 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:295
#2 0x566e26c4 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:329
#3 0x566e2799 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:375
#4 0x566c38cb in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:170
#5 0x56723e92 in ecma_append_chars_to_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:689
#6 0x56724913 in ecma_concat_ecma_strings jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:829
#7 0x56642467 in opfunc_addition jerryscript/jerry-core/vm/opcodes-ecma-arithmetics.c:154
#8 0x566bd157 in vm_loop jerryscript/jerry-core/vm/vm.c:1779
#9 0x566c2e6f in vm_execute jerryscript/jerry-core/vm/vm.c:2997
#10 0x566c3721 in vm_run jerryscript/jerry-core/vm/vm.c:3090
#11 0x566b59ed in vm_run_global jerryscript/jerry-core/vm/vm.c:225
#12 0x5670e2ca in jerry_run jerryscript/jerry-core/api/jerry.c:533
#13 0x5670ada1 in main jerryscript/jerry-main/main-unix.c:676
#14 0xf7739985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
SUMMARY: AddressSanitizer: heap-buffer-overflow jerryscript/jerry-core/lit/lit-strings.c:406 in lit_read_code_unit_from_utf8
Shadow bytes around the buggy address:
0x3b308b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x3b308b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x3b308b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x3b308b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x3b308b60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x3b308b70: 00 00 00 00 00[01]fa fa fa fa fa fa fa fa fa fa
0x3b308b80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3b308b90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3b308ba0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3b308bb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3b308bc0: 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
==18380==ABORTING
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup> | heap-buffer-overflow in lit_read_code_unit_from_utf8 | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2451/comments | 0 | 2018-08-08T08:41:24Z | 2018-09-04T08:47:29Z | https://github.com/jerryscript-project/jerryscript/issues/2451 | 348,629,557 | 2,451 |
[
"jerryscript-project",
"jerryscript"
] | Jerry Version:
c93bea32c43f507d88ac354ea411c714203ebb5a
Build command:
python tools/build.py --profile=es2015-subset --jerry-libc=OFF --clean --strip OFF --compile-flag="-g" --compile-flag="-fsanitize=address"
OS:
Ubuntu 16.04
Compiler:
GCC 7.1
Test case:
```
var x = new RegExp('(/*()+?b+?b+?|.|)+')
x.exec('?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????')
```
Result:
```
ASAN:DEADLYSIGNAL
=================================================================
==11344==ERROR: AddressSanitizer: stack-overflow on address 0x7ffdfa89c8e8 (pc 0x7fb60dc1db39 bp 0x7ffdfa89d140 sp 0x7ffdfa89c8c0 T0)
#0 0x7fb60dc1db38 in QuickCheckForUnpoisonedRegion ../../../../libsanitizer/asan/asan_interceptors.cc:39
#1 0x7fb60dc1db38 in __interceptor_memcpy ../../../../libsanitizer/asan/asan_interceptors.cc:456
#2 0x451df4 in re_get_char /jerryscript/jerry-core/parser/regexp/re-bytecode.c:130
#3 0x451df4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:389
#4 0x4541a8 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1070
#5 0x45383c in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:908
#6 0x453d13 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:977
#7 0x4533f6 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:830
#8 0x45450f in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1123
#9 0x453d13 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:977
#10 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#11 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#12 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#13 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#14 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#15 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#16 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#17 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#18 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#19 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#20 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#21 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#22 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#23 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#24 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#25 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#26 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#27 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#28 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#29 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#30 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#31 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#32 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#33 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#34 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#35 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#36 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#37 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#38 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#39 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#40 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#41 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#42 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#43 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#44 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#45 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#46 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#47 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#48 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#49 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#50 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#51 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#52 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#53 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#54 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#55 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#56 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#57 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#58 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#59 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#60 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#61 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#62 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#63 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#64 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#65 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#66 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#67 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#68 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#69 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#70 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#71 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#72 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#73 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#74 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#75 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#76 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#77 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#78 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#79 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#80 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#81 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#82 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#83 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#84 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#85 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#86 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#87 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#88 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#89 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#90 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#91 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#92 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#93 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#94 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#95 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#96 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#97 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#98 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#99 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#100 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#101 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#102 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#103 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#104 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#105 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#106 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#107 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#108 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#109 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#110 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#111 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#112 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#113 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#114 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#115 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#116 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#117 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#118 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#119 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#120 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#121 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#122 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#123 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#124 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#125 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#126 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#127 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#128 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#129 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#130 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#131 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#132 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#133 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#134 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#135 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#136 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#137 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#138 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#139 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#140 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#141 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#142 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#143 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#144 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#145 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#146 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#147 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#148 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#149 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#150 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#151 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#152 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#153 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#154 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#155 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#156 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#157 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#158 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#159 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#160 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#161 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#162 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#163 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#164 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#165 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#166 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#167 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#168 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#169 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#170 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#171 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#172 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#173 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#174 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#175 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#176 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#177 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#178 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#179 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#180 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#181 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#182 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#183 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#184 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#185 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#186 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#187 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#188 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#189 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#190 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#191 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#192 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#193 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#194 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#195 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#196 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#197 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#198 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#199 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#200 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#201 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#202 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#203 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#204 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#205 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#206 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#207 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#208 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#209 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#210 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#211 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#212 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#213 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#214 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#215 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#216 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#217 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#218 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#219 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#220 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#221 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#222 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#223 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#224 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#225 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#226 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#227 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#228 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#229 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#230 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#231 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#232 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#233 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#234 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#235 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#236 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#237 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#238 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#239 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#240 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#241 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#242 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#243 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#244 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#245 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#246 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#247 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#248 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#249 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#250 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#251 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
#252 0x453eb4 in re_match_regexp /jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:1001
SUMMARY: AddressSanitizer: stack-overflow ../../../../libsanitizer/asan/asan_interceptors.cc:39 in QuickCheckForUnpoisonedRegion
==11344==ABORTING
```
Immediate cause:
Recursion in ecma-regexp-object.c is not properly used. Depth of the recursion is controlled only by the structure of a regular expression, which may result in JerryScript running out of stack space.
This might lead to DoS attack if an attacker is able to construct arbitrary regular expressions.
This seems to be a difficult bug to fix. Possible solutions could include checking stack limits, breaking recursion which is deeper than predefined value or refactoring the code to not use recursion.
Please note, that because this crash is a result of the program running out of stack memory, this exact input may not produce the same result across different systems. To easier reproduce this issue one may want to limit stack size (using for example `ulimit`).
This issue looks similar to https://github.com/jerryscript-project/jerryscript/issues/2190, but the problem occurs in a different code line, confirming that the design of the function in question is not properly implemented. | Uncontrolled recursion in re_match_regexp | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2448/comments | 0 | 2018-08-07T08:00:14Z | 2019-01-17T19:16:50Z | https://github.com/jerryscript-project/jerryscript/issues/2448 | 348,209,807 | 2,448 |
[
"jerryscript-project",
"jerryscript"
] | - Jerry Version:
f86d745
- Build command:
`python tools/build.py --profile=es2015-subset --jerry-libc=OFF --clean --strip OFF --compile-flag="-g" --compile-flag="-fsanitize=address"`
- OS:
Ubuntu 16.04
- Test case:
`(new Int8Array(0)).filter(parseInt)`
- Result:
```ASAN:SIGSEGV
=================================================================
==7815==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x000000402bc1 bp 0x000000000193 sp 0x7fff3cb1ba80 T0)
#0 0x402bc0 in jmem_heap_free_block jerry-core/jmem/jmem-heap.c:463
#1 0x422215 (build/bin/jerry+0x422215)
#2 0x428231 in ecma_builtin_dispatch_routine jerry-core/ecma/builtin-objects/ecma-builtins.c:906
#3 0x428231 in ecma_builtin_dispatch_call jerry-core/ecma/builtin-objects/ecma-builtins.c:931
#4 0x428231 in ecma_op_function_call jerry-core/ecma/operations/ecma-function-object.c:495
#5 0x4613f5 in opfunc_call jerry-core/vm/vm.c:436
#6 0x4613f5 in vm_execute jerry-core/vm/vm.c:3008
#7 0x461fda in vm_run jerry-core/vm/vm.c:3092
#8 0x424411 in vm_run_eval jerry-core/vm/vm.c:270
#9 0x424411 in ecma_op_eval_chars_buffer jerry-core/ecma/operations/ecma-eval.c:111
#10 0x40274f in jerry_eval jerry-core/api/jerry.c:570
#11 0x40274f in main jerry-main/main-unix.c:810
#12 0x7f749b68f82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#13 0x403148 in _start (build/bin/jerry+0x403148)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV jerry-core/jmem/jmem-heap.c:463 jmem_heap_free_block
==7815==ABORTING
```
- Immediate cause:
It seems that this bug is caused by triggering undefined behavior at jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c:598. The second passed argument is NULL. This causes NULL dereference and allows GCC to optimize out subsequent checks for NULL. This further causes writing to null pointer, which results in a segmentation fault. Note, that because this bug occurs due to gcc optimizing out a check for NULL, this may not be reproducible with a debug build.
Please confirm if you can reproduce this issue.
This bug was discovered by Marcin Dominiak and Wojciech Rauner. | Null pointer dereference in jmem-heap | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2435/comments | 0 | 2018-07-24T09:16:56Z | 2018-08-01T14:09:31Z | https://github.com/jerryscript-project/jerryscript/issues/2435 | 343,952,194 | 2,435 |
[
"jerryscript-project",
"jerryscript"
] | I'd like to know your thoughts about an isolated execution model in jerryscript for asynchronous multithreading. What are needed to support the following features of platforms based on jerryscript?
- Isolated instances of jerryscript engine.
- Communication with each threaded-instance (e.g message passing or something like SharedArrayBuffer)
- Globally shared objects protected from concurrent access. | multithreaded jerryscript | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2433/comments | 5 | 2018-07-23T06:12:22Z | 2019-10-25T19:22:12Z | https://github.com/jerryscript-project/jerryscript/issues/2433 | 343,500,099 | 2,433 |
[
"jerryscript-project",
"jerryscript"
] | In mbed OS, PinName enum is defined in PinNames.h file for each target.
Considering a case where a target (e.g TARGET_HI2110) marks the last entry of the enum as NUM_MAX, the generate_pins.py reports error: IndexError: list index out of range. | mbed-os: generate_pins.py fails if last value of PinName enum is not defined | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2418/comments | 4 | 2018-07-05T13:02:36Z | 2019-07-01T10:24:27Z | https://github.com/jerryscript-project/jerryscript/issues/2418 | 338,565,356 | 2,418 |
[
"jerryscript-project",
"jerryscript"
] | Can i build jerryscript without any OS for a target e.g. stm32f4? I cant seem to find any clear instructions for building it for a baremetal MCU. Also in the targets folder, stm32f4 is with either Nuttx or Riot but no baremetal. Can someone confirm this? | jerryscript baremetal | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2417/comments | 4 | 2018-07-04T05:39:30Z | 2018-07-04T09:37:50Z | https://github.com/jerryscript-project/jerryscript/issues/2417 | 338,136,310 | 2,417 |
[
"jerryscript-project",
"jerryscript"
] | Hi,
I'm doing my open source project using JerryScript over one and a half year. Sometimes I need to upgrade JerryScript from the git code base.
But, I'm worry about integrating just most recent commits, not official release. There is no official release since Sep. 2016 (v1.0). And, it is also hard to identify what are actually changed because there is no "Release Notes".
So I would like to suggest more frequent releases (about monthly - recommend agile development process like [scrum](https://en.wikipedia.org/wiki/Scrum_(software_development))) with fine-grained versions like "1.0.3", "1.1.0", "1.2.0", "1.3.0" and so forth ([semver](https://semver.org/) would be great).
This would be very helpful for the many JerryScript fans :)
Thanks, | Release and version management | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2413/comments | 6 | 2018-06-29T06:25:15Z | 2019-09-13T08:54:29Z | https://github.com/jerryscript-project/jerryscript/issues/2413 | 336,877,970 | 2,413 |
[
"jerryscript-project",
"jerryscript"
] | Hi,
I'd like to turn off print message log level trace, however it looks like always be printed on console because the macro JERRY_TRACE_MSG always are to be replaced jerry_port_log method when compiling.
e.g.) ecma-regexp-object.c
On the other hand, I could turn off log level error one by defining JERRY_NDEBUG macro.
Is there anything good way to turn off lower leve log to be printed ? | How to disable TRACE_MSG ? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2412/comments | 4 | 2018-06-28T13:06:15Z | 2018-07-03T07:18:23Z | https://github.com/jerryscript-project/jerryscript/issues/2412 | 336,613,319 | 2,412 |
[
"jerryscript-project",
"jerryscript"
] | Could JerryScript support const keyword?
for example,
```javascript
const ctx = wx.createCanvasContext('myCanvas')
// Create linear gradient
const grd = ctx.createLinearGradient(0, 0, 200, 0)
grd.addColorStop(0, 'red')
grd.addColorStop(1, 'white')
// Fill with gradient
ctx.setFillStyle(grd)
ctx.fillRect(10, 10, 150, 80)
ctx.draw()
``` | const keyword in JavaScript | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2402/comments | 7 | 2018-06-19T02:35:53Z | 2018-06-20T13:57:55Z | https://github.com/jerryscript-project/jerryscript/issues/2402 | 333,498,841 | 2,402 |
[
"jerryscript-project",
"jerryscript"
] | This issue is an continuation of #2365.
I have cooked up a simple test case to test registering external function names to prevent cache misses:
```
1 #include <stdio.h>
2 #include <string.h>
3 #include "jerryscript.h"
4 #include "jerryscript-ext/handler.h"
5
6 static jerry_value_t
7 add_handler (const jerry_value_t func_value, /**< function object */
8 const jerry_value_t this_val, /**< this arg */
9 const jerry_value_t *args_p, /**< function arguments */
10 const jerry_length_t args_cnt) /**< number of function arguments */
11 {
12 printf("in ext func\n");
13 return jerry_create_undefined ();
14 } /* add_handler */
15
16 int
17 main (void)
18 {
19 /* Initialize engine */
20 jerry_init (JERRY_INIT_EMPTY);
21
22 /* Create a JS object */
23 const jerry_char_t my_js_object[] = " \
24 MyObject = \
25 { x : 12, \
26 y : 'Value of x is ', \
27 foo: function () \
28 { \
29 this.add2x(); \
30 print('test'); \
31 return this.y + this.x; \
32 } \
33 } \
34 ";
35
36 /* generate snapshot */
37 int32_t global_mode_snapshot_buffer[1000];
38 const jerry_char_t *code_to_snapshot_p = my_js_object;
39 jerry_value_t generate_result = jerry_generate_snapshot (NULL, 0, code_to_snapshot_p, strlen ((const char *) code_to_snapshot_p), 0, global_mode_snapshot_buffer, 1000);
40 size_t global_mode_snapshot_size = (size_t) jerry_get_number_value (generate_result);
41 jerry_release_value (generate_result);
42
43 /* register magic strings */
44 static const jerry_char_ptr_t magic_strings[] = {(const jerry_char_ptr_t) "print"/*, (const jerry_char_ptr_t) "add2x"*/};
45 uint32_t num_magic_strings = (uint32_t) (sizeof (magic_strings) / sizeof (jerry_char_ptr_t));
46 static const jerry_length_t magic_string_lengths[] = {5/*, 5*/};
47 jerry_register_magic_strings (magic_strings, num_magic_strings, magic_string_lengths);
48 jerryx_handler_register_global ((const jerry_char_t *) "print", jerryx_handler_print);
49
50 /* exec snapshot */
51 jerry_value_t my_js_obj_val = jerry_exec_snapshot (global_mode_snapshot_buffer, 1000, 0, 0);
52
53 /* Add native functions */
54 jerry_value_t add_func_obj = jerry_create_external_function (add_handler);
55 jerry_value_t prop_name = jerry_create_string ((const jerry_char_ptr_t) "add2x");
56 jerry_set_property (my_js_obj_val, prop_name, add_func_obj);
57 jerry_release_value (add_func_obj);
58 jerry_release_value (prop_name);
59
60 /* Free JavaScript value, returned by eval (my_js_object) */
61 jerry_release_value (my_js_obj_val);
62
63 const jerry_char_t script[] = "var i; for(i=0;i<1000;i++){MyObject.foo();}"; //<TEST SCRIPT>
64 size_t script_size = strlen ((const char *) script);
65
66 /* Evaluate script */
67 jerry_value_t eval_ret = jerry_eval (script, script_size, false);
68
69 /* Free JavaScript value, returned by eval */
70 jerry_release_value (eval_ret);
71
72 /* Cleanup engine */
73 jerry_cleanup ();
74
75 return 0;
76 }
```
* Above test case will call `MyObject.foo()` which will call 2 different external functions(`add2x` and `print`).
* If only `print` is registered as magic string(as shown on line 44 and 46) then it will stop triggering cache misses as expected.
* If line 44 and 46 are uncommented meaning registering `print` and `add2x` both as magic strings. Then `print` will start triggerring cache misses again and `add2x` will no longer trigger cache misses.
**ps. the test code is [here](https://pastebin.com/VAbEBLDV).** | strings in jerry_register_magic_strings conflict with each other | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2399/comments | 2 | 2018-06-15T15:41:34Z | 2018-06-15T17:46:56Z | https://github.com/jerryscript-project/jerryscript/issues/2399 | 332,823,738 | 2,399 |
[
"jerryscript-project",
"jerryscript"
] | Hello,
I'm trying to get Jerryscript running on an ARM device but I'm running into a linker problem I can't seem to figure it out. I've added a toolchain file named toolchain_gba_arm7tdmi and it looks like:
```cmake
set(DEVKITARM $ENV{DEVKITARM})
set(DEVKITPRO $ENV{DEVKITPRO})
if(DEVKITPRO)
message(FATAL_ERROR "DEVKITPRO environment variable not set")
endif()
if(NOT DEVKITARM)
message(FATAL_ERROR "DEVKITARM environment variable not set")
endif()
set(CMAKE_SYSTEM_NAME GBA)
set(CMAKE_SYSTEM_PROCESSOR arm7)
set(FLAGS_COMMON_ARCH -mthumb -mtune=arm7tdmi -mcpu=arm7tdmi -fomit-frame-pointer -Wno-packed-bitfield-compat -ffast-math)
set(CMAKE_C_COMPILER ${DEVKITARM}/bin/arm-none-eabi-gcc)
set(CMAKE_C_COMPILER_WORKS TRUE)
```
As you can see, it uses the `arm-none-eabi-gcc` compiler. When I build Jerryscript I get no compilation errors, but I've noticed during the linking steps I get these messages:
```
[ 85%] Linking C static library ../lib/libjerry-core.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../lib/libjerry-core.a the table of contents is empty (no object file members in the library define global symbols)
[ 85%] Built target jerry-core
```
I'm only taking a guess here, but I think it's not using the ARM linker and instead using Xcode. Before this message however, during the start of the build process, I get a cmake warning:
```
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
```
I'm assuming this is why I get undefined reference when I link Jerryscript with my main project. This is how I build Jerryscript:
```
python $(CURDIR)/jerryscript/tools/build.py --profile=es2015-subset --jerry-libc=off \
--cpointer-32bit=off --mem-heap=256 \
--toolchain=$(CURDIR)/jerryscript/cmake/toolchain_gba_arm7tdmi.cmake \
--jerry-cmdline=off
```
Any help would be appreciated! If you need any more info please let me know. Thanks. | Linking issue for ARM on OSX | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2393/comments | 4 | 2018-06-09T19:43:25Z | 2019-01-21T12:42:47Z | https://github.com/jerryscript-project/jerryscript/issues/2393 | 330,914,246 | 2,393 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 8b8bced6
Build command: CC=clang ./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 --jerry-libc=off \
--strip=off --system-allocator=on \
--linker-flag=-fuse-ld=gold --error-messages=on --lto=off
(Can be reproduced with GCC, too.)
```
###### OS:
```
Ubuntu 17.10
```
###### Test case:
```javascript
Math in Number
```
###### Backtrace:
```
=================================================================
==25129==ERROR: AddressSanitizer: heap-use-after-free on address 0xf60008b2 at pc 0x081b7812 bp 0xff8e17b8 sp 0xff8e17ac
READ of size 2 at 0xf60008b2 thread T0
#0 0x81b7811 in ecma_lcache_lookup jerryscript/jerry-core/ecma/base/ecma-lcache.c:180:30
#1 0x81af4f9 in ecma_find_named_property jerryscript/jerry-core/ecma/base/ecma-helpers.c:614:33
#2 0x81de2cd in ecma_op_object_get_own_property jerryscript/jerry-core/ecma/operations/ecma-objects.c:190:33
#3 0x81dea55 in ecma_op_object_get_property jerryscript/jerry-core/ecma/operations/ecma-objects.c:328:32
#4 0x81deb78 in ecma_op_object_has_property jerryscript/jerry-core/ecma/operations/ecma-objects.c:378:30
#5 0x82983f7 in opfunc_in jerryscript/jerry-core/vm/opcodes-ecma-relational-equality.c:144:35
#6 0x8217a18 in vm_loop jerryscript/jerry-core/vm/vm.c:2261:20
#7 0x820b442 in vm_execute jerryscript/jerry-core/vm/vm.c:2988:24
#8 0x820aaf8 in vm_run jerryscript/jerry-core/vm/vm.c:3081:10
#9 0x8209fee in vm_run_global jerryscript/jerry-core/vm/vm.c:225:28
#10 0x8171d56 in jerry_run jerryscript/jerry-core/api/jerry.c:550:24
#11 0x816c5f7 in main jerryscript/jerry-main/main-unix.c:660:21
#12 0xf7bc0985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
#13 0x806e5a7 in _start (jerryscript/build_asan/bin/jerry+0x806e5a7)
0xf60008b2 is located 2 bytes inside of 21-byte region [0xf60008b0,0xf60008c5)
freed by thread T0 here:
#0 0x8131a0c in __interceptor_free.localalias.0 (jerryscript/build_asan/bin/jerry+0x8131a0c)
#1 0x81e5c4c in jmem_heap_free_block jerryscript/jerry-core/jmem/jmem-heap.c:503:3
#2 0x821fd53 in ecma_dealloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:184:3
#3 0x819f590 in ecma_deref_ecma_string jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:923:7
#4 0x81ac04c in ecma_free_value jerryscript/jerry-core/ecma/base/ecma-helpers-value.c:915:7
#5 0x82983e5 in opfunc_in jerryscript/jerry-core/vm/opcodes-ecma-relational-equality.c:142:3
#6 0x8217a18 in vm_loop jerryscript/jerry-core/vm/vm.c:2261:20
#7 0x820b442 in vm_execute jerryscript/jerry-core/vm/vm.c:2988:24
#8 0x820aaf8 in vm_run jerryscript/jerry-core/vm/vm.c:3081:10
#9 0x8209fee in vm_run_global jerryscript/jerry-core/vm/vm.c:225:28
#10 0x8171d56 in jerry_run jerryscript/jerry-core/api/jerry.c:550:24
#11 0x816c5f7 in main jerryscript/jerry-main/main-unix.c:660:21
#12 0xf7bc0985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
previously allocated by thread T0 here:
#0 0x8131bc4 in malloc (jerryscript/build_asan/bin/jerry+0x8131bc4)
#1 0x81e5c96 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:295:10
#2 0x81e5ad7 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:329:24
#3 0x81e59b3 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:375:10
#4 0x821fd26 in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:170:10
#5 0x819b9d0 in ecma_new_ecma_string_from_utf8 jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:224:21
#6 0x81bd206 in ecma_builtin_helper_object_to_string jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c:107:18
#7 0x8248ae6 in ecma_builtin_object_prototype_object_to_string jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c:59:10
#8 0x82488cf in ecma_builtin_object_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.inc.h:32:1
#9 0x81cca3f in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:890:10
#10 0x81cc7ca in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:915:17
#11 0x81d5214 in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:439:19
#12 0x81dad38 in ecma_op_general_object_default_value jerryscript/jerry-core/ecma/operations/ecma-objects-general.c:239:25
#13 0x81e11e0 in ecma_op_object_default_value jerryscript/jerry-core/ecma/operations/ecma-objects.c:1089:10
#14 0x81cf724 in ecma_op_to_primitive jerryscript/jerry-core/ecma/operations/ecma-conversion.c:177:12
#15 0x81d034b in ecma_op_to_string jerryscript/jerry-core/ecma/operations/ecma-conversion.c:380:5
#16 0x8298395 in opfunc_in jerryscript/jerry-core/vm/opcodes-ecma-relational-equality.c:133:36
#17 0x8217a18 in vm_loop jerryscript/jerry-core/vm/vm.c:2261:20
#18 0x820b442 in vm_execute jerryscript/jerry-core/vm/vm.c:2988:24
#19 0x820aaf8 in vm_run jerryscript/jerry-core/vm/vm.c:3081:10
#20 0x8209fee in vm_run_global jerryscript/jerry-core/vm/vm.c:225:28
#21 0x8171d56 in jerry_run jerryscript/jerry-core/api/jerry.c:550:24
#22 0x816c5f7 in main jerryscript/jerry-main/main-unix.c:660:21
#23 0xf7bc0985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
SUMMARY: AddressSanitizer: heap-use-after-free jerryscript/jerry-core/ecma/base/ecma-lcache.c:180:30 in ecma_lcache_lookup
Shadow bytes around the buggy address:
0x3ec000c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ec000d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ec000e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ec000f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ec00100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x3ec00110: fa fa fa fa fa fa[fd]fd fd fa fa fa 00 00 00 fa
0x3ec00120: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00
0x3ec00130: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa
0x3ec00140: 00 00 00 00 fa fa 00 00 00 fa fa fa 00 00 00 fa
0x3ec00150: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00
0x3ec00160: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==25129==ABORTING
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| heap-use-after-free in ecma_lcache_lookup | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2386/comments | 1 | 2018-06-06T08:42:00Z | 2018-06-11T01:20:57Z | https://github.com/jerryscript-project/jerryscript/issues/2386 | 329,769,656 | 2,386 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 8b8bced6
Build command: ./tools/build.py --clean --debug
```
###### OS:
```
Ubuntu 17.10
```
###### Test case:
```javascript
"[]{83}".match("(?=){12,8}")
```
###### Backtrace:
```
ICE: Assertion 'qmin <= qmax' failed at jerryscript/jerry-core/parser/regexp/re-compiler.c(re_insert_into_group):183.
Error: ERR_FAILED_INTERNAL_ASSERTION
Program received signal SIGABRT, Aborted.
0x00005555555ce0f8 in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:59
59 SYSCALL_2
(gdb) bt
#0 0x00005555555ce0f8 in syscall_2 () at jerryscript/jerry-libc/target/posix/jerry-asm.S:59
#1 0x0000555555563b61 in raise (sig=6) at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:98
#2 0x0000555555563b33 in abort () at jerryscript/jerry-libc/target/posix/jerry-libc-target.c:81
#3 0x000055555555ce8c in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-port/default/default-fatal.c:71
#4 0x00005555555a97ac in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5 0x00005555555a97fe in jerry_assert_fail (assertion=0x5555555d7224 "qmin <= qmax",
file=0x5555555d63b8 "jerryscript/jerry-core/parser/regexp/re-compiler.c",
function=0x5555555e4270 <__func__.4008.lto_priv.353> "re_insert_into_group", line=183)
at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6 0x000055555558f6ce in re_insert_into_group (re_ctx_p=0x7fffffffd3d0, group_start_offset=1, idx=0, is_capturable=false)
at jerryscript/jerry-core/parser/regexp/re-compiler.c:183
#7 0x000055555558f837 in re_insert_into_group_with_jump (re_ctx_p=0x7fffffffd3d0, group_start_offset=1, idx=0,
is_capturable=false) at jerryscript/jerry-core/parser/regexp/re-compiler.c:218
#8 0x000055555558fc79 in re_parse_alternative (re_ctx_p=0x7fffffffd3d0, expect_eof=true)
at jerryscript/jerry-core/parser/regexp/re-compiler.c:348
#9 0x00005555555901ed in re_compile_bytecode (out_bytecode_p=0x7fffffffd450,
pattern_str_p=0x5555557f6548 <jerry_global_heap+472>, flags=0)
at jerryscript/jerry-core/parser/regexp/re-compiler.c:567
#10 0x000055555556877e in ecma_op_create_regexp_object (pattern_p=0x5555557f6548 <jerry_global_heap+472>, flags_str_p=0x0)
at jerryscript/jerry-core/ecma/operations/ecma-regexp-object.c:284
#11 0x0000555555586aba in ecma_builtin_regexp_dispatch_construct (arguments_list_p=0x7fffffffd510, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c:115
#12 0x0000555555587893 in ecma_builtin_string_prepare_search.lto_priv.170 (this_arg=449, this_to_string_value_ptr=0x7fffffffd560,
regexp_arg=473, regexp_value=0x7fffffffd55c)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:421
#13 0x0000555555587935 in ecma_builtin_string_prototype_object_match (this_arg=449, regexp_arg=473)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c:452
#14 0x0000555555586ca8 in ecma_builtin_string_prototype_dispatch_routine (builtin_routine_id=67, this_arg_value=449,
arguments_list=0x7fffffffd8ac, arguments_number=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h:53
#15 0x00005555555b9529 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_STRING_PROTOTYPE,
builtin_routine_id=67, this_arg_value=449, arguments_list_p=0x7fffffffd8ac, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:890
#16 0x00005555555b967b in ecma_builtin_dispatch_call (obj_p=0x5555557f6470 <jerry_global_heap+256>, this_arg_value=449,
arguments_list_p=0x7fffffffd8ac, arguments_list_len=1)
at jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:915
#17 0x000055555559ec6c in ecma_op_function_call (func_obj_p=0x5555557f6470 <jerry_global_heap+256>, this_arg_value=449,
arguments_list_p=0x7fffffffd8ac, arguments_list_len=1)
at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:439
#18 0x0000555555592471 in opfunc_call (frame_ctx_p=0x7fffffffd8f0) at jerryscript/jerry-core/vm/vm.c:436
#19 0x0000555555597485 in vm_execute (frame_ctx_p=0x7fffffffd8f0, arg_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:2997
#20 0x0000555555597724 in vm_run (bytecode_header_p=0x5555557f6570 <jerry_global_heap+512>, this_binding_value=27,
lex_env_p=0x5555557f63a0 <jerry_global_heap+48>, is_eval_code=false, arg_list_p=0x0, arg_list_len=0)
at jerryscript/jerry-core/vm/vm.c:3081
#21 0x0000555555592098 in vm_run_global (bytecode_p=0x5555557f6570 <jerry_global_heap+512>)
at jerryscript/jerry-core/vm/vm.c:225
#22 0x00005555555bf14c in jerry_run (func_val=203) at jerryscript/jerry-core/api/jerry.c:550
#23 0x00005555555bdbf6 in main (argc=3, argv=0x7fffffffdc08) at jerryscript/jerry-main/main-unix.c:660
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
| Assertion 'qmin <= qmax' failed in re_insert_into_group | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2384/comments | 0 | 2018-06-05T17:00:09Z | 2018-06-11T07:25:54Z | https://github.com/jerryscript-project/jerryscript/issues/2384 | 329,544,339 | 2,384 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 8b8bced6
Build command: ./tools/build.py --clean --debug
```
###### OS:
```
Ubuntu 17.10
```
###### Description:
The test case below converts an array to JSON string. However, (probably because of the unicode characters) the last object's last field (`fz_return`) will be somehow truncated, resulting an incorrect JSON string.
###### Test case:
```javascript
print(JSON.stringify([
{"dddddd":"ccccccccccccc","bbbbb":225,"vvvvv":{"aaaaaaa":"call","ffffffff":["w2\u1D306A"],"fz_return":0}},
{"dddddd":"ccccccccccccc","bbbbb":225,"vvvvv":{"aaaaaaa":"call","ffffffff":["\uD834\uDF06"],"fz_return":0}},
{"vvvvv":{"aaaaaaa":"call","fffffffff":["D"],"fz_return":0}}]))
```
###### Expected output:
```javascript
[{"dddddd":"ccccccccccccc","bbbbb":225,"vvvvv":{"aaaaaaa":"call","ffffffff":["w2ᴰ6A"],"fz_return":0}},{"dddddd":"ccccccccccccc","bbbbb":225,"vvvvv":{"aaaaaaa":"call","ffffffff":["𝌆"],"fz_return":0}},{"vvvvv":{"aaaaaaa":"call","fffffffff":["D"],"fz_return":0}}]
```
###### Actual output:
```javascript
[{"dddddd":"ccccccccccccc","bbbbb":225,"vvvvv":{"aaaaaaa":"call","ffffffff":["w2ᴰ6A"],"fz_return":0}},{"dddddd":"ccccccccccccc","bbbbb":225,"vvvvv":{"aaaaaaa":"call","ffffffff":["������"],"fz_return":0}},{"vvvvv":{"aaaaaaa":"call","fffffffff":["D"],"fz_r:0}}]
```
| Incorrect output from JSON.stringify | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2383/comments | 4 | 2018-06-05T15:46:03Z | 2018-09-04T12:58:15Z | https://github.com/jerryscript-project/jerryscript/issues/2383 | 329,517,027 | 2,383 |
[
"jerryscript-project",
"jerryscript"
] | I was wondering if there are any side effects besides increased memory usage by using uncompressed pointer(passing `--cpointer-32bit` as a build option).
My main concern is according to the [data representation](https://github.com/jerryscript-project/jerryscript/blob/master/docs/04.INTERNALS.md#data-representation) section of the docs:

the structure can only hold at max 29 bit pointers. So how would a 32 bit pointer fit in? | Side effect of using uncompressed pointer? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2368/comments | 7 | 2018-06-01T00:12:32Z | 2018-06-01T21:44:56Z | https://github.com/jerryscript-project/jerryscript/issues/2368 | 328,338,401 | 2,368 |
[
"jerryscript-project",
"jerryscript"
] | So I was trying to debug my last [issue](https://github.com/jerryscript-project/jerryscript/issues/2365) and I ran into what I think its a bug.
***Explanation***
* `jerry_create_external_function_object` calls [`ecma_op_create_external_function_object `](https://github.com/jerryscript-project/jerryscript/blob/64b16bf190cc1965549c395f5fe9513ef3cd74f4/jerry-core/ecma/operations/ecma-function-object.c#L257).
* If you look at [`ecma_op_create_external_function_object`](https://github.com/jerryscript-project/jerryscript/blob/64b16bf190cc1965549c395f5fe9513ef3cd74f4/jerry-core/ecma/operations/ecma-function-object.c#L257), it sets the type flag of the function object by calling [`ecma_create_object`](https://github.com/jerryscript-project/jerryscript/blob/47794512846d74a1255016ea087ab2003d1f1d6b/jerry-core/ecma/base/ecma-helpers.c#L76) with `ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION`.
* You can check the flag before `ecma_op_create_external_function_object` by logging with `printf("%x\n", function_obj_p->type_flags_refs);` and it will print `0x63`.
* Now `jerry_create_external_function_object` will return the newly created function object and the user will call [`jerry_set_property`](https://github.com/jerryscript-project/jerryscript/blob/ac9fce1d8d5a8eb821525f09ef1607e4643e14f3/jerry-core/api/jerry.c#L1929) to register the external function.
* If you log out the type flag again in [`jerry_set_property`](https://github.com/jerryscript-project/jerryscript/blob/ac9fce1d8d5a8eb821525f09ef1607e4643e14f3/jerry-core/api/jerry.c#L1929) using `printf("%x", ecma_get_object_from_value (obj_value)->type_flags_refs)`, it will log out `0x60`. **So it lost its type flag somehow**.
*I checked the `prop_name_val` by converting it to `char *` then `strcmp` to make sure I was actually logging the newly created external function object.* | external function type flag is lost after returning from create_external_function | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2366/comments | 2 | 2018-05-30T23:06:56Z | 2018-05-31T12:09:05Z | https://github.com/jerryscript-project/jerryscript/issues/2366 | 327,930,149 | 2,366 |
[
"jerryscript-project",
"jerryscript"
] | I have noticed everytime JS calls an external C function the `LCACHE` will miss.
Testing method:
I looped an external C call 10000 times and `LCACHE` missed exactly 20000 times. (MISS when ecma_lcache_lookup returns NULL)
This is quite a performance hit. Calling an empty external C function is 10% faster(77282 cycles vs 88476 cycles) with `LCACHE` completely disabled.
Can anyone confirm this? | LCACHE misses for every native C function call | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2365/comments | 6 | 2018-05-29T19:21:34Z | 2019-01-02T10:00:31Z | https://github.com/jerryscript-project/jerryscript/issues/2365 | 327,453,884 | 2,365 |
[
"jerryscript-project",
"jerryscript"
] | Is there a way to make `jerry_create_string` not duplicate the string literal instead use the same reference? | Prevent jerry_create_string from copying string? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2358/comments | 3 | 2018-05-24T16:03:34Z | 2018-05-29T20:58:54Z | https://github.com/jerryscript-project/jerryscript/issues/2358 | 326,189,245 | 2,358 |
[
"jerryscript-project",
"jerryscript"
] | I want to use snapshot_save and exec feature in my c code, how do I compile jerryscript library with those features enabled?
I set the features to ON inside jerry-core/CMakeList but it didn't enable them when I checked at runtime.
I know this question seems dumb lol but I can't find any documentation regarding this. | How to turn on a feature? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2356/comments | 0 | 2018-05-23T14:03:41Z | 2018-05-23T14:24:58Z | https://github.com/jerryscript-project/jerryscript/issues/2356 | 325,721,037 | 2,356 |
[
"jerryscript-project",
"jerryscript"
] | If I add a native C function wrapper to the global JS scope then load and execute a snapshotted function that invoke the said native function wrapper inside its function body, will it work? | Does snapshot work with native functions? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2354/comments | 3 | 2018-05-23T02:06:15Z | 2018-05-23T17:12:19Z | https://github.com/jerryscript-project/jerryscript/issues/2354 | 325,522,967 | 2,354 |
[
"jerryscript-project",
"jerryscript"
] | ###### Jerry version:
```
Checked revision: 872825fb
Build command: ./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g --jerry-libc=off \
--static-link=off --strip=off --system-allocator=on \
--linker-flag=-fuse-ld=gold --error-messages=on
```
###### OS:
```
Ubuntu 17.10
```
###### Test case:
```javascript
new RegExp().compile("\\1\\");
```
###### Backtrace:
```
=================================================================
==7852==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf5e0071b at pc 0x082020b9 bp 0xfff791a8 sp 0xfff7919c
READ of size 1 at 0xf5e0071b thread T0
#0 0x82020b8 in lit_utf8_incr jerryscript/jerry-core/lit/lit-strings.c:529:59
#1 0x821ff86 in re_count_num_of_groups jerryscript/jerry-core/parser/regexp/re-parser.c:265:9
#2 0x821e2d6 in re_parse_next_token jerryscript/jerry-core/parser/regexp/re-parser.c:728:13
#3 0x8217680 in re_parse_alternative jerryscript/jerry-core/parser/regexp/re-compiler.c:242:38
#4 0x821647c in re_compile_bytecode jerryscript/jerry-core/parser/regexp/re-compiler.c:567:35
#5 0x826791d in ecma_builtin_regexp_prototype_compile jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c:187:9
#6 0x82667f4 in ecma_builtin_regexp_prototype_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.inc.h:55:1
#7 0x81d16bf in ecma_builtin_dispatch_routine jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:897:10
#8 0x81d144a in ecma_builtin_dispatch_call jerryscript/jerry-core/ecma/builtin-objects/ecma-builtins.c:922:17
#9 0x81e0a8a in ecma_op_function_call jerryscript/jerry-core/ecma/operations/ecma-function-object.c:439:19
#10 0x8235311 in opfunc_call jerryscript/jerry-core/vm/vm.c:442:24
#11 0x8221a87 in vm_execute jerryscript/jerry-core/vm/vm.c:3003:7
#12 0x8221068 in vm_run jerryscript/jerry-core/vm/vm.c:3087:10
#13 0x822055e in vm_run_global jerryscript/jerry-core/vm/vm.c:225:28
#14 0x817472c in jerry_run jerryscript/jerry-core/api/jerry.c:557:24
#15 0x816e879 in main jerryscript/jerry-main/main-unix.c:660:21
#16 0xf7ba4985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
#17 0x80704a7 in _start (jerryscript/build/bin/_jerry+0x80704a7)
0xf5e0071b is located 0 bytes to the right of 11-byte region [0xf5e00710,0xf5e0071b)
allocated by thread T0 here:
#0 0x8133ac4 in malloc (jerryscript/build/bin/_jerry+0x8133ac4)
#1 0x81fb7a6 in jmem_heap_alloc_block_internal jerryscript/jerry-core/jmem/jmem-heap.c:342:10
#2 0x81fb5e7 in jmem_heap_gc_and_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:378:24
#3 0x81fb4c3 in jmem_heap_alloc_block jerryscript/jerry-core/jmem/jmem-heap.c:424:10
#4 0x8236366 in ecma_alloc_string_buffer jerryscript/jerry-core/ecma/base/ecma-alloc.c:182:10
#5 0x81a01d0 in ecma_new_ecma_string_from_utf8 jerryscript/jerry-core/ecma/base/ecma-helpers-string.c:224:21
#6 0x81bca67 in ecma_find_or_create_literal_string jerryscript/jerry-core/ecma/base/ecma-literal-storage.c:73:29
#7 0x8210395 in parser_compute_indicies jerryscript/jerry-core/parser/js/js-parser.c:201:30
#8 0x8206517 in parser_post_processing jerryscript/jerry-core/parser/js/js-parser.c:1456:25
#9 0x820e63c in parser_parse_source jerryscript/jerry-core/parser/js/js-parser.c:2340:21
#10 0x820ce7b in parser_parse_script jerryscript/jerry-core/parser/js/js-parser.c:2837:22
#11 0x81742fd in jerry_parse jerryscript/jerry-core/api/jerry.c:414:18
#12 0x816e77f in main jerryscript/jerry-main/main-unix.c:651:19
#13 0xf7ba4985 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x18985)
SUMMARY: AddressSanitizer: heap-buffer-overflow jerryscript/jerry-core/lit/lit-strings.c:529:59 in lit_utf8_incr
Shadow bytes around the buggy address:
0x3ebc0090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ebc00a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ebc00b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ebc00c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ebc00d0: fa fa fa fa fa fa fd fa fa fa fd fa fa fa 00 00
=>0x3ebc00e0: fa fa 00[03]fa fa fd fa fa fa 00 05 fa fa 00 02
0x3ebc00f0: fa fa 00 06 fa fa 00 00 fa fa fa fa fa fa fa fa
0x3ebc0100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ebc0110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ebc0120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x3ebc0130: 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
==7852==ABORTING
```
<sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/). </sup>
| heap-buffer-overflow in lit_utf8_incr | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2344/comments | 0 | 2018-05-19T10:32:49Z | 2018-05-22T08:32:41Z | https://github.com/jerryscript-project/jerryscript/issues/2344 | 324,619,811 | 2,344 |
[
"jerryscript-project",
"jerryscript"
] | Does anyone have any objection to retiring the `Mbed` JerryScript target?
It was initially developed to support the Mbed OS 3 branch of Mbed which was discontinued 18 Months ago and is no longer supported by Arm.
Retiring this target would give us the opportunity to entirely concentrate on the Mbed OS 5 target.
It's understood that users may still be interested in the original Mbed port, so please let us know if this is the case.
| Retire Mbed target and concentrate on Mbed OS 5 target | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2338/comments | 1 | 2018-05-17T16:20:11Z | 2018-05-20T05:31:26Z | https://github.com/jerryscript-project/jerryscript/issues/2338 | 324,094,394 | 2,338 |
[
"jerryscript-project",
"jerryscript"
] | There is an ongoing work of changing "error flags" to "error values". "error values" are primary values such as "null", "number", but they exist only on Jerry API level. Therefore JS do not need handle them at all.
Error values are designed to be return values, not arguments (no change here). Hence any API or C callback function can return with an error value, but the returned error value cannot be passed to other functions except a few error management functions and `jerry_release`. The value can be extracted from the error by `jerry_get_error_from_value`. The `jerry_create_error_from_value` creates an error value using the non-error value argument. For aborts, there will be a `jerry_create_abort_from_value`. Abort is the same as errors, except they are not caught by JS, and can only created by API or the debugger. `jerry_is_error_value` tells if the value is an error. Abort is considered a special variant of error. So everything true to an error is also true to an abort, but there is a special create/is_abort function to tell the difference.
This is the current plan now. We are open to feedback. | Discussing error management | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2318/comments | 1 | 2018-05-09T08:33:28Z | 2019-08-04T10:54:18Z | https://github.com/jerryscript-project/jerryscript/issues/2318 | 321,478,923 | 2,318 |
[
"jerryscript-project",
"jerryscript"
] | ecmascript-binary-ast is a standard way to compress Javascript, does that have benifit? | How about using https://github.com/binast/ecmascript-binary-ast instead of snapshot? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2311/comments | 2 | 2018-05-05T09:24:58Z | 2018-05-05T13:23:10Z | https://github.com/jerryscript-project/jerryscript/issues/2311 | 320,494,242 | 2,311 |
[
"jerryscript-project",
"jerryscript"
] | Hello,
I'm writing code that should work as the following from the JS side:
```js
x.y.fn('foo')
.then(v => console.log(v))
.catch(error => console.err(err));
```
Don't worry about what happens when the promise is resolved, my problem is when I reject the promise. Currently, I want to reject the promise and pass an error object to the catch handler when the supplied string to `fn` is not a special value.
The code I have looks like the following:
```c
jerry_value_t returned_promise = jerry_create_promise();
if (should_reject_promise) {
jerry_value_t error = jerry_create_error(...);
jerry_value_t result = jerry_resolve_or_reject_promise(returned_promise, error, false);
DEBUG_LOG("RESULT STATUS: %d", jerry_get_error_type(result));
// If something went wrong rejecting the promise, error out.
if (jerry_value_has_error_flag(result)) {
jerry_release_value(returned_promise);
jerry_release_value(error);
return result;
}
// No issue rejecting the promise so return it.
jerry_release_value(result);
jerry_release_value(error);
return returned_promise;
}
// ...
```
When I run my JS code I get the following error:
```
ICE: Unreachable control path at .../vendor/jerryscript/jerry-core/ecma/base/ecma-helpers-value.c(ecma_copy_value):Error: ERR_FAILED_INTERNAL_ASSERTION
Fatal Jerryscript Error: ERR_FAILED_INTERNAL_ASSERTION
```
Am I not allowed to pass an error object in? Documentation doesn't seem to say. Any help would be appreciated! Thanks.
| Passing Error objects to Promise | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2310/comments | 3 | 2018-05-04T15:58:14Z | 2018-06-25T19:43:17Z | https://github.com/jerryscript-project/jerryscript/issues/2310 | 320,329,630 | 2,310 |
[
"jerryscript-project",
"jerryscript"
] | ```C
#include <stdio.h>
#include "jerryscript.h"
static const char instanceof_source[] = "var x = function(o, c) {return (o instanceof c);}; x";
static jerry_value_t
external_function (const jerry_value_t function_obj,
const jerry_value_t this_arg,
const jerry_value_t args_p[],
const jerry_size_t args_count)
{
(void) function_obj;
(void) this_arg;
(void) args_p;
(void) args_count;
return jerry_create_undefined ();
} /* external_function */
static void
test_instanceof (const char *prefix,
jerry_value_t undefined,
jerry_value_t instanceof,
jerry_value_t constructor)
{
jerry_value_t instance = jerry_construct_object (constructor, NULL, 0);
jerry_value_t args[2] =
{
instance, constructor
};
jerry_value_t result = jerry_call_function (instanceof, undefined, args, 2);
if (jerry_value_has_error_flag (result))
{
jerry_value_clear_error_flag (&result);
}
jerry_value_t js_string = jerry_value_to_string (result);
jerry_size_t size = jerry_get_string_size (js_string);
jerry_char_t c_string[size + 1];
jerry_string_to_char_buffer (js_string, c_string, size);
c_string[size] = 0;
fprintf(stderr, "%8s: instanceof results in: %s\n", prefix, c_string);
jerry_release_value (instance);
jerry_release_value (js_string);
jerry_release_value (result);
}
int
main (void)
{
jerry_init (JERRY_INIT_EMPTY);
jerry_value_t constructor;
jerry_value_t undefined = jerry_create_undefined ();
jerry_value_t instanceof = jerry_eval ((jerry_char_t *) instanceof_source, sizeof (instanceof_source) - 1, true);
/* Test for a native-backed function. */
constructor = jerry_create_external_function (external_function);
test_instanceof ("native", undefined, instanceof, constructor);
jerry_release_value (constructor);
/* Test for a JS constructor. */
jerry_value_t global = jerry_get_global_object ();
jerry_value_t object_name = jerry_create_string ((jerry_char_t *) "Object");
constructor = jerry_get_property (global, object_name);
jerry_release_value (object_name);
jerry_release_value (global);
test_instanceof ("js", undefined, instanceof, constructor);
jerry_release_value (constructor);
jerry_release_value (instanceof);
jerry_release_value (undefined);
jerry_cleanup ();
} /* main */
``` | instanceof throws TypeError for instance derived from native-backed constructor | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2302/comments | 3 | 2018-04-28T16:06:02Z | 2019-10-25T13:56:37Z | https://github.com/jerryscript-project/jerryscript/issues/2302 | 318,648,271 | 2,302 |
[
"jerryscript-project",
"jerryscript"
] | Folks,
When I am done using the interpreter, I would like a way to clean up (in case I want to start a new instance of the interpreter, for example) that doesn't complain about un-free'd jerry_value_t values, etc.
It's useful sometimes to have jerry_cleanup complain to tell me when I've got a leak, but there are times when I just want it to clean up everything and exit, without lecturing :-) me.
...is this possible now, can we add a flag to jerry_cleanup ("quiet"), or is there some deep technical issue I don't understand that precludes this functionality?
Thanks,
Tim
As an example, I'd like to write code like:
```
main()
{
for (i = 0; i < forever; i++)
{
jerry_init();
...do some stuff, leak pointers/memory all over the interpreter, etc.
jerry_cleanup("quiet"); /* reset the world sans error messages/exceptions/etc. */
}
} /* main */
``` | jerry_cleanup -- quiet, please... | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2301/comments | 5 | 2018-04-26T15:43:38Z | 2019-10-25T19:42:43Z | https://github.com/jerryscript-project/jerryscript/issues/2301 | 318,088,759 | 2,301 |
[
"jerryscript-project",
"jerryscript"
] | In the Unix build, if there are some errors in script, only little message provided:
```JavaScript
A();
```
./bin/jerry error.js
Script Error: ReferenceError
However, in iot.js, more error message provided:
./build/x86_64-linux/debug/bin/iotjs error.js
uncaughtException: ReferenceError: A is not defined
How to show this message? Thanks.
| How to provide more error information? | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2297/comments | 5 | 2018-04-24T06:00:34Z | 2018-04-24T09:16:02Z | https://github.com/jerryscript-project/jerryscript/issues/2297 | 317,080,718 | 2,297 |
[
"jerryscript-project",
"jerryscript"
] | I would expect in [this line] to pop the iterator if `js_arg` is `undefined`.
Otherwise there can only be a single optional argument. Another consequence is that `jerryx_arg_transform_optional` does not work together with `jerryx_arg_transform_object_properties` because the iterator does not get advanced when an optional arg is `undefined`...
It looks like the unit test doesn't have either of these scenarios as a test case.
@jiangzidong do you agree this is a bug?
[this line]: https://github.com/jerryscript-project/jerryscript/blob/4e7a9d2d53804c1af7f7f7c57e2f6640898d0807/jerry-ext/arg/arg-transform-functions.c#L37 | jerryx_arg_transform_optional does not advance iterator in case the value is undefined | https://api.github.com/repos/jerryscript-project/jerryscript/issues/2288/comments | 2 | 2018-04-17T13:25:51Z | 2019-07-17T12:16:42Z | https://github.com/jerryscript-project/jerryscript/issues/2288 | 315,058,956 | 2,288 |
Subsets and Splits