Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 95ed1e1

Browse files
committed
Merging r303456:
------------------------------------------------------------------------ r303456 | eugenis | 2017-05-19 16:58:48 -0400 (Fri, 19 May 2017) | 3 lines [safestack] Disable stack coloring by default. Workaround for apparent miscompilation of PR32143. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@303687 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 1ddbad1 commit 95ed1e1

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

lib/CodeGen/SafeStackColoring.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ using namespace llvm::safestack;
2020

2121
#define DEBUG_TYPE "safestackcoloring"
2222

23+
// Disabled by default due to PR32143.
2324
static cl::opt<bool> ClColoring("safe-stack-coloring",
2425
cl::desc("enable safe stack coloring"),
25-
cl::Hidden, cl::init(true));
26+
cl::Hidden, cl::init(false));
2627

2728
const StackColoring::LiveRange &StackColoring::getLiveRange(AllocaInst *AI) {
2829
const auto IT = AllocaNumbering.find(AI);

test/Transforms/SafeStack/X86/coloring-ssp.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
1+
; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
22

33
; %x and %y share a stack slot between them, but not with the stack guard.
44
define void @f() safestack sspreq {

test/Transforms/SafeStack/X86/coloring.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
2-
; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
1+
; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
2+
; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
33

44
define void @f() safestack {
55
entry:

test/Transforms/SafeStack/X86/coloring2.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
2-
; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
1+
; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
2+
; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
33

44
; x and y share the stack slot.
55
define void @f() safestack {

test/Transforms/SafeStack/X86/layout-frag.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; Test that safestack layout reuses a region w/o fragmentation.
2-
; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
2+
; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
33

44
define void @f() safestack {
55
; CHECK-LABEL: define void @f

0 commit comments

Comments
 (0)