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 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed in parser_parse_switch_statement_start #5218

Open
renatahodovan opened this issue Mar 1, 2025 · 0 comments

Comments

@renatahodovan
Copy link
Contributor

JerryScript revision

5020015 (v3.0.0)

Build platform

Ubuntu 24.04.1 LTS (Linux 6.8.0-49-generic x86_64)

Build steps
./tools/build.py --clean --debug --compile-flag=-fsanitize=address --logging=on
Test case
switch (class of {
   #delete 
}){}
Output
ICE: Assertion 'context_p->next_scanner_info_p->source_p == context_p->source_p && context_p->next_scanner_info_p->type == SCANNER_TYPE_SWITCH' failed at jerryscript/src/jerry-core/parser/js/js-parser-statm.c(parser_parse_switch_statement_start):1666.
Error: JERRY_FATAL_FAILED_ASSERTION
==1909204== ERROR: libFuzzer: deadly signal
    #0 0x5593214e2545 in __sanitizer_print_stack_trace (jerryscript/basic/libfuzzer+0x1e9545) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #1 0x55932143648c in fuzzer::PrintStackTrace() (jerryscript/basic/libfuzzer+0x13d48c) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #2 0x55932141b5f7 in fuzzer::Fuzzer::CrashCallback() (jerryscript/basic/libfuzzer+0x1225f7) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #3 0x7f378504532f  (/lib/x86_64-linux-gnu/libc.so.6+0x4532f) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #4 0x7f378509eb2b in pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2b) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #5 0x7f378504527d in raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527d) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #6 0x7f37850288fe in abort (/lib/x86_64-linux-gnu/libc.so.6+0x288fe) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #7 0x55932169aa00 in jerry_port_fatal jerryscript/src/jerry-port/common/jerry-port-process.c:41:5
    #8 0x5593215ff6cd in jerry_fatal jerryscript/src/jerry-core/jrt/jrt-fatals.c:63:3
    #9 0x5593215ff78e in jerry_assert_fail jerryscript/src/jerry-core/jrt/jrt-fatals.c:83:3
    #10 0x559321634d0b in parser_parse_switch_statement_start jerryscript/src/jerry-core/parser/js/js-parser-statm.c:1665:3
    #11 0x559321637d48 in parser_parse_statements jerryscript/src/jerry-core/parser/js/js-parser-statm.c:2821:9
    #12 0x5593216452ab in parser_parse_source jerryscript/src/jerry-core/parser/js/js-parser.c:2280:5
    #13 0x55932164d499 in parser_parse_script jerryscript/src/jerry-core/parser/js/js-parser.c:3332:38
    #14 0x55932152d1d0 in jerry_parse_common jerryscript/src/jerry-core/api/jerryscript.c:413:21
    #15 0x55932152d604 in jerry_parse jerryscript/src/jerry-core/api/jerryscript.c:481:10
    #16 0x559321518475 in LLVMFuzzerTestOneInput jerryscript/src/jerry-main/main-libfuzzer.c:30:33
    #17 0x55932141cbca in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (jerryscript/basic/libfuzzer+0x123bca) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #18 0x559321404863 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) (jerryscript/basic/libfuzzer+0x10b863) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #19 0x55932140aa21 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (jerryscript/basic/libfuzzer+0x111a21) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #20 0x559321436ff6 in main (jerryscript/basic/libfuzzer+0x13dff6) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #21 0x7f378502a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #22 0x7f378502a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #23 0x5593213feff4 in _start (jerryscript/basic/libfuzzer+0x105ff4) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant