mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-07 06:14:02 +00:00
[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:
committed by
Don Porter
parent
90dae44640
commit
7bfb07025d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user