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

SEGV in main_print_unhandled_exception #4403

Closed
owl337 opened this issue Jan 2, 2021 · 0 comments · Fixed by #4424
Closed

SEGV in main_print_unhandled_exception #4403

owl337 opened this issue Jan 2, 2021 · 0 comments · Fixed by #4424
Assignees
Labels
bug Undesired behaviour jerry-main Related to the jerry-main implementation

Comments

@owl337
Copy link

owl337 commented Jan 2, 2021

JerryScript revision

2faafa4

Build platform

Ubuntu 18.04.5 LTS(Linux 4.15.0-119-generic x86_64)

Build steps
./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g --strip=off \
--system-allocator=on --logging=on --linker-flag=-fuse-ld=gold \
--error-messages=on --profile=es2015-subset  --builddir=$PWD/build
Test case
throw new SyntaxError("[0: 98, 1: 54, 8: false, 10: 21, foo: bar]");
Output
Error: Failed to open file: 0
ASAN:DEADLYSIGNAL
=================================================================
==13994==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000 (pc 0x5678dd4b bp 0xffca4f88 sp 0xffca4d10 T0)
==13994==The signal is caused by a READ memory access.
==13994==Hint: address points to the zero page.
    #0 0x5678dd4a in main_print_unhandled_exception /root/jerryscript/jerry-main/main-utils.c:341
    #1 0x5678baae in main /root/jerryscript/jerry-main/main-unix.c:140
    #2 0xf7760f20 in __libc_start_main (/lib32/libc.so.6+0x18f20)
    #3 0x5662c3d0  (/root/jerryscript/build/bin/jerry+0x1d3d0)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/jerryscript/jerry-main/main-utils.c:341 in main_print_unhandled_exception
==13994==ABORTING

Credits: Found by chong from OWL337.

@rerobika rerobika self-assigned this Jan 5, 2021
@rerobika rerobika added the bug Undesired behaviour label Jan 5, 2021
rerobika pushed a commit to rerobika/jerryscript that referenced this issue Jan 5, 2021
This patch fixes jerryscript-project#4403.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
@akosthekiss akosthekiss added the jerry-main Related to the jerry-main implementation label Jan 5, 2021
rerobika pushed a commit to rerobika/jerryscript that referenced this issue Jan 6, 2021
This patch fixes jerryscript-project#4403.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
rerobika pushed a commit to rerobika/jerryscript that referenced this issue Jan 6, 2021
This patch fixes jerryscript-project#4403.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
rerobika pushed a commit to rerobika/jerryscript that referenced this issue Jan 8, 2021
This patch fixes jerryscript-project#4403.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
dbatyai pushed a commit that referenced this issue Jan 8, 2021
#4424)

This patch fixes #4403.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour jerry-main Related to the jerry-main implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants