summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-02-11 20:00:22 +0000
committerdim <dim@FreeBSD.org>2016-02-11 20:00:22 +0000
commit86bef0867f0389dc03d4cd4913f5dee79377226f (patch)
treef7a28554499c6889d76fe1614893ae82258ef6ec
parent0abf59f0ae5e160f3fb5c4643207235649ce9618 (diff)
downloadFreeBSD-src-86bef0867f0389dc03d4cd4913f5dee79377226f.zip
FreeBSD-src-86bef0867f0389dc03d4cd4913f5dee79377226f.tar.gz
For now, disable shrink-wrapping (a new optimization pass that computes
the safe point to insert the prologue and epilogue of the function) on X86. This prevents problems with some functions using TLS, such as in jemalloc, and which was the cause for Address Sanitizer crashes. The correct fix is still being discussed upstream.
-rw-r--r--contrib/llvm/lib/Target/X86/X86FrameLowering.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp b/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp
index 7f8ce47..fad6ad9 100644
--- a/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -2593,6 +2593,9 @@ bool X86FrameLowering::canUseAsEpilogue(const MachineBasicBlock &MBB) const {
bool X86FrameLowering::enableShrinkWrapping(const MachineFunction &MF) const {
// If we may need to emit frameless compact unwind information, give
// up as this is currently broken: PR25614.
+#if 1
+ return false;
+#else
return (MF.getFunction()->hasFnAttribute(Attribute::NoUnwind) || hasFP(MF)) &&
// The lowering of segmented stack and HiPE only support entry blocks
// as prologue blocks: PR26107.
@@ -2601,6 +2604,7 @@ bool X86FrameLowering::enableShrinkWrapping(const MachineFunction &MF) const {
// - adjustForHiPEPrologue
MF.getFunction()->getCallingConv() != CallingConv::HiPE &&
!MF.shouldSplitStack();
+#endif
}
MachineBasicBlock::iterator X86FrameLowering::restoreWin32EHStackPointers(
OpenPOWER on IntegriCloud