Skip to content

Assertion 'environment_record_p != NULL' failed in vm_get_class_function #5348

Backlog

Description

@renatahodovan
JerryScript revision

b706935

Build platform

macOS 26.6.2, arm64

Build steps
./tools/build.py --clean --debug --compile-flag=-fsanitize=address --logging=on --compile-flag="-Wno-error=enum-enum-conversion" --compile-flag="-Wno-unterminated-string-initialization"
Test case
class A extends Array{constructor(){eval("eval('super()')")
eval()}}class B extends A{}new B()
eval("eval('super()')")
Output
ICE: Assertion 'environment_record_p != NULL' failed at jerryscript/fresh/src/jerry-core/vm/vm.c(vm_get_class_function):525.
Error: JERRY_FATAL_FAILED_ASSERTION
AddressSanitizer:DEADLYSIGNAL
=================================================================
==92901==ERROR: AddressSanitizer: ABRT on unknown address 0x0001826485e8 (pc 0x0001826485e8 bp 0x00016b68b500 sp 0x00016b68b4e0 T0)
    #0 0x0001826485e8 in __pthread_kill+0x8 (libsystem_kernel.dylib:arm64e+0x95e8)
    #1 0x000182589974 in abort+0x90 (libsystem_c.dylib:arm64e+0x78974)
    #2 0x000104891118 in jerry_port_fatal jerry-port-process.c:41
    #3 0x00010481fed4 in jerry_fatal jrt-fatals.c:63
    #4 0x00010481ff14 in jerry_assert_fail jrt-fatals.c:83
    #5 0x00010488e100 in vm_get_class_function vm.c:525
    #6 0x00010488030c in vm_loop vm.c:2200
    #7 0x00010487d0d4 in vm_execute vm.c:5230
    #8 0x00010487c244 in vm_run vm.c:5331
    #9 0x00010487c570 in vm_run_eval vm.c:374
    #10 0x0001047f5678 in ecma_op_eval_chars_buffer ecma-eval.c:93
    #11 0x0001047f5678 in ecma_op_eval ecma-eval.c:56
    #12 0x0001047b9dc4 in ecma_builtin_global_object_eval ecma-builtin-global.c:109
    #13 0x0001047b9dc4 in ecma_builtin_global_dispatch_routine ecma-builtin-global.c:594
    #14 0x0001047d5c88 in ecma_builtin_dispatch_routine ecma-builtins.c:1460
    #15 0x0001047d5c88 in ecma_builtin_dispatch_call ecma-builtins.c:1489
    #16 0x0001047f8930 in ecma_op_function_call_native_built_in ecma-function-object.c:1223
    #17 0x0001047f7fcc in ecma_op_function_call ecma-function-object.c:1468
    #18 0x0001047f82fc in ecma_op_function_validated_call ecma-function-object.c:1428
    #19 0x00010487d594 in opfunc_call vm.c:758
    #20 0x00010487d594 in vm_execute vm.c:5236
    #21 0x00010487c244 in vm_run vm.c:5331
    #22 0x00010487c570 in vm_run_eval vm.c:374
    #23 0x0001047f5678 in ecma_op_eval_chars_buffer ecma-eval.c:93
    #24 0x0001047f5678 in ecma_op_eval ecma-eval.c:56
    #25 0x0001047b9dc4 in ecma_builtin_global_object_eval ecma-builtin-global.c:109
    #26 0x0001047b9dc4 in ecma_builtin_global_dispatch_routine ecma-builtin-global.c:594
    #27 0x0001047d5c88 in ecma_builtin_dispatch_routine ecma-builtins.c:1460
    #28 0x0001047d5c88 in ecma_builtin_dispatch_call ecma-builtins.c:1489
    #29 0x0001047f8930 in ecma_op_function_call_native_built_in ecma-function-object.c:1223
    #30 0x0001047f7fcc in ecma_op_function_call ecma-function-object.c:1468
    #31 0x0001047f82fc in ecma_op_function_validated_call ecma-function-object.c:1428
    #32 0x00010487d594 in opfunc_call vm.c:758
    #33 0x00010487d594 in vm_execute vm.c:5236
    #34 0x00010487c244 in vm_run vm.c:5331
    #35 0x00010487bfa0 in vm_run_global vm.c:286
    #36 0x0001047757d4 in jerry_run jerryscript.c:549
    #37 0x000104890294 in jerryx_source_exec_script sources.c:68
    #38 0x000104771414 in main main-desktop.c:156
    #39 0x0001822b84e0 in start+0x1b4c (dyld:arm64e+0x204e0)

Found with grammarinator integrated with libfuzzer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions