Skip to content

SEGV in parser_restore_private_context #5215

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

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

SEGV in parser_restore_private_context #5215

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 {
  #size = isPrototypeOf`\${v0 in class {}?.super}`
}
Output
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2075856==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x562d6b8e04b9 bp 0x7ffc38fcd440 sp 0x7ffc38fcd430 T0)
==2075856==The signal is caused by a READ memory access.
==2075856==Hint: address points to the zero page.
    #0 0x562d6b8e04b9 in parser_restore_private_context /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser.c:1558
    #1 0x562d6b99aa26 in parser_parse_class /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser-expr.c:1174
    #2 0x562d6b99faa7 in parser_parse_unary_expression /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser-expr.c:2244
    #3 0x562d6b9a992a in parser_parse_expression /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser-expr.c:4497
    #4 0x562d6b9b2a00 in parser_parse_while_statement_start /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser-statm.c:971
    #5 0x562d6b9bc35a in parser_parse_statements /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser-statm.c:2845
    #6 0x562d6b8e4ea2 in parser_parse_source /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser.c:2280
    #7 0x562d6b8ea483 in parser_parse_script /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser.c:3332
    #8 0x562d6b82a367 in jerry_parse_common /home/reni/work/sut/jerryscript/jerry-core/api/jerryscript.c:413
    #9 0x562d6b82a6cd in jerry_parse /home/reni/work/sut/jerryscript/jerry-core/api/jerryscript.c:481
    #10 0x562d6b9c83b0 in jerryx_source_parse_script /home/reni/work/sut/jerryscript/jerry-ext/util/sources.c:52
    #11 0x562d6b9c847f in jerryx_source_exec_script /home/reni/work/sut/jerryscript/jerry-ext/util/sources.c:63
    #12 0x562d6b82628e in main /home/reni/work/sut/jerryscript/jerry-main/main-desktop.c:156
    #13 0x7fc69b02a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #14 0x7fc69b02a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 42c84c92e6f98126b3e2230ebfdead22c235b667)
    #15 0x562d6b8257a4 in _start (/home/reni/work/sut/jerryscript/build/bin/jerry+0x507a4) (BuildId: 1fe4c90920b1efd7f2c01b773ae2af1036aacaee)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/reni/work/sut/jerryscript/jerry-core/parser/js/js-parser.c:1558 in parser_restore_private_context
==2075856==ABORTING
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