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->token.type != LEXER_COLON' failed in parser_parse_case_statement #5219

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 (a){
  default : class b {
    static  #catch 
  }
  case !this :
Output
ICE: Assertion 'context_p->token.type != LEXER_COLON' failed at jerryscript/src/jerry-core/parser/js/js-parser-statm.c(parser_parse_case_statement):2033.
Error: JERRY_FATAL_FAILED_ASSERTION
==1931177== ERROR: libFuzzer: deadly signal
    #0 0x555d964bd545 in __sanitizer_print_stack_trace (jerryscript/basic/libfuzzer+0x1e9545) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #1 0x555d9641148c in fuzzer::PrintStackTrace() (jerryscript/basic/libfuzzer+0x13d48c) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #2 0x555d963f65f7 in fuzzer::Fuzzer::CrashCallback() (jerryscript/basic/libfuzzer+0x1225f7) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #3 0x7fb1cb04532f  (/lib/x86_64-linux-gnu/libc.so.6+0x4532f) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #4 0x7fb1cb09eb2b in pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2b) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #5 0x7fb1cb04527d in raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527d) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #6 0x7fb1cb0288fe in abort (/lib/x86_64-linux-gnu/libc.so.6+0x288fe) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #7 0x555d96675a00 in jerry_port_fatal jerryscript/src/jerry-port/common/jerry-port-process.c:41:5
    #8 0x555d965da6cd in jerry_fatal jerryscript/src/jerry-core/jrt/jrt-fatals.c:63:3
    #9 0x555d965da78e in jerry_assert_fail jerryscript/src/jerry-core/jrt/jrt-fatals.c:83:3
    #10 0x555d96619668 in parser_parse_case_statement jerryscript/src/jerry-core/parser/js/js-parser-statm.c:2033:5
    #11 0x555d96619668 in parser_parse_statements jerryscript/src/jerry-core/parser/js/js-parser-statm.c:2909:9
    #12 0x555d966202ab in parser_parse_source jerryscript/src/jerry-core/parser/js/js-parser.c:2280:5
    #13 0x555d96628499 in parser_parse_script jerryscript/src/jerry-core/parser/js/js-parser.c:3332:38
    #14 0x555d965081d0 in jerry_parse_common jerryscript/src/jerry-core/api/jerryscript.c:413:21
    #15 0x555d96508604 in jerry_parse jerryscript/src/jerry-core/api/jerryscript.c:481:10
    #16 0x555d964f3475 in LLVMFuzzerTestOneInput jerryscript/src/jerry-main/main-libfuzzer.c:30:33
    #17 0x555d963f7bca in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (jerryscript/basic/libfuzzer+0x123bca) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #18 0x555d963df863 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) (jerryscript/basic/libfuzzer+0x10b863) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #19 0x555d963e5a21 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (jerryscript/basic/libfuzzer+0x111a21) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #20 0x555d96411ff6 in main (jerryscript/basic/libfuzzer+0x13dff6) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #21 0x7fb1cb02a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #22 0x7fb1cb02a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #23 0x555d963d9ff4 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