crashappsec / libcon4m

Base Compiler and Runtime Support for con4m
Apache License 2.0
0 stars 0 forks source link

division by zero produces SIGFPE #57

Closed ee7 closed 2 weeks ago

ee7 commented 2 weeks ago

With:

and the .c4m file:

x = 1/0

We get SIGFPE:

AddressSanitizer: FPE on unknown address 0x5de29ece7e4a (pc 0x5de29ece7e4a bp 0x7ffc9c7f6520 sp 0x7ffc9c7f23e0 T0)
SCARINESS: 10 (signal)
    #0 0x5de29ece7e4a in c4m_vm_runloop libcon4m/debug/../src/con4m/vm.c:949:36
    #1 0x5de29ecde4f9 in c4m_vmthread_run libcon4m/debug/../src/con4m/vm.c:1664:18
    #2 0x5de29ebf3919 in test_compiler libcon4m/debug/../src/tests/test.c:453:5
    #3 0x5de29ebf6231 in main libcon4m/debug/../src/tests/test.c:515:18
viega commented 2 weeks ago

Yes, was going to wait until I added a default signal handler, but went ahead and added the 0 test in my branch.