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 'lex_env_p != NULL' failed in ecma_op_resolve_super_reference_value #2822

Closed
renatahodovan opened this issue Apr 13, 2019 · 0 comments · Fixed by #2829
Closed

Assertion 'lex_env_p != NULL' failed in ecma_op_resolve_super_reference_value #2822

renatahodovan opened this issue Apr 13, 2019 · 0 comments · Fixed by #2829
Labels
bug Undesired behaviour ES2015 Related to ES2015 features

Comments

@renatahodovan
Copy link
Contributor

Jerry version:
Checked revision: e944cdaa

Build command: ./tools/build.py --clean --debug --compile-flag=-m32 --profile=es2015-subset --system-allocator=on --error-messages=on --logging=on
OS:
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
Test case:
class Animal {
    constructor() {
        $ = eval()
    }
    explain() { }
}
class Dog extends Animal {
    constructor() {
        super()
    }
}
class Doge extends Dog {
    whoAmI() {}
}
new Doge
Backtrace:
ICE: Assertion 'lex_env_p != NULL' failed at jerryscript/jerry-core/ecma/operations/ecma-reference.c(ecma_op_resolve_super_reference_value):81.
Error: ERR_FAILED_INTERNAL_ASSERTION

bt
#0  0xf7fd5059 in __kernel_vsyscall ()
#1  0xf7de0832 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xf7de1cc1 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0x5655c852 in jerry_port_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-port/default/default-fatal.c:71
#4  0x565a0518 in jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION) at jerryscript/jerry-core/jrt/jrt-fatals.c:58
#5  0x565a0552 in jerry_assert_fail (assertion=0x565e2391 "lex_env_p != NULL", file=0x565e1738 "jerryscript/jerry-core/ecma/operations/ecma-reference.c", function=0x565d3020 <__func__.3439.lto_priv.522> "ecma_op_resolve_super_reference_value", line=81) at jerryscript/jerry-core/jrt/jrt-fatals.c:82
#6  0x5659ac09 in ecma_op_resolve_super_reference_value (lex_env_p=0x0) at jerryscript/jerry-core/ecma/operations/ecma-reference.c:81
#7  0x565ad482 in ecma_op_find_super_declerative_lex_env (lex_env_p=0x566fb970) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:539
#8  0x565ad60b in ecma_op_get_class_this_binding_property (lex_env_p=0x566fb970) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:570
#9  0x565ad790 in ecma_op_set_class_this_binding (lex_env_p=0x566fb970, this_binding=1450162387) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:612
#10 0x565add89 in ecma_op_function_call (func_obj_p=0x566fb420, this_arg_value=1450162387, arguments_list_p=0xffffca8c, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:786
#11 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566fb420, this_arg_value=1450162387, arguments_list_p=0xffffca8d, arguments_list_len=1) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118
#12 0x5658d168 in vm_super_call (frame_ctx_p=0xffffcaac) at jerryscript/jerry-core/vm/vm.c:486
#13 0x56592e09 in vm_execute (frame_ctx_p=0xffffcaac, arg_p=0xffffccf0, arg_list_len=2) at jerryscript/jerry-core/vm/vm.c:3489
#14 0x56592ffc in vm_run (bytecode_header_p=0x566fa900, this_binding_value=1450162387, lex_env_p=0x566fb930, parse_opts=0, arg_list_p=0xffffccf0, arg_list_len=2) at jerryscript/jerry-core/vm/vm.c:3595
#15 0x565adda5 in ecma_op_function_call (func_obj_p=0x566fb610, this_arg_value=1450162387, arguments_list_p=0xffffccf0, arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:791
#16 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566fb610, this_arg_value=1450162387, arguments_list_p=0xffffccf1, arguments_list_len=2) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118
#17 0x5658d168 in vm_super_call (frame_ctx_p=0xffffcd0c) at jerryscript/jerry-core/vm/vm.c:486
#18 0x56592e09 in vm_execute (frame_ctx_p=0xffffcd0c, arg_p=0xffffcf34, arg_list_len=3) at jerryscript/jerry-core/vm/vm.c:3489
#19 0x56592ffc in vm_run (bytecode_header_p=0x566fac40, this_binding_value=1450162387, lex_env_p=0x566fb8f0, parse_opts=0, arg_list_p=0xffffcf34, arg_list_len=3) at jerryscript/jerry-core/vm/vm.c:3595
#20 0x565adda5 in ecma_op_function_call (func_obj_p=0x566fb790, this_arg_value=1450162387, arguments_list_p=0xffffcf34, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:791
#21 0x565ae6af in ecma_op_function_construct (func_obj_p=0x566fb790, this_arg_value=1450162387, arguments_list_p=0xffffcf35, arguments_list_len=3) at jerryscript/jerry-core/ecma/operations/ecma-function-object.c:1118
#22 0x5658d581 in opfunc_construct (frame_ctx_p=0xffffcf5c) at jerryscript/jerry-core/vm/vm.c:656
#23 0x56592e19 in vm_execute (frame_ctx_p=0xffffcf5c, arg_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3495
#24 0x56592ffc in vm_run (bytecode_header_p=0x566fafd0, this_binding_value=1450156419, lex_env_p=0x566fa1b0, parse_opts=0, arg_list_p=0x0, arg_list_len=0) at jerryscript/jerry-core/vm/vm.c:3595
#25 0x5658ce48 in vm_run_global (bytecode_p=0x566fafd0) at jerryscript/jerry-core/vm/vm.c:273
#26 0x565b4eb4 in jerry_run (func_val=1450161027) at jerryscript/jerry-core/api/jerry.c:549
#27 0x565b3847 in main (argc=3, argv=0xffffd204) at jerryscript/jerry-main/main-unix.c:742

Found by Fuzzinator with grammarinator.

@LaszloLango LaszloLango added bug Undesired behaviour ES2015 Related to ES2015 features labels Apr 15, 2019
rerobika added a commit to rerobika/jerryscript that referenced this issue Apr 15, 2019
rerobika added a commit to rerobika/jerryscript that referenced this issue Apr 15, 2019
dbatyai pushed a commit that referenced this issue Apr 26, 2019
)

This patch fixes #2822.

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.

2 participants