I wrote a very simple c program:
#include
int main(){
int a=2;
int b=0;
printf(\"%d\\n\", a/b);
}
and run it wi
Obviously this is because JVM has something like this in its code:
#include
#include
#include
void fpe_handler(int signum) {
printf("JVM throws an ArithmeticException here...\n");
exit (1);
}
int main() {
int a = 5;
int b = 0;
signal(SIGFPE, fpe_handler);
printf("%d\n", a / b);
return 0;
}
Also JVM runs multiple threads (see clone()
in the log above or do ps -eLf
when java is running) so that strace output is just incomplete.
If a little more detail, unhandled SIGFPE indicates an error in the program, in which it occurred. And if java would be killed by SIGFPE, it would indicate than an error is in JVM, but not in your app, running inside JVM.