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_RIGHT_PAREN' failed in parser_parse_while_statement_start #5220

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
while (class {
   #delete;
}) continue;
Output
ICE: Assertion 'context_p->token.type != LEXER_RIGHT_PAREN' failed at jerryscript/src/jerry-core/parser/js/js-parser-statm.c(parser_parse_while_statement_start):973.
Error: JERRY_FATAL_FAILED_ASSERTION
==1908899== ERROR: libFuzzer: deadly signal
    #0 0x557fbbefb545 in __sanitizer_print_stack_trace (jerryscript/basic/libfuzzer+0x1e9545) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #1 0x557fbbe4f48c in fuzzer::PrintStackTrace() (jerryscript/basic/libfuzzer+0x13d48c) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #2 0x557fbbe345f7 in fuzzer::Fuzzer::CrashCallback() (jerryscript/basic/libfuzzer+0x1225f7) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #3 0x7f1c9064532f  (/lib/x86_64-linux-gnu/libc.so.6+0x4532f) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #4 0x7f1c9069eb2b in pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2b) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #5 0x7f1c9064527d in raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527d) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #6 0x7f1c906288fe in abort (/lib/x86_64-linux-gnu/libc.so.6+0x288fe) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #7 0x557fbc0b3a00 in jerry_port_fatal jerryscript/src/jerry-port/common/jerry-port-process.c:41:5
    #8 0x557fbc0186cd in jerry_fatal jerryscript/src/jerry-core/jrt/jrt-fatals.c:63:3
    #9 0x557fbc01878e in jerry_assert_fail jerryscript/src/jerry-core/jrt/jrt-fatals.c:83:3
    #10 0x557fbc0576bc in parser_parse_while_statement_start jerryscript/src/jerry-core/parser/js/js-parser-statm.c:973:5
    #11 0x557fbc0576bc in parser_parse_statements jerryscript/src/jerry-core/parser/js/js-parser-statm.c:2845:9
    #12 0x557fbc05e2ab in parser_parse_source jerryscript/src/jerry-core/parser/js/js-parser.c:2280:5
    #13 0x557fbc066499 in parser_parse_script jerryscript/src/jerry-core/parser/js/js-parser.c:3332:38
    #14 0x557fbbf461d0 in jerry_parse_common jerryscript/src/jerry-core/api/jerryscript.c:413:21
    #15 0x557fbbf46604 in jerry_parse jerryscript/src/jerry-core/api/jerryscript.c:481:10
    #16 0x557fbbf31475 in LLVMFuzzerTestOneInput jerryscript/src/jerry-main/main-libfuzzer.c:30:33
    #17 0x557fbbe35bca in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (jerryscript/basic/libfuzzer+0x123bca) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #18 0x557fbbe1d863 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) (jerryscript/basic/libfuzzer+0x10b863) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #19 0x557fbbe23a21 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (jerryscript/basic/libfuzzer+0x111a21) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #20 0x557fbbe4fff6 in main (jerryscript/basic/libfuzzer+0x13dff6) (BuildId: 932bc76ab7f7477eee554362851f38adbd14aaa0)
    #21 0x7f1c9062a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #22 0x7f1c9062a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #23 0x557fbbe17ff4 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