up to 1.4.0+20180522

OBS-URL: https://build.opensuse.org/package/show/devel:tools:statica/klee?expand=0&rev=43
This commit is contained in:
Jiri Slaby 2018-05-23 12:32:10 +00:00 committed by Git OBS Bridge
parent c5fd26f59f
commit 660884f541
27 changed files with 1680 additions and 586 deletions

View File

@ -44,12 +44,12 @@ index 70c14050e8e7..72b866cf6395 100644
Instruction *argp =
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
index 10b5df0864f0..4846b4ce72b3 100644
index 2ac9db62f67d..3729ff82cd9d 100644
--- a/lib/Module/IntrinsicCleaner.cpp
+++ b/lib/Module/IntrinsicCleaner.cpp
@@ -82,11 +82,15 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
Value *pSrc = CastInst::CreatePointerCast(src, i64p, "vacopy.cast.src", ii);
Value *val = new LoadInst(pSrc, std::string(), ii); new StoreInst(val, pDst, ii);
@@ -86,12 +86,16 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
Value *val = new LoadInst(pSrc, std::string(), ii);
new StoreInst(val, pDst, ii);
Value *off = ConstantInt::get(Type::getInt64Ty(ctx), 1);
- pDst = GetElementPtrInst::Create(pDst, off, std::string(), ii);
- pSrc = GetElementPtrInst::Create(pSrc, off, std::string(), ii);
@ -57,16 +57,17 @@ index 10b5df0864f0..4846b4ce72b3 100644
+ pDst, off, std::string(), ii);
+ pSrc = GetElementPtrInst::Create(KLEE_LLVM_GEP_TYPE(nullptr)
+ pSrc, off, std::string(), ii);
val = new LoadInst(pSrc, std::string(), ii); new StoreInst(val, pDst, ii);
val = new LoadInst(pSrc, std::string(), ii);
new StoreInst(val, pDst, ii);
- pDst = GetElementPtrInst::Create(pDst, off, std::string(), ii);
- pSrc = GetElementPtrInst::Create(pSrc, off, std::string(), ii);
+ pDst = GetElementPtrInst::Create(KLEE_LLVM_GEP_TYPE(nullptr)
+ pDst, off, std::string(), ii);
+ pSrc = GetElementPtrInst::Create(KLEE_LLVM_GEP_TYPE(nullptr)
+ pSrc, off, std::string(), ii);
val = new LoadInst(pSrc, std::string(), ii); new StoreInst(val, pDst, ii);
val = new LoadInst(pSrc, std::string(), ii);
new StoreInst(val, pDst, ii);
}
ii->removeFromParent();
--
2.16.3
2.17.0

View File

