Skip to content

SIGFPE when executing a script #57

@tevador

Description

@tevador

Built from commit 09a4488 (linux x86_64).

Output from gdb:

$ gdb ~/moddable/build/bin/lin/debug/xst
(gdb) run -e "1+1"
Starting program: ~/moddable/build/bin/lin/debug/xst -e "1+1"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGFPE, Arithmetic exception.
0x000055555561d350 in fxNewParserSymbol (parser=0x7fffffffc110, theString=0x55555567854c "Object") at ~/moddable/xs/sources/xsScript.c:164
164             aModulo = aSum % parser->symbolModulo;
(gdb) bt
#0  0x000055555561d350 in fxNewParserSymbol (parser=0x7fffffffc110, theString=0x55555567854c "Object") at ~/moddable/xs/sources/xsScript.c:164
#1  0x000055555561cb1f in fxInitializeParser (parser=0x7fffffffc110, console=0x555555896030, bufferSize=0, symbolModulo=0) at ~/moddable/xs/sources/xsScript.c:65
#2  0x00005555555e6f07 in fxParseScript (the=0x555555896030, stream=0x7fffffffc480, getter=0x555555572338 <fxStringGetter>, flags=10) at ~/moddable/xs/sources/xsPlatforms.c:454
#3  0x000055555566e5c9 in fx_evalScript (the=0x555555896030) at ~/moddable/xs/tools/xst.c:1067
#4  0x00005555555ff4b2 in fxRunID (the=0x555555896030, generator=0x0, id=-1) at ~/moddable/xs/sources/xsRun.c:770
#5  0x0000555555575ae9 in fxCall (the=0x555555896030) at ~/moddable/xs/sources/xsAPI.c:1075
#6  0x0000555555575b96 in fxCallID (the=0x555555896030, theID=-32370) at ~/moddable/xs/sources/xsAPI.c:1083
#7  0x000055555566af9e in main (argc=3, argv=0x7fffffffe548) at ~/moddable/xs/tools/xst.c:255

Any ideas? Looks like there is division by zero during initialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions