[Pal/Linux-SGX] Calculate event_num correctly for SIGFPE

In case of SIGFPE in host, 0 is passed as event_num.
It should be PAL_EVENT_DIVZERO.

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
This commit is contained in:
Isaku Yamahata
2019-02-19 09:49:12 -05:00
committed by Don Porter
parent 90dae44640
commit 7bfb07025d
+1 -10
View File
@@ -253,16 +253,7 @@ static void _DkResumeSighandler (int signum, siginfo_t * info,
INLINE_SYSCALL(exit, 1, 1);
}
int event = 0;
switch(signum) {
case SIGBUS:
case SIGSEGV:
event = PAL_EVENT_MEMFAULT;
break;
case SIGILL:
event = PAL_EVENT_ILLEGAL;
break;
}
int event = get_event_num(signum);
#if SGX_HAS_FSGSBASE != 0
sgx_raise(event);
#else