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

Float point error in mjs.c:8832 #299

Open
LowryLan opened this issue Oct 29, 2024 · 0 comments
Open

Float point error in mjs.c:8832 #299

LowryLan opened this issue Oct 29, 2024 · 0 comments

Comments

@LowryLan
Copy link

Enviroment

Ubuntu20.04

Step to reproduce

  1. download version
    9eae0e6
  2. compile mjs with ASAN
gcc -DMJS_MAIN mjs.c -fsanitize=address -ldl -g -o mjs-bin
  1. command for reproducing the error
./mjs-bin -f poc

Download poc:
stack-overflow-mjs8094.zip

###ASAN report

AddressSanitizer:DEADLYSIGNAL
=================================================================
==249053==ERROR: AddressSanitizer: FPE on unknown address 0x5555554925ba (pc 0x5555554925ba bp 0x7fffffffcea0 sp 0x7fffffffce60 T0)
    #0 0x5555554925ba in do_arith_op /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:8832
    #1 0x5555554925ba in do_op /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:8878
    #2 0x5555554ad1c7 in exec_expr /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:8948
    #3 0x5555554bc935 in mjs_execute /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:9554
    #4 0x5555554ceee7 in mjs_exec_internal /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:9737
    #5 0x55555540cbe8 in mjs_exec_file /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:9760
    #6 0x55555540cbe8 in main /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:12047
    #7 0x7ffff73fb082 in __libc_start_main ../csu/libc-start.c:308
    #8 0x55555540d26d in _start (/home/lowry/Documents/HTFuzz/program/mjs/code/mjs-bin+0xd26d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE /home/lowry/Documents/HTFuzz/program/mjs/code/mjs.c:8832 in do_arith_op
==249053==ABORTING

Debug info

Exception has occurred: Signal
signal SIGFPE: integer divide by zero
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