P4 to Git Change 1102693 by jsjodin@jsjodin_linux_avx_hsa on 2014/12/04 17:11:26
ECR #304775 - Change the way SIGFPE is handled. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpucommand.hpp#38 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os_posix.cpp#39 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os_win32.cpp#42 edit ... //depot/stg/opencl/drivers/opencl/runtime/thread/thread.hpp#14 edit
Cette révision appartient à :
@@ -96,18 +96,7 @@ divisionErrorHandler(int sig, siginfo_t* info, void* ptr)
|
||||
assert(!"Unimplemented");
|
||||
#endif
|
||||
|
||||
// Call the chained signal handler
|
||||
if (callOldSignalHandler(sig, info, ptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// @todo: only handle exception in the generated code.
|
||||
//
|
||||
//if (!isKernelCode(insn)) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (sig == SIGFPE && info->si_code == FPE_INTDIV) {
|
||||
if(Thread::current()->isWorkerThread()) {
|
||||
if (Os::skipIDIV(insn)) {
|
||||
#if defined(ATI_ARCH_X86)
|
||||
uc->uc_mcontext.gregs[LP64_SWITCH(REG_EIP,REG_RIP)] = (greg_t)insn;
|
||||
@@ -118,6 +107,12 @@ divisionErrorHandler(int sig, siginfo_t* info, void* ptr)
|
||||
}
|
||||
}
|
||||
|
||||
// Call the chained signal handler
|
||||
if (callOldSignalHandler(sig, info, ptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
std::cerr << "Unhandled signal in divisionErrorHandler()" << std::endl;
|
||||
::abort();
|
||||
}
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur