diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-05-19 20:58:48 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-05-19 20:58:48 +0000 |
| commit | 2acea2786b9fd40e1aba018b165834168535e164 (patch) | |
| tree | 414362127b3ea6e7396250819beb03ef91333eb7 | |
| parent | f525c76ba1b11b340b61ffe4a10571e86d819f03 (diff) | |
| download | bcm5719-llvm-2acea2786b9fd40e1aba018b165834168535e164.tar.gz bcm5719-llvm-2acea2786b9fd40e1aba018b165834168535e164.zip | |
[safestack] Disable stack coloring by default.
Workaround for apparent miscompilation of PR32143.
llvm-svn: 303456
| -rw-r--r-- | llvm/lib/CodeGen/SafeStackColoring.cpp | 3 | ||||
| -rw-r--r-- | llvm/test/Transforms/SafeStack/X86/coloring-ssp.ll | 2 | ||||
| -rw-r--r-- | llvm/test/Transforms/SafeStack/X86/coloring.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SafeStack/X86/coloring2.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SafeStack/X86/layout-frag.ll | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SafeStackColoring.cpp b/llvm/lib/CodeGen/SafeStackColoring.cpp index 09289f947dc..21f2fa49723 100644 --- a/llvm/lib/CodeGen/SafeStackColoring.cpp +++ b/llvm/lib/CodeGen/SafeStackColoring.cpp @@ -20,9 +20,10 @@ using namespace llvm::safestack; #define DEBUG_TYPE "safestackcoloring" +// Disabled by default due to PR32143. static cl::opt<bool> ClColoring("safe-stack-coloring", cl::desc("enable safe stack coloring"), - cl::Hidden, cl::init(true)); + cl::Hidden, cl::init(false)); const StackColoring::LiveRange &StackColoring::getLiveRange(AllocaInst *AI) { const auto IT = AllocaNumbering.find(AI); diff --git a/llvm/test/Transforms/SafeStack/X86/coloring-ssp.ll b/llvm/test/Transforms/SafeStack/X86/coloring-ssp.ll index 3b04fdf13fb..040632e7526 100644 --- a/llvm/test/Transforms/SafeStack/X86/coloring-ssp.ll +++ b/llvm/test/Transforms/SafeStack/X86/coloring-ssp.ll @@ -1,4 +1,4 @@ -; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s +; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s ; %x and %y share a stack slot between them, but not with the stack guard. define void @f() safestack sspreq { diff --git a/llvm/test/Transforms/SafeStack/X86/coloring.ll b/llvm/test/Transforms/SafeStack/X86/coloring.ll index 76bdf37dbf4..60e960e693d 100644 --- a/llvm/test/Transforms/SafeStack/X86/coloring.ll +++ b/llvm/test/Transforms/SafeStack/X86/coloring.ll @@ -1,5 +1,5 @@ -; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s -; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s +; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s +; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s define void @f() safestack { entry: diff --git a/llvm/test/Transforms/SafeStack/X86/coloring2.ll b/llvm/test/Transforms/SafeStack/X86/coloring2.ll index 2a8f871945f..ef00d9b5471 100644 --- a/llvm/test/Transforms/SafeStack/X86/coloring2.ll +++ b/llvm/test/Transforms/SafeStack/X86/coloring2.ll @@ -1,5 +1,5 @@ -; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s -; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s +; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s +; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s ; x and y share the stack slot. define void @f() safestack { diff --git a/llvm/test/Transforms/SafeStack/X86/layout-frag.ll b/llvm/test/Transforms/SafeStack/X86/layout-frag.ll index b127defc2c5..b9831c26b74 100644 --- a/llvm/test/Transforms/SafeStack/X86/layout-frag.ll +++ b/llvm/test/Transforms/SafeStack/X86/layout-frag.ll @@ -1,5 +1,5 @@ ; Test that safestack layout reuses a region w/o fragmentation. -; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s +; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s define void @f() safestack { ; CHECK-LABEL: define void @f |

