Skip to content

Assertion 'context_p->scope_stack_size != 0' failed in scanner_create_variables #5345

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
function E(){throw class{static{}}}
{let E
Output
ICE: Assertion 'context_p->scope_stack_size != 0' failed at jerryscript/fresh/src/jerry-core/parser/js/js-scanner-util.c(scanner_create_variables):2475.
Error: JERRY_FATAL_FAILED_ASSERTION
AddressSanitizer:DEADLYSIGNAL
=================================================================
==85976==ERROR: AddressSanitizer: ABRT on unknown address 0x0001826485e8 (pc 0x0001826485e8 bp 0x00016d102ea0 sp 0x00016d102e80 T0)
    #0 0x0001826485e8 in __pthread_kill+0x8 (libsystem_kernel.dylib:arm64e+0x95e8)
    #1 0x000182589974 in abort+0x90 (libsystem_c.dylib:arm64e+0x78974)
    #2 0x000102e19118 in jerry_port_fatal jerry-port-process.c:41
    #3 0x000102da7ed4 in jerry_fatal jrt-fatals.c:63
    #4 0x000102da7f14 in jerry_assert_fail jrt-fatals.c:83
    #5 0x000102deac30 in scanner_create_variables js-scanner-util.c:2475
    #6 0x000102dd0a4c in parser_push_block_context js-parser-statm.c:346
    #7 0x000102dcc098 in parser_parse_statements js-parser-statm.c:2765
    #8 0x000102dd7bbc in parser_parse_function js-parser.c:2717
    #9 0x000102dd16d0 in parser_parse_function_statement js-parser-statm.c:756
    #10 0x000102dcbcd4 in parser_parse_statements js-parser-statm.c:2809
    #11 0x000102ddfe40 in parser_parse_source js-parser.c:2280
    #12 0x000102ddf3a0 in parser_parse_script js-parser.c:3332
    #13 0x000102cfd2a8 in jerry_parse_common jerryscript.c:413
    #14 0x000102cfd07c in jerry_parse jerryscript.c:481
    #15 0x000102e18194 in jerryx_source_parse_script sources.c:52
    #16 0x000102e18280 in jerryx_source_exec_script sources.c:63
    #17 0x000102cf9414 in main main-desktop.c:156
    #18 0x0001822b84e0 in start+0x1b4c (dyld:arm64e+0x204e0)

Found with grammarinator integrated with AFL++.

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