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->type == SCANNER_TYPE_FUNCTION' failed at jerryscript/jerry-core/parser/js/js-parser.c(parser_parse_function_arguments) #5211

Open
paintedveil5 opened this issue Feb 23, 2025 · 0 comments

Comments

@paintedveil5
Copy link
Contributor

paintedveil5 commented Feb 23, 2025

JerryScript revision

5020015 (master)
v3.0.0

Build platform

Ubuntu 18.04.6 LTS (Linux 6.2.0-37-generic x86_64)

Build steps
/usr/bin/python3 ./tools/build.py --clean --debug --compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer --compile-flag=-fno-common --lto=off --error-message=on --system-allocator=on --compile-flag=-Wno-uninitialized --compile-flag=-Wno-missing-field-initializers --link-lib="m" --stack-limit=1024 --compile-flag=-fsanitize=address
Test case
//poc.js
!class   {
#new() {
} 
}
Execution steps & Output
./jerry poc.js 
Aborted (core dumped)
Backtrace
#0  0xf7fa6549 in __kernel_vsyscall ()
#1  0xf7757642 in raise () from /lib32/libc.so.6
#2  0xf7758a61 in abort () from /lib32/libc.so.6
#3  0x56815dc0 in jerry_port_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at /home/lily/jerryscript/jerry-port/common/jerry-port-process.c:41
#4  0x5670f10c in jerry_fatal (code=JERRY_FATAL_FAILED_ASSERTION) at /home/lily/jerryscript/jerry-core/jrt/jrt-fatals.c:63
#5  0x5670f12e in jerry_assert_fail (assertion=0x5684f060 "context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION", 
    file=0x5684e480 "/home/lily/jerryscript/jerry-core/parser/js/js-parser.c", function=0x568500a0 <__func__.7683> "parser_parse_function_arguments", line=1587)
    at /home/lily/jerryscript/jerry-core/jrt/jrt-fatals.c:83
#6  0x5671d78a in parser_parse_function_arguments (context_p=0xff8b49c0, end_type=LEXER_RIGHT_PAREN) at /home/lily/jerryscript/jerry-core/parser/js/js-parser.c:1587
#7  0x56725e4c in parser_parse_function (context_p=0xff8b49c0, status_flags=34603014) at /home/lily/jerryscript/jerry-core/parser/js/js-parser.c:2685
#8  0x567d98c7 in lexer_construct_function_object (context_p=0xff8b49c0, extra_status_flags=34603014) at /home/lily/jerryscript/jerry-core/parser/js/js-lexer.c:2725
#9  0x567e2a9f in parser_parse_class_body (context_p=0xff8b49c0, opts=PARSER_CLASS_LITERAL_NO_OPTS, class_name_index=65535)
    at /home/lily/jerryscript/jerry-core/parser/js/js-parser-expr.c:935
#10 0x567e4079 in parser_parse_class (context_p=0xff8b49c0, is_statement=false) at /home/lily/jerryscript/jerry-core/parser/js/js-parser-expr.c:1137
#11 0x567e925e in parser_parse_unary_expression (context_p=0xff8b49c0, grouping_level_p=0xff8b4400) at /home/lily/jerryscript/jerry-core/parser/js/js-parser-expr.c:2244
#12 0x567f3782 in parser_parse_expression (context_p=0xff8b49c0, options=2) at /home/lily/jerryscript/jerry-core/parser/js/js-parser-expr.c:4497
#13 0x567f319b in parser_parse_block_expression (context_p=0xff8b49c0, options=0) at /home/lily/jerryscript/jerry-core/parser/js/js-parser-expr.c:4447
#14 0x56809356 in parser_parse_statements (context_p=0xff8b49c0) at /home/lily/jerryscript/jerry-core/parser/js/js-parser-statm.c:3079
#15 0x567228e6 in parser_parse_source (source_p=0xff8b4c90, parse_opts=0, options_p=0xff8b4d80) at /home/lily/jerryscript/jerry-core/parser/js/js-parser.c:2280
#16 0x5672897a in parser_parse_script (source_p=0xff8b4c90, parse_opts=0, options_p=0xff8b4d80) at /home/lily/jerryscript/jerry-core/parser/js/js-parser.c:3332
#17 0x5665a2cd in jerry_parse_common (source_p=0xff8b4c90, options_p=0xff8b4d80, parse_opts=0) at /home/lily/jerryscript/jerry-core/api/jerryscript.c:413
#18 0x5665a680 in jerry_parse (source_p=0xf5b00940 "!class   {\n#new() {\n} \n}\n\n", source_size=26, options_p=0xff8b4d80) at /home/lily/jerryscript/jerry-core/api/jerryscript.c:481
#19 0x56814a6e in jerryx_source_parse_script (path_p=0xff8b5896 "poc.js") at /home/lily/jerryscript/jerry-ext/util/sources.c:52
#20 0x56814b6d in jerryx_source_exec_script (path_p=0xff8b5896 "poc.js") at /home/lily/jerryscript/jerry-ext/util/sources.c:63
#21 0x56655447 in main (argc=2, argv=0xff8b5014) at /home/lily/jerryscript/jerry-main/main-desktop.c:156
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