@ -5,11 +5,11 @@ Patch-mainline: no
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
include/klee/Internal/Support/FloatEvaluation.h | 7 ++++++
lib/Module/InstructionInfoTable.cpp | 6 +++++
lib/Module/ModuleUtil.cpp | 30 +++++++++++++++++++++----
lib/Module/Optimize.cpp | 4 +++-
lib/Module/RaiseAsm.cpp | 5 ++++-
.../klee/Internal/Support/FloatEvaluation.h | 7 +++++
lib/Module/InstructionInfoTable.cpp | 6 ++++
lib/Module/ModuleUtil.cpp | 30 ++++++++++++++++---
lib/Module/Optimize.cpp | 4 ++-
lib/Module/RaiseAsm.cpp | 5 +++-
tools/klee/main.cpp | 1 +
6 files changed, 47 insertions(+), 6 deletions(-)
@ -173,5 +173,5 @@ index 44bc5407e9c8..ab9dfe286ffb 100644
#include "llvm/Support/TargetSelect.h"
--
2.16.3
2.17.0

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ Subject: llvm37: handle getRegisteredOptions
Patch-mainline: no
In LLVM 3.7 and later, getRegisteredOptions takes no arguments and
return the map.
returns the map directly.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
@ -29,5 +29,5 @@ index aaba72f4b5b7..3c117db9fa7b 100644
i++) {
if (i->second->Category != &Category) {
--
2.16.3
2.17.0

View File

@ -7,18 +7,18 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Core/Executor.cpp | 5 +++++
lib/Core/StatsTracker.cpp | 4 ++++
lib/Module/IntrinsicCleaner.cpp | 10 +++++++++-
lib/Module/LowerSwitch.cpp | 8 ++++++++
lib/Module/ModuleUtil.cpp | 39 +++++++++++++++++++++++++++++++++------
lib/Module/Optimize.cpp | 13 ++++++++++++-
tools/klee/main.cpp | 7 ++++++-
lib/Module/IntrinsicCleaner.cpp | 10 ++++++++-
lib/Module/LowerSwitch.cpp | 8 +++++++
lib/Module/ModuleUtil.cpp | 39 ++++++++++++++++++++++++++++-----
lib/Module/Optimize.cpp | 13 ++++++++++-
tools/klee/main.cpp | 7 +++++-
7 files changed, 77 insertions(+), 9 deletions(-)
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index f7c71e8d2dfc..a7d2eaac2a18 100644
index f0781e5b882a..2c7e8d4d52a6 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -2212,8 +2212,13 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
@@ -2210,8 +2210,13 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
!fpWidthToSemantics(right->getWidth()))
return terminateStateOnExecError(state, "Unsupported FRem operation");
llvm::APFloat Res(*fpWidthToSemantics(left->getWidth()), left->getAPValue());
@ -33,7 +33,7 @@ index f7c71e8d2dfc..a7d2eaac2a18 100644
break;
}
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index d9ec35aa3405..76f079a81cfd 100644
index f2a989e28439..7881f0e84be5 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -637,7 +637,11 @@ static std::vector<Instruction*> getSuccs(Instruction *i) {
@ -49,26 +49,26 @@ index d9ec35aa3405..76f079a81cfd 100644
return res;
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
index 4846b4ce72b3..6b08ef40e09e 100644
index 3729ff82cd9d..e10e886e8915 100644
--- a/lib/Module/IntrinsicCleaner.cpp
+++ b/lib/Module/IntrinsicCleaner.cpp
@@ -52,6 +52,10 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
for (BasicBlock::iterator i = b.begin(), ie = b.end();
(i != ie) && (block_split == false);) {
@@ -50,6 +50,10 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
unsigned WordSize = DataLayout.getPointerSizeInBits() / 8;
for (BasicBlock::iterator i = b.begin(), ie = b.end(); i != ie;) {
IntrinsicInst *ii = dyn_cast<IntrinsicInst>(&*i);
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
+ // create a copy of iterator to pass to IRBuilder ctor later
+ BasicBlock::iterator i_ = i;
+#endif
// increment now since LowerIntrinsic deletion makes iterator invalid.
// increment now since deletion of instructions makes iterator invalid.
++i;
if(ii) {
@@ -104,8 +108,12 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
if (ii) {
@@ -110,8 +114,12 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
case Intrinsic::uadd_with_overflow:
case Intrinsic::usub_with_overflow:
case Intrinsic::umul_with_overflow: {
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
+ // ctor needs the iterator, but we already increased our one
+ // ctor needs the iterator, but we already increased ours
+ IRBuilder<> builder(ii->getParent(), i_);
+#else
IRBuilder<> builder(ii->getParent(), ii);
@ -266,5 +266,5 @@ index ab9dfe286ffb..3d73ae07fcb5 100644
// create directory and try to link klee-last
if (mkdir(d.c_str(), 0775) == 0) {
--
2.16.3
2.17.0

View File

@ -15,10 +15,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
7 files changed, 98 insertions(+), 5 deletions(-)
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index a7d2eaac2a18..3d54af877844 100644
index 2c7e8d4d52a6..b2178cccefd2 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1307,10 +1307,18 @@ void Executor::executeCall(ExecutionState &state,
@@ -1305,10 +1305,18 @@ void Executor::executeCall(ExecutionState &state,
//
// Alignment requirements for scalar types is the same as their size
if (argWidth > Expr::Int64) {
@ -37,7 +37,7 @@ index a7d2eaac2a18..3d54af877844 100644
}
}
@@ -1343,10 +1351,18 @@ void Executor::executeCall(ExecutionState &state,
@@ -1341,10 +1349,18 @@ void Executor::executeCall(ExecutionState &state,
Expr::Width argWidth = arguments[i]->getWidth();
if (argWidth > Expr::Int64) {
@ -288,5 +288,5 @@ index 3d73ae07fcb5..c0ea4fa54551 100644
if (Watchdog) {
if (MaxTime==0) {
--
2.16.3
2.17.0

View File

@ -3,43 +3,31 @@ Date: Wed, 1 Nov 2017 09:25:47 +0100
Subject: llvm38: test, change some tests
Patch-mainline: no
alias in LLVM 3.8 has a new format, it adds a AliaseeTy parameter. So
alias in LLVM 3.8 has a new format, it adds an AliaseeTy parameter. So
handle this in the tests.
[v2] add comments about what was changed and why
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
test/Feature/BitcastAlias.llvm37.ll | 1 +
test/Feature/BitcastAlias.llvm38.ll | 38 +++++++++++++++++++++++++++++++++
test/Feature/BitcastAliasMD2U.llvm37.ll | 1 +
test/Feature/BitcastAliasMD2U.llvm38.ll | 38 +++++++++++++++++++++++++++++++++
4 files changed, 78 insertions(+)
create mode 100644 test/Feature/BitcastAlias.llvm38.ll
create mode 100644 test/Feature/BitcastAliasMD2U.llvm38.ll
test/Feature/BitcastAlias.leq37.ll | 38 ++++++++++++++++++++++++++
test/Feature/BitcastAlias.ll | 5 ++--
test/Feature/BitcastAliasMD2U.leq37.ll | 38 ++++++++++++++++++++++++++
test/Feature/BitcastAliasMD2U.ll | 5 ++--
4 files changed, 82 insertions(+), 4 deletions(-)
create mode 100644 test/Feature/BitcastAlias.leq37.ll
create mode 100644 test/Feature/BitcastAliasMD2U.leq37.ll
diff --git a/test/Feature/BitcastAlias.llvm37.ll b/test/Feature/BitcastAlias.llvm37.ll
index 5bd301936e13..e860acb24594 100644
--- a/test/Feature/BitcastAlias.llvm37.ll
+++ b/test/Feature/BitcastAlias.llvm37.ll
@@ -1,6 +1,7 @@
; LLVM 3.7 requires a type as the first argument to 'getelementptr'
; LLVM 3.7 no longer accepts '*' with a 'call'
; REQUIRES: geq-llvm-3.7
+; REQUIRES: lt-llvm-3.8
; RUN: llvm-as %s -f -o %t1.bc
; RUN: rm -rf %t.klee-out
; RUN: %klee --output-dir=%t.klee-out -disable-opt %t1.bc > %t2
diff --git a/test/Feature/BitcastAlias.llvm38.ll b/test/Feature/BitcastAlias.llvm38.ll
diff --git a/test/Feature/BitcastAlias.leq37.ll b/test/Feature/BitcastAlias.leq37.ll
new file mode 100644
index 000000000000..5111f18e53aa
index 000000000000..e860acb24594
--- /dev/null
+++ b/test/Feature/BitcastAlias.llvm38.ll
+++ b/test/Feature/BitcastAlias.leq37.ll
@@ -0,0 +1,38 @@
+; LLVM 3.8 requires a type as the first argument to 'alias'
+; LLVM 3.7 requires a type as the first argument to 'getelementptr'
+; LLVM 3.7 no longer accepts '*' with a 'call'
+; REQUIRES: geq-llvm-3.8
+; REQUIRES: geq-llvm-3.7
+; REQUIRES: lt-llvm-3.8
+; RUN: llvm-as %s -f -o %t1.bc
+; RUN: rm -rf %t.klee-out
+; RUN: %klee --output-dir=%t.klee-out -disable-opt %t1.bc > %t2
@ -48,7 +36,7 @@ index 000000000000..5111f18e53aa
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-unknown-linux-gnu"
+
+@foo = alias i32 (i32), i32 (i32)* @__foo
+@foo = alias i32 (i32)* @__foo
+
+define i32 @__foo(i32 %i) nounwind {
+entry:
@ -74,28 +62,38 @@ index 000000000000..5111f18e53aa
+ %1 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.failstr, i64 0, i64 0)) nounwind
+ ret i32 0
+}
diff --git a/test/Feature/BitcastAliasMD2U.llvm37.ll b/test/Feature/BitcastAliasMD2U.llvm37.ll
index 7eddd3d6a01c..c29ec8a62243 100644
--- a/test/Feature/BitcastAliasMD2U.llvm37.ll
+++ b/test/Feature/BitcastAliasMD2U.llvm37.ll
diff --git a/test/Feature/BitcastAlias.ll b/test/Feature/BitcastAlias.ll
index 5bd301936e13..5111f18e53aa 100644
--- a/test/Feature/BitcastAlias.ll
+++ b/test/Feature/BitcastAlias.ll
@@ -1,6 +1,7 @@
+; LLVM 3.8 requires a type as the first argument to 'alias'
; LLVM 3.7 requires a type as the first argument to 'getelementptr'
; LLVM 3.7 no longer accepts '*' with a 'call'
; REQUIRES: geq-llvm-3.7
+; REQUIRES: lt-llvm-3.8
-; REQUIRES: geq-llvm-3.7
+; REQUIRES: geq-llvm-3.8
; RUN: llvm-as %s -f -o %t1.bc
; RUN: rm -rf %t.klee-out
; RUN: %klee --output-dir=%t.klee-out -disable-opt -search=nurs:md2u %t1.bc > %t2
diff --git a/test/Feature/BitcastAliasMD2U.llvm38.ll b/test/Feature/BitcastAliasMD2U.llvm38.ll
; RUN: %klee --output-dir=%t.klee-out -disable-opt %t1.bc > %t2
@@ -9,7 +10,7 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
-@foo = alias i32 (i32)* @__foo
+@foo = alias i32 (i32), i32 (i32)* @__foo
define i32 @__foo(i32 %i) nounwind {
entry:
diff --git a/test/Feature/BitcastAliasMD2U.leq37.ll b/test/Feature/BitcastAliasMD2U.leq37.ll
new file mode 100644
index 000000000000..7ef74a8da43c
index 000000000000..c29ec8a62243
--- /dev/null
+++ b/test/Feature/BitcastAliasMD2U.llvm38.ll
+++ b/test/Feature/BitcastAliasMD2U.leq37.ll
@@ -0,0 +1,38 @@
+; LLVM 3.8 requires a type as the first argument to 'alias'
+; LLVM 3.7 requires a type as the first argument to 'getelementptr'
+; LLVM 3.7 no longer accepts '*' with a 'call'
+; REQUIRES: geq-llvm-3.8
+; REQUIRES: geq-llvm-3.7
+; REQUIRES: lt-llvm-3.8
+; RUN: llvm-as %s -f -o %t1.bc
+; RUN: rm -rf %t.klee-out
+; RUN: %klee --output-dir=%t.klee-out -disable-opt -search=nurs:md2u %t1.bc > %t2
@ -104,7 +102,7 @@ index 000000000000..7ef74a8da43c
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-unknown-linux-gnu"
+
+@foo = alias i32 (i32), i32 (i32)* @__foo
+@foo = alias i32 (i32)* @__foo
+
+define i32 @__foo(i32 %i) nounwind {
+entry:
@ -130,6 +128,28 @@ index 000000000000..7ef74a8da43c
+ %1 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.failstr, i64 0, i64 0)) nounwind
+ ret i32 0
+}
--
2.16.3
diff --git a/test/Feature/BitcastAliasMD2U.ll b/test/Feature/BitcastAliasMD2U.ll
index 7eddd3d6a01c..7ef74a8da43c 100644
--- a/test/Feature/BitcastAliasMD2U.ll
+++ b/test/Feature/BitcastAliasMD2U.ll
@@ -1,6 +1,7 @@
+; LLVM 3.8 requires a type as the first argument to 'alias'
; LLVM 3.7 requires a type as the first argument to 'getelementptr'
; LLVM 3.7 no longer accepts '*' with a 'call'
-; REQUIRES: geq-llvm-3.7
+; REQUIRES: geq-llvm-3.8
; RUN: llvm-as %s -f -o %t1.bc
; RUN: rm -rf %t.klee-out
; RUN: %klee --output-dir=%t.klee-out -disable-opt -search=nurs:md2u %t1.bc > %t2
@@ -9,7 +10,7 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
-@foo = alias i32 (i32)* @__foo
+@foo = alias i32 (i32), i32 (i32)* @__foo
define i32 @__foo(i32 %i) nounwind {
entry:
--
2.17.0

View File

@ -84,5 +84,5 @@ index c0ea4fa54551..154a76feb361 100644
#include <signal.h>
#include <unistd.h>
--
2.16.3
2.17.0

View File

@ -9,10 +9,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
1 file changed, 9 insertions(+)
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 3d54af877844..dca1fe3a6b93 100644
index b2178cccefd2..75132e0db71b 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1450,12 +1450,21 @@ static bool isDebugIntrinsic(const Function *f, KModule *KM) {
@@ -1448,12 +1448,21 @@ static bool isDebugIntrinsic(const Function *f, KModule *KM) {
static inline const llvm::fltSemantics * fpWidthToSemantics(unsigned width) {
switch(width) {
@ -35,5 +35,5 @@ index 3d54af877844..dca1fe3a6b93 100644
return 0;
}
--
2.16.3
2.17.0

View File

@ -5,7 +5,7 @@ Patch-mainline: no
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Module/ModuleUtil.cpp | 50 ++++++++++++++++++++++++++++++++++++++---------
lib/Module/ModuleUtil.cpp | 50 ++++++++++++++++++++++++++++++++-------
1 file changed, 41 insertions(+), 9 deletions(-)
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
@ -124,5 +124,5 @@ index 8aa070743048..ad847de0b368 100644
#else
if (auto ec = module->materializeAllPermanently()) {
--
2.16.3
2.17.0

View File

@ -8,11 +8,11 @@ chrono. So switch to that in klee for LLVM 4.0 too.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
include/klee/Internal/Support/Timer.h | 8 ++++++++
include/klee/Internal/System/Time.h | 11 +++++++++++
lib/Core/StatsTracker.cpp | 24 ++++++++++++++++++++++++
lib/Support/Time.cpp | 32 ++++++++++++++++++++++++++++++++
lib/Support/Timer.cpp | 16 ++++++++++++++++
include/klee/Internal/Support/Timer.h | 8 +++++++
include/klee/Internal/System/Time.h | 11 +++++++++
lib/Core/StatsTracker.cpp | 24 ++++++++++++++++++++
lib/Support/Time.cpp | 32 +++++++++++++++++++++++++++
lib/Support/Timer.cpp | 16 ++++++++++++++
5 files changed, 91 insertions(+)
diff --git a/include/klee/Internal/Support/Timer.h b/include/klee/Internal/Support/Timer.h
@ -69,7 +69,7 @@ index 220e260c975e..12522c866439 100644
}
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index 76f079a81cfd..246c106cc9f4 100644
index 7881f0e84be5..0be727fbc346 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -286,6 +286,29 @@ void StatsTracker::done() {
@ -195,5 +195,5 @@ index da96981079ae..a223b39ada57 100644
+
+#endif
--
2.16.3
2.17.0

View File

@ -8,7 +8,7 @@ So handle the type specially whenever needed.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
include/klee/util/GetElementPtrTypeIterator.h | 4 ++++
lib/Core/Executor.cpp | 22 +++++++++++++++++++---
lib/Core/Executor.cpp | 22 ++++++++++++++++---
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/include/klee/util/GetElementPtrTypeIterator.h b/include/klee/util/GetElementPtrTypeIterator.h
@ -27,10 +27,10 @@ index 5fb9f4ec5c2f..bf7cb6ff0bea 100644
CurTy = 0;
}
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index dca1fe3a6b93..50a6345e8767 100644
index 75132e0db71b..1c08870b7a20 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -2600,8 +2600,7 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
@@ -2598,8 +2598,7 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
uint64_t addend = sl->getElementOffset((unsigned) ci->getZExtValue());
constantOffset = constantOffset->Add(ConstantExpr::alloc(addend,
Context::get().getPointerWidth()));
@ -40,7 +40,7 @@ index dca1fe3a6b93..50a6345e8767 100644
uint64_t elementSize =
kmodule->targetData->getTypeStoreSize(set->getElementType());
Value *operand = ii.getOperand();
@@ -2615,7 +2614,24 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
@@ -2613,7 +2612,24 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
} else {
kgepi->indices.push_back(std::make_pair(index, elementSize));
}
@ -67,5 +67,5 @@ index dca1fe3a6b93..50a6345e8767 100644
}
kgepi->offset = constantOffset->getZExtValue();
--
2.16.3
2.17.0

View File

@ -12,7 +12,7 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/lib/Core/ExecutorUtil.cpp b/lib/Core/ExecutorUtil.cpp
index a0f4de3dc43a..6397443647ec 100644
index a352db3339c4..7718ae9d0ccb 100644
--- a/lib/Core/ExecutorUtil.cpp
+++ b/lib/Core/ExecutorUtil.cpp
@@ -213,7 +213,11 @@ namespace klee {
@ -28,5 +28,5 @@ index a0f4de3dc43a..6397443647ec 100644
const StructLayout *SL = kmodule->targetData->getStructLayout(STy);
base = base->Add(
--
2.16.3
2.17.0

View File

@ -46,5 +46,5 @@ index 154a76feb361..def83b584167 100644
args.push_back(Constant::getNullValue(ft->getParamType(4))); // app_fini
args.push_back(Constant::getNullValue(ft->getParamType(5))); // rtld_fini
--
2.16.3
2.17.0

View File

@ -28,5 +28,5 @@ index f73d1614c250..5433d9211ead 100644
}
}
--
2.16.3
2.17.0

View File

@ -12,9 +12,9 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
include/klee/Config/Version.h | 6 ++++++
lib/Module/Checks.cpp | 8 ++++----
lib/Module/IntrinsicCleaner.cpp | 2 +-
lib/Module/IntrinsicCleaner.cpp | 3 ++-
tools/klee/main.cpp | 20 ++++++++++----------
4 files changed, 21 insertions(+), 15 deletions(-)
4 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/include/klee/Config/Version.h b/include/klee/Config/Version.h
index 532051602fe3..a02ce28baaae 100644
@ -58,15 +58,16 @@ index aac63e1d9854..406b3045e527 100644
}
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
index 6b08ef40e09e..c9e909272b33 100644
index e10e886e8915..d4f93bdc591e 100644
--- a/lib/Module/IntrinsicCleaner.cpp
+++ b/lib/Module/IntrinsicCleaner.cpp
@@ -208,7 +208,7 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
@@ -214,7 +214,8 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
// Intrisic instruction "llvm.trap" found. Directly lower it to
// a call of the abort() function.
Function *F = cast<Function>(
M.getOrInsertFunction(
- "abort", Type::getVoidTy(ctx), NULL));
+ "abort", Type::getVoidTy(ctx) KLEE_LLVM_GOIF_TERMINATOR));
- M.getOrInsertFunction("abort", Type::getVoidTy(ctx), NULL));
+ M.getOrInsertFunction("abort", Type::getVoidTy(ctx)
+ KLEE_LLVM_GOIF_TERMINATOR));
F->setDoesNotReturn();
F->setDoesNotThrow();
@ -115,5 +116,5 @@ index def83b584167..ff87d210b863 100644
f = mainModule->getFunction("__ctype_get_mb_cur_max");
--
2.16.3
2.17.0

View File

@ -15,10 +15,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 50a6345e8767..5411efe36402 100644
index 1c08870b7a20..ee6821b6dc18 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1643,7 +1643,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
@@ -1641,7 +1641,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
// switch to an internal rep.
llvm::IntegerType *Ty = cast<IntegerType>(si->getCondition()->getType());
ConstantInt *ci = ConstantInt::get(Ty, CE->getZExtValue());
@ -31,5 +31,5 @@ index 50a6345e8767..5411efe36402 100644
} else {
// Handle possible different branch targets
--
2.16.3
2.17.0

View File

@ -65,5 +65,5 @@ index ad847de0b368..5f967410568c 100644
Expected<std::unique_ptr<object::Binary> > arch =
object::createBinary(Buffer, &Context);
--
2.16.3
2.17.0

View File

@ -13,10 +13,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 5411efe36402..5353f581ab36 100644
index ee6821b6dc18..9004b46e8f15 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -2296,7 +2296,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
@@ -2294,7 +2294,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
llvm::APFloat Arg(*fpWidthToSemantics(arg->getWidth()), arg->getAPValue());
uint64_t value = 0;
bool isExact = true;
@ -30,7 +30,7 @@ index 5411efe36402..5353f581ab36 100644
llvm::APFloat::rmTowardZero, &isExact);
bindLocal(ki, state, ConstantExpr::alloc(value, resultType));
break;
@@ -2313,7 +2318,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
@@ -2311,7 +2316,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
uint64_t value = 0;
bool isExact = true;
@ -45,5 +45,5 @@ index 5411efe36402..5353f581ab36 100644
bindLocal(ki, state, ConstantExpr::alloc(value, resultType));
break;
--
2.16.3
2.17.0

View File

@ -35,5 +35,5 @@ index ff87d210b863..c85fee861f03 100644
/* Insert void klee_init_env(int* argc, char*** argv) */
std::vector<const Type*> params;
--
2.16.3
2.17.0

View File

@ -0,0 +1,85 @@
From: Jiri Slaby <jirislaby@gmail.com>
Date: Mon, 21 May 2018 15:12:44 +0200
Subject: llvm60: SetVersionPrinter now passes down a stream
Patch-mainline: no
I.e. klee::printVersion should now have a parameter -- the output
stream. Change both the prototype and the implementation to handle this
properly.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
include/klee/Internal/Support/PrintVersion.h | 8 +++++++
lib/Support/PrintVersion.cpp | 23 ++++++++++++++------
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/klee/Internal/Support/PrintVersion.h b/include/klee/Internal/Support/PrintVersion.h
index 2c375ad2b946..87f73a002914 100644
--- a/include/klee/Internal/Support/PrintVersion.h
+++ b/include/klee/Internal/Support/PrintVersion.h
@@ -10,8 +10,16 @@
#ifndef KLEE_PRINT_VERSION_H
#define KLEE_PRINT_VERSION_H
+#include "llvm/Support/raw_ostream.h"
+
+#include "klee/Config/Version.h"
+
namespace klee {
+#if LLVM_VERSION_CODE >= LLVM_VERSION(6, 0)
+ void printVersion(llvm::raw_ostream &OS);
+#else
void printVersion();
+#endif
}
#endif
diff --git a/lib/Support/PrintVersion.cpp b/lib/Support/PrintVersion.cpp
index d39249df023f..b7f2b6ff347a 100644
--- a/lib/Support/PrintVersion.cpp
+++ b/lib/Support/PrintVersion.cpp
@@ -9,25 +9,34 @@
#include "klee/Internal/Support/PrintVersion.h"
#include "klee/Config/config.h"
+#include "klee/Config/Version.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/CommandLine.h"
#include "klee/Config/CompileTimeInfo.h"
+#if LLVM_VERSION_CODE >= LLVM_VERSION(6, 0)
+void klee::printVersion(llvm::raw_ostream &OS)
+#else
void klee::printVersion()
+#endif
{
- llvm::outs() << PACKAGE_STRING " (" PACKAGE_URL ")\n";
+#if LLVM_VERSION_CODE < LLVM_VERSION(6, 0)
+ llvm::raw_ostream &OS = llvm::outs();
+#endif
+
+ OS << PACKAGE_STRING " (" PACKAGE_URL ")\n";
#ifdef KLEE_ENABLE_TIMESTAMP
- llvm::outs() << " Built " __DATE__ " (" __TIME__ ")\n";
+ OS << " Built " __DATE__ " (" __TIME__ ")\n";
#endif
- llvm::outs() << " Build mode: " << KLEE_BUILD_MODE "\n";
- llvm::outs() << " Build revision: ";
+ OS << " Build mode: " << KLEE_BUILD_MODE "\n";
+ OS << " Build revision: ";
#ifdef KLEE_BUILD_REVISION
- llvm::outs() << KLEE_BUILD_REVISION "\n";
+ OS << KLEE_BUILD_REVISION "\n";
#else
- llvm::outs() << "unknown\n";
+ OS << "unknown\n";
#endif
// Show LLVM version information
- llvm::outs() << "\n";
+ OS << "\n";
llvm::cl::PrintVersionMessage();
}
--
2.17.0

View File

@ -0,0 +1,37 @@
From: Jiri Slaby <jirislaby@gmail.com>
Date: Mon, 21 May 2018 15:14:41 +0200
Subject: llvm60: handle headers renaming
Patch-mainline: no
Some headers were moved from llvm/Target/ to llvm/CodeGen/. Handle that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Module/RaiseAsm.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
index d9b3e40154ba..d478ff828796 100644
--- a/lib/Module/RaiseAsm.cpp
+++ b/lib/Module/RaiseAsm.cpp
@@ -18,10 +18,16 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/TargetRegistry.h"
+#if LLVM_VERSION_CODE >= LLVM_VERSION(6, 0)
+#include "llvm/CodeGen/TargetLowering.h"
+#include "llvm/CodeGen/TargetSubtargetInfo.h"
+#include "llvm/Target/TargetMachine.h"
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
#include "llvm/Target/TargetLowering.h"
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetSubtargetInfo.h"
+#else
+#include "llvm/Target/TargetLowering.h"
#endif
using namespace llvm;
--
2.17.0

View File

@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/klee/klee.git</param>
<param name="changesrevision">33964e5d935f903b2850f6576f93ce229fb00918</param></service></servicedata>
<param name="changesrevision">4e0ec744a8170f3d82aa1a8658fd523442781da2</param></service></servicedata>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2ac616443c0b3dd6fd8a24fc4d95dc35ff27bd1bca116c92556434640e0e5338
size 591008

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:397ccfba7f13d4b9b3c03a5c714fad5c9361817486da9b68afcab36c579ab347
size 591752

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed May 23 12:25:13 UTC 2018 - opensuse-packaging@opensuse.org
- Update to version 1.4.0+20180522:
* clang-format on lib/Module/{IntrinsicCleaner.cpp,Passes.h}
* some housekeeping in Passes.h and IntrinsicCleaner.cpp
* CompressionStream: fix sporadic segfaults (uninitialised avail_in)
* Removed .c_str() from getSourceLocation calls
* Renamed printFileLine to getSourceLocation (as suggested by @delcypher) to reflect the fact that it simply returns a string
* Simplified printFileLine by using std::to_string, and removed unneeded version that takes an argument a stream
* stop using DEBUG macro name
* fix some casts for LLP64 compilers
-------------------------------------------------------------------
Mon May 21 09:30:16 UTC 2018 - opensuse-packaging@opensuse.org

View File

@ -19,7 +19,7 @@
%define llvm_version_minor 0
%define llvm_version %{llvm_version_major}
%define version_unconverted 1.4.0+20180518
%define version_unconverted 1.4.0+20180522
%ifarch %{ix86} x86_64
%define with_uclibc 1
@ -31,7 +31,7 @@ Name: klee
Summary: LLVM Execution Engine
License: NCSA
Group: Development/Languages/Other
Version: 1.4.0+20180518
Version: 1.4.0+20180522
Release: 0
Url: http://klee.github.io/
Source0: %{name}-%{version}.tar.xz