Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Assertion ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE in vm_loop #3276

Closed
renatahodovan opened this issue Nov 1, 2019 · 1 comment · Fixed by #3326
Labels
bug Undesired behaviour ES2015 Related to ES2015 features

Comments

@renatahodovan
Copy link
Contributor

JerryScript revision

f93fa98

Build platform

Linux-4.15.0-62-generic-x86_64-with-Ubuntu-18.04-bionic

Build steps
./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g \
--strip=off --system-allocator=on --logging=on \
--linker-flag=-fuse-ld=gold --error-messages=on --profile=es2015-subset
Test case
with ({ }) class ${ $( ) { $ } } 
Output
ICE: Assertion 'ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE' failed at jerryscript/jerry-core/vm/vm.c(vm_loop):1324.
Error: ERR_FAILED_INTERNAL_ASSERTION
Backtrace
bt
#0  0xf7fd5079 in __kernel_vsyscall ()
#1  0xf77fc832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xf77fdcc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0x5657ad5f in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:30
#4  0x565fdf83 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5  0x565fdfc4 in jerry_assert_fail (assertion=0x566bc8a0 "ecma_get_lex_env_type (frame_ctx_p->lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE", file=0x566bc640 "jerryscript/jerry-core/vm/vm.c", function=0x5669d220 <__func__.6213.lto_priv.440> "vm_loop", line=1324) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6  0x565de57a in vm_loop (frame_ctx_p=0xffffc6f0) at jerryscript/jerry-core/vm/vm.c:1324
#7  0x565ec334 in vm_execute (frame_ctx_p=0xffffc6f0, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3727
#8  0x565ecc97 in vm_run (bytecode_header_p=0xf4f01ad0, this_binding_value=4126149459, lex_env_p=0xf5d007b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3853
#9  0x565d8eca in vm_run_global (bytecode_p=0xf4f01ad0) at jerryscript/jerry-core/vm/vm.c:282
#10 0x5666e510 in jerry_run (func_val=4126148835) at jerryscript/jerry-core/api/jerry.c:595
#11 0x5666ac86 in main (argc=2, argv=0xffffcb24) at jerryscript/jerry-main/main-unix.c:739

Found by Fuzzinator with grammarinator.

@LaszloLango LaszloLango added bug Undesired behaviour ES2015 Related to ES2015 features labels Nov 1, 2019
@rerobika
Copy link
Member

rerobika commented Nov 4, 2019

Similar to #3275 due to the single statement context.

rerobika added a commit to rerobika/jerryscript that referenced this issue Nov 18, 2019
This patch fixes jerryscript-project#3275 and fixes jerryscript-project#3276.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
rerobika added a commit to rerobika/jerryscript that referenced this issue Nov 18, 2019
This patch fixes jerryscript-project#3275 and fixes jerryscript-project#3276.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
rerobika added a commit to rerobika/jerryscript that referenced this issue Nov 19, 2019
This patch fixes jerryscript-project#3275 and fixes jerryscript-project#3276.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
rerobika added a commit to rerobika/jerryscript that referenced this issue Nov 19, 2019
This patch fixes jerryscript-project#3275 and fixes jerryscript-project#3276.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
rerobika added a commit to rerobika/jerryscript that referenced this issue Nov 19, 2019
This patch fixes jerryscript-project#3275 and fixes jerryscript-project#3276.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
rerobika added a commit that referenced this issue Nov 19, 2019
This patch fixes #3275 and fixes #3276.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour ES2015 Related to ES2015 features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants