#include <cstdio>
int main() {
int x = -2147483648;
int y = -1;
printf("%d\n", x/y);
return 0;
}
Floating point exception (core dumped)
Program received signal SIGFPE, Arithmetic exception.
0x0000555555554664 in main ()
objdump -d [program name]
000000000000064a <main>:
64a: 55 push %rbp
64b: 48 89 e5 mov %rsp,%rbp
64e: 48 83 ec 10 sub $0x10,%rsp
652: c7 45 f8 00 00 00 80 movl $0x80000000,-0x8(%rbp)
659: c7 45 fc ff ff ff ff movl $0xffffffff,-0x4(%rbp)
660: 8b 45 f8 mov -0x8(%rbp),%eax
663: 99 cltd
664: f7 7d fc idivl -0x4(%rbp)
667: 89 c6 mov %eax,%esi
669: 48 8d 3d a4 00 00 00 lea 0xa4(%rip),%rdi # 714 <_IO_stdin_used+0x4>
670: b8 00 00 00 00 mov $0x0,%eax
675: e8 a6 fe ff ff callq 520 <printf@plt>
67a: b8 00 00 00 00 mov $0x0,%eax
67f: c9 leaveq
680: c3 retq
681: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
688: 00 00 00
68b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> quote:
... is positive and equal to 80'00'00'00