P4 to Git Change 1213734 by yaxunl@yaxunl_stg_win50 on 2015/11/23 11:02:59

SWDEV-82054 - [CQE OCL][QR][LNX] RQ Conformance "Integer_Ops" test is crashing on CPU; Faulty CL#1206023.

	In llvm32 by default llvm::DisablePrettyStackTrace is off, which causes a trap handler installed by default and interferes with the trap handler in runtime, causing unhandled SIGFPE exceptions when executing conformance/integer_ops on certain cpu.

	To fix this, put stack trace duping under an env var AMD_DUMP_STACK_TRACE and set llvm::DisablePrettyStackTrace=true by default.

	Here env var is used because there is still no elf binary at this stage to pass the compiler option to if_aclCompilerInit.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/v0_8/if_acl.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#86 edit


[ROCm/clr commit: ccc2b4ce79]
This commit is contained in:
foreman
2015-11-23 11:13:25 -05:00
parent 664b6c337d
commit 55dcd2f8fd
@@ -96,10 +96,11 @@ if_aclCompilerInit(aclCompiler *cl, aclBinary *bin,
#endif
));
}
#ifndef NDEBUG
llvm::EnablePrettyStackTrace();
llvm::sys::PrintStackTraceOnErrorSignal();
#endif
static const char *DumpStackTrace = getenv("AMD_DUMP_STACK_TRACE");
if (DumpStackTrace) {
llvm::EnablePrettyStackTrace();
llvm::sys::PrintStackTraceOnErrorSignal();
}
// Initialize targets first.
llvm::InitializeAllTargets();