up to 1.4.0+20171009
OBS-URL: https://build.opensuse.org/package/show/devel:tools:statica/klee?expand=0&rev=30
This commit is contained in:
parent
d5526682f3
commit
c36a5d68b2
@ -68,5 +68,5 @@ index b02605208bbb..54bda16013b6 100644
|
|||||||
}
|
}
|
||||||
ii->removeFromParent();
|
ii->removeFromParent();
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ index e2f05205a633..3d9bf5ae66af 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||||
index a8a87b2c534f..4516e2ca7ab1 100644
|
index a86adc98a1b1..b07d3d2fe348 100644
|
||||||
--- a/lib/Module/ModuleUtil.cpp
|
--- a/lib/Module/ModuleUtil.cpp
|
||||||
+++ b/lib/Module/ModuleUtil.cpp
|
+++ b/lib/Module/ModuleUtil.cpp
|
||||||
@@ -258,13 +258,21 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
@@ -258,13 +258,21 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||||
@ -117,7 +117,7 @@ index a8a87b2c534f..4516e2ca7ab1 100644
|
|||||||
|
|
||||||
} else if (magic == sys::fs::file_magic::archive) {
|
} else if (magic == sys::fs::file_magic::archive) {
|
||||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||||
@@ -614,7 +632,11 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
@@ -615,7 +633,11 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
||||||
// The module has taken ownership of the MemoryBuffer so release it
|
// The module has taken ownership of the MemoryBuffer so release it
|
||||||
// from the std::unique_ptr
|
// from the std::unique_ptr
|
||||||
buffer->release();
|
buffer->release();
|
||||||
@ -145,7 +145,7 @@ index 02ab446a8d63..64e4863f70b3 100644
|
|||||||
dlpass->doInitialization(*M);
|
dlpass->doInitialization(*M);
|
||||||
addPass(Passes, dlpass);
|
addPass(Passes, dlpass);
|
||||||
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
|
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
|
||||||
index 22c51e18d2b3..e56ac4687e30 100644
|
index 13e4f7d47e58..c597fa2a7b82 100644
|
||||||
--- a/lib/Module/RaiseAsm.cpp
|
--- a/lib/Module/RaiseAsm.cpp
|
||||||
+++ b/lib/Module/RaiseAsm.cpp
|
+++ b/lib/Module/RaiseAsm.cpp
|
||||||
@@ -81,7 +81,10 @@ bool RaiseAsmPass::runOnModule(Module &M) {
|
@@ -81,7 +81,10 @@ bool RaiseAsmPass::runOnModule(Module &M) {
|
||||||
@ -161,7 +161,7 @@ index 22c51e18d2b3..e56ac4687e30 100644
|
|||||||
TLI = TM->getSubtargetImpl()->getTargetLowering();
|
TLI = TM->getSubtargetImpl()->getTargetLowering();
|
||||||
#else
|
#else
|
||||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||||
index 05ba54d392ce..1a145abd4038 100644
|
index f1def38c90e5..5d1d0c22495c 100644
|
||||||
--- a/tools/klee/main.cpp
|
--- a/tools/klee/main.cpp
|
||||||
+++ b/tools/klee/main.cpp
|
+++ b/tools/klee/main.cpp
|
||||||
@@ -35,6 +35,7 @@
|
@@ -35,6 +35,7 @@
|
||||||
@ -173,5 +173,5 @@ index 05ba54d392ce..1a145abd4038 100644
|
|||||||
|
|
||||||
#include "llvm/Support/TargetSelect.h"
|
#include "llvm/Support/TargetSelect.h"
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
||||||
|
@ -1615,5 +1615,5 @@ index 000000000000..aa6b42ed6b9f
|
|||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
From: Jiri Slaby <jirislaby@gmail.com>
|
|
||||||
Date: Tue, 20 Jun 2017 08:52:56 +0200
|
|
||||||
Subject: cmake: expand library dependencies with USE_CMAKE_FIND_PACKAGE_LLVM
|
|
||||||
Patch-mainline: no
|
|
||||||
|
|
||||||
When we use -DUSE_CMAKE_FIND_PACKAGE_LLVM=ON, we do not expand
|
|
||||||
dependecies and build fails with linker errors like:
|
|
||||||
/usr/bin/ld: lib/libkleeModule.a(ModuleUtil.cpp.o): undefined reference to symbol '_ZNK4llvm6object7Archive5Child7getNameEv'
|
|
||||||
/usr/lib64/../lib64/libLLVMObject.so.4: error adding symbols: DSO missing from command line
|
|
||||||
clang-4.0.0: error: linker command failed with exit code 1 (use -v to see invocation)
|
|
||||||
|
|
||||||
So let LLVM compute also the transitive close as it used to do so in
|
|
||||||
LLVM < 3.5.
|
|
||||||
|
|
||||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
||||||
---
|
|
||||||
cmake/find_llvm.cmake | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake
|
|
||||||
index 49ca51d40fa8..1276947a6c77 100644
|
|
||||||
--- a/cmake/find_llvm.cmake
|
|
||||||
+++ b/cmake/find_llvm.cmake
|
|
||||||
@@ -29,7 +29,8 @@ if (USE_CMAKE_FIND_PACKAGE_LLVM)
|
|
||||||
if (${LLVM_PACKAGE_VERSION} VERSION_LESS "3.5")
|
|
||||||
llvm_map_components_to_libraries(${output_var} ${ARGN})
|
|
||||||
else()
|
|
||||||
- llvm_map_components_to_libnames(${output_var} ${ARGN})
|
|
||||||
+ llvm_map_components_to_libnames(LLVM_LIBS_TMP ${ARGN})
|
|
||||||
+ llvm_expand_dependencies(${output_var} ${LLVM_LIBS_TMP})
|
|
||||||
endif()
|
|
||||||
set(${output_var} ${${output_var}} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
33
0004-llvm37-handle-getRegisteredOptions.patch
Normal file
33
0004-llvm37-handle-getRegisteredOptions.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From: Jiri Slaby <jirislaby@gmail.com>
|
||||||
|
Date: Tue, 10 Oct 2017 14:52:57 +0200
|
||||||
|
Subject: llvm37: handle getRegisteredOptions
|
||||||
|
Patch-mainline: no
|
||||||
|
|
||||||
|
In LLVM 3.7 and later, getRegisteredOptions takes no arguments and
|
||||||
|
return the map.
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||||
|
---
|
||||||
|
lib/Basic/CmdLineOptions.cpp | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/Basic/CmdLineOptions.cpp b/lib/Basic/CmdLineOptions.cpp
|
||||||
|
index bffd3a4f7c00..ce09edde90ea 100644
|
||||||
|
--- a/lib/Basic/CmdLineOptions.cpp
|
||||||
|
+++ b/lib/Basic/CmdLineOptions.cpp
|
||||||
|
@@ -86,8 +86,12 @@ UseAssignmentValidatingSolver("debug-assignment-validating-solver",
|
||||||
|
cl::init(false));
|
||||||
|
|
||||||
|
void KCommandLine::HideUnrelatedOptions(cl::OptionCategory &Category) {
|
||||||
|
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||||
|
+ StringMap<cl::Option*> &map = cl::getRegisteredOptions();
|
||||||
|
+#else
|
||||||
|
StringMap<cl::Option *> map;
|
||||||
|
cl::getRegisteredOptions(map);
|
||||||
|
+#endif
|
||||||
|
for (StringMap<cl::Option *>::iterator i = map.begin(), e = map.end(); i != e;
|
||||||
|
i++) {
|
||||||
|
if (i->second->Category != &Category) {
|
||||||
|
--
|
||||||
|
2.14.2
|
||||||
|
|
@ -15,10 +15,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|||||||
7 files changed, 77 insertions(+), 9 deletions(-)
|
7 files changed, 77 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||||
index fac68b8d4ed9..65f75ef6dde8 100644
|
index 673476f61042..cb8862813133 100644
|
||||||
--- a/lib/Core/Executor.cpp
|
--- a/lib/Core/Executor.cpp
|
||||||
+++ b/lib/Core/Executor.cpp
|
+++ b/lib/Core/Executor.cpp
|
||||||
@@ -2130,8 +2130,13 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
@@ -2127,8 +2127,13 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
||||||
!fpWidthToSemantics(right->getWidth()))
|
!fpWidthToSemantics(right->getWidth()))
|
||||||
return terminateStateOnExecError(state, "Unsupported FRem operation");
|
return terminateStateOnExecError(state, "Unsupported FRem operation");
|
||||||
llvm::APFloat Res(*fpWidthToSemantics(left->getWidth()), left->getAPValue());
|
llvm::APFloat Res(*fpWidthToSemantics(left->getWidth()), left->getAPValue());
|
||||||
@ -33,10 +33,10 @@ index fac68b8d4ed9..65f75ef6dde8 100644
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
|
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
|
||||||
index 3a87f57a5e71..7c4368642552 100644
|
index 6dc13df86440..e931dcef8b2e 100644
|
||||||
--- a/lib/Core/StatsTracker.cpp
|
--- a/lib/Core/StatsTracker.cpp
|
||||||
+++ b/lib/Core/StatsTracker.cpp
|
+++ b/lib/Core/StatsTracker.cpp
|
||||||
@@ -631,7 +631,11 @@ static std::vector<Instruction*> getSuccs(Instruction *i) {
|
@@ -629,7 +629,11 @@ static std::vector<Instruction*> getSuccs(Instruction *i) {
|
||||||
for (succ_iterator it = succ_begin(bb), ie = succ_end(bb); it != ie; ++it)
|
for (succ_iterator it = succ_begin(bb), ie = succ_end(bb); it != ie; ++it)
|
||||||
res.push_back(&*(it->begin()));
|
res.push_back(&*(it->begin()));
|
||||||
} else {
|
} else {
|
||||||
@ -106,7 +106,7 @@ index 1a194245a09a..b61da111908b 100644
|
|||||||
|
|
||||||
// If there is an entry in any PHI nodes for the default edge, make sure
|
// If there is an entry in any PHI nodes for the default edge, make sure
|
||||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||||
index 4516e2ca7ab1..9068a6b40f73 100644
|
index b07d3d2fe348..e6d592b135b6 100644
|
||||||
--- a/lib/Module/ModuleUtil.cpp
|
--- a/lib/Module/ModuleUtil.cpp
|
||||||
+++ b/lib/Module/ModuleUtil.cpp
|
+++ b/lib/Module/ModuleUtil.cpp
|
||||||
@@ -207,8 +207,19 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
@@ -207,8 +207,19 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||||
@ -202,7 +202,7 @@ index 4516e2ca7ab1..9068a6b40f73 100644
|
|||||||
#endif
|
#endif
|
||||||
klee_error("Link with library %s failed: %s", libraryName.c_str(),
|
klee_error("Link with library %s failed: %s", libraryName.c_str(),
|
||||||
ErrorMessage.c_str());
|
ErrorMessage.c_str());
|
||||||
@@ -638,7 +661,11 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
@@ -639,7 +662,11 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
||||||
auto module = *errorOrModule;
|
auto module = *errorOrModule;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ index 64e4863f70b3..944f51ef336d 100644
|
|||||||
addPass(Passes, createLICMPass()); // Hoist loop invariants
|
addPass(Passes, createLICMPass()); // Hoist loop invariants
|
||||||
addPass(Passes, createGVNPass()); // Remove redundancies
|
addPass(Passes, createGVNPass()); // Remove redundancies
|
||||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||||
index 1a145abd4038..e61b86b54d89 100644
|
index 5d1d0c22495c..c48570799a7f 100644
|
||||||
--- a/tools/klee/main.cpp
|
--- a/tools/klee/main.cpp
|
||||||
+++ b/tools/klee/main.cpp
|
+++ b/tools/klee/main.cpp
|
||||||
@@ -291,7 +291,12 @@ KleeHandler::KleeHandler(int argc, char **argv)
|
@@ -291,7 +291,12 @@ KleeHandler::KleeHandler(int argc, char **argv)
|
||||||
@ -266,5 +266,5 @@ index 1a145abd4038..e61b86b54d89 100644
|
|||||||
// create directory and try to link klee-last
|
// create directory and try to link klee-last
|
||||||
if (mkdir(d.c_str(), 0775) == 0) {
|
if (mkdir(d.c_str(), 0775) == 0) {
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From: Jiri Slaby <jirislaby@gmail.com>
|
|
||||||
Date: Thu, 15 Jun 2017 15:20:49 +0200
|
|
||||||
Subject: llvm37: handle GetElementPtrInst::Create's new parameter
|
|
||||||
Patch-mainline: no
|
|
||||||
|
|
||||||
LLVM 3.7 added a PointeeType parameter to GetElementPtrInst::Create.
|
|
||||||
Let's handle that by a macro called KLEE_LLVM_GEP_TYPE, defined in
|
|
||||||
Version.h.
|
|
||||||
|
|
||||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
||||||
---
|
|
||||||
include/klee/Config/Version.h | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/include/klee/Config/Version.h b/include/klee/Config/Version.h
|
|
||||||
index 532051602fe3..a0e126bfbf9a 100644
|
|
||||||
--- a/include/klee/Config/Version.h
|
|
||||||
+++ b/include/klee/Config/Version.h
|
|
||||||
@@ -21,6 +21,12 @@
|
|
||||||
# define KLEE_LLVM_GEP_TYPE(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
|
||||||
+# define KLEE_LLVM_GEP_TYPE(x) (x),
|
|
||||||
+#else
|
|
||||||
+# define KLEE_LLVM_GEP_TYPE(x)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
|
||||||
# define KLEE_LLVM_CL_VAL_END
|
|
||||||
#else
|
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
@ -15,10 +15,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|||||||
7 files changed, 95 insertions(+), 5 deletions(-)
|
7 files changed, 95 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||||
index 65f75ef6dde8..d0f1b8caaaec 100644
|
index cb8862813133..aee0974c7792 100644
|
||||||
--- a/lib/Core/Executor.cpp
|
--- a/lib/Core/Executor.cpp
|
||||||
+++ b/lib/Core/Executor.cpp
|
+++ b/lib/Core/Executor.cpp
|
||||||
@@ -1302,10 +1302,18 @@ void Executor::executeCall(ExecutionState &state,
|
@@ -1299,10 +1299,18 @@ void Executor::executeCall(ExecutionState &state,
|
||||||
//
|
//
|
||||||
// Alignment requirements for scalar types is the same as their size
|
// Alignment requirements for scalar types is the same as their size
|
||||||
if (argWidth > Expr::Int64) {
|
if (argWidth > Expr::Int64) {
|
||||||
@ -37,7 +37,7 @@ index 65f75ef6dde8..d0f1b8caaaec 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1338,10 +1346,18 @@ void Executor::executeCall(ExecutionState &state,
|
@@ -1335,10 +1343,18 @@ void Executor::executeCall(ExecutionState &state,
|
||||||
|
|
||||||
Expr::Width argWidth = arguments[i]->getWidth();
|
Expr::Width argWidth = arguments[i]->getWidth();
|
||||||
if (argWidth > Expr::Int64) {
|
if (argWidth > Expr::Int64) {
|
||||||
@ -75,7 +75,7 @@ index 24e2ed97581f..f40e8bc9deb8 100644
|
|||||||
// Handle the case of 0-sized allocations as 1-byte allocations.
|
// Handle the case of 0-sized allocations as 1-byte allocations.
|
||||||
// This way, we make sure we have this allocation between its own red zones
|
// This way, we make sure we have this allocation between its own red zones
|
||||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||||
index 9068a6b40f73..17595716136b 100644
|
index e6d592b135b6..8acada93c2cd 100644
|
||||||
--- a/lib/Module/ModuleUtil.cpp
|
--- a/lib/Module/ModuleUtil.cpp
|
||||||
+++ b/lib/Module/ModuleUtil.cpp
|
+++ b/lib/Module/ModuleUtil.cpp
|
||||||
@@ -196,7 +196,11 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
@@ -196,7 +196,11 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||||
@ -224,7 +224,7 @@ index 944f51ef336d..ae1d4839f772 100644
|
|||||||
// addPass(Passes, createGlobalsAAWrapperPass());
|
// addPass(Passes, createGlobalsAAWrapperPass());
|
||||||
#else
|
#else
|
||||||
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
|
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
|
||||||
index e56ac4687e30..0557ae7f250e 100644
|
index c597fa2a7b82..d9b3e40154ba 100644
|
||||||
--- a/lib/Module/RaiseAsm.cpp
|
--- a/lib/Module/RaiseAsm.cpp
|
||||||
+++ b/lib/Module/RaiseAsm.cpp
|
+++ b/lib/Module/RaiseAsm.cpp
|
||||||
@@ -60,7 +60,11 @@ bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) {
|
@@ -60,7 +60,11 @@ bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) {
|
||||||
@ -269,7 +269,7 @@ index b8b32e31264a..800cece95e9c 100644
|
|||||||
llvm::cl::ParseCommandLineOptions(argc, argv);
|
llvm::cl::ParseCommandLineOptions(argc, argv);
|
||||||
|
|
||||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||||
index e61b86b54d89..b15cb1deb0a1 100644
|
index c48570799a7f..d193d8341e93 100644
|
||||||
--- a/tools/klee/main.cpp
|
--- a/tools/klee/main.cpp
|
||||||
+++ b/tools/klee/main.cpp
|
+++ b/tools/klee/main.cpp
|
||||||
@@ -1128,7 +1128,11 @@ int main(int argc, char **argv, char **envp) {
|
@@ -1128,7 +1128,11 @@ int main(int argc, char **argv, char **envp) {
|
||||||
@ -285,5 +285,5 @@ index e61b86b54d89..b15cb1deb0a1 100644
|
|||||||
if (Watchdog) {
|
if (Watchdog) {
|
||||||
if (MaxTime==0) {
|
if (MaxTime==0) {
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
@ -30,7 +30,7 @@ index 0439431b3bc8..ff76cd53c895 100644
|
|||||||
#include "llvm/IR/LLVMContext.h"
|
#include "llvm/IR/LLVMContext.h"
|
||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||||
index 17595716136b..e57c052916f5 100644
|
index 8acada93c2cd..63d3913a08f2 100644
|
||||||
--- a/lib/Module/ModuleUtil.cpp
|
--- a/lib/Module/ModuleUtil.cpp
|
||||||
+++ b/lib/Module/ModuleUtil.cpp
|
+++ b/lib/Module/ModuleUtil.cpp
|
||||||
@@ -26,7 +26,9 @@
|
@@ -26,7 +26,9 @@
|
||||||
@ -59,7 +59,7 @@ index 17595716136b..e57c052916f5 100644
|
|||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/Support/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||||
index b15cb1deb0a1..c6c181b46b34 100644
|
index d193d8341e93..cd54d8aab5af 100644
|
||||||
--- a/tools/klee/main.cpp
|
--- a/tools/klee/main.cpp
|
||||||
+++ b/tools/klee/main.cpp
|
+++ b/tools/klee/main.cpp
|
||||||
@@ -31,7 +31,6 @@
|
@@ -31,7 +31,6 @@
|
||||||
@ -84,5 +84,5 @@ index b15cb1deb0a1..c6c181b46b34 100644
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
@ -9,10 +9,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|||||||
1 file changed, 9 insertions(+)
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||||
index d0f1b8caaaec..20059473bff9 100644
|
index aee0974c7792..08474ae700ac 100644
|
||||||
--- a/lib/Core/Executor.cpp
|
--- a/lib/Core/Executor.cpp
|
||||||
+++ b/lib/Core/Executor.cpp
|
+++ b/lib/Core/Executor.cpp
|
||||||
@@ -1445,12 +1445,21 @@ static bool isDebugIntrinsic(const Function *f, KModule *KM) {
|
@@ -1442,12 +1442,21 @@ static bool isDebugIntrinsic(const Function *f, KModule *KM) {
|
||||||
|
|
||||||
static inline const llvm::fltSemantics * fpWidthToSemantics(unsigned width) {
|
static inline const llvm::fltSemantics * fpWidthToSemantics(unsigned width) {
|
||||||
switch(width) {
|
switch(width) {
|
||||||
@ -35,5 +35,5 @@ index d0f1b8caaaec..20059473bff9 100644
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From: Jiri Slaby <jirislaby@gmail.com>
|
|
||||||
Date: Thu, 15 Jun 2017 15:20:49 +0200
|
|
||||||
Subject: llvm37: handle GetElementPtrInst::Create's new parameter
|
|
||||||
Patch-mainline: no
|
|
||||||
|
|
||||||
LLVM 3.7 added a PointeeType parameter to GetElementPtrInst::Create.
|
|
||||||
Let's handle that by a macro called KLEE_LLVM_GEP_TYPE, defined in
|
|
||||||
Version.h.
|
|
||||||
|
|
||||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
||||||
---
|
|
||||||
include/klee/Config/Version.h | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/include/klee/Config/Version.h b/include/klee/Config/Version.h
|
|
||||||
index a0e126bfbf9a..efc3cdd00b85 100644
|
|
||||||
--- a/include/klee/Config/Version.h
|
|
||||||
+++ b/include/klee/Config/Version.h
|
|
||||||
@@ -27,6 +27,12 @@
|
|
||||||
# define KLEE_LLVM_GEP_TYPE(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
|
||||||
+# define KLEE_LLVM_GEP_TYPE(x) (x),
|
|
||||||
+#else
|
|
||||||
+# define KLEE_LLVM_GEP_TYPE(x)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
|
||||||
# define KLEE_LLVM_CL_VAL_END
|
|
||||||
#else
|
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
@ -9,7 +9,7 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|||||||
1 file changed, 41 insertions(+), 9 deletions(-)
|
1 file changed, 41 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||||
index e57c052916f5..72b2009878c4 100644
|
index 63d3913a08f2..e49896a06718 100644
|
||||||
--- a/lib/Module/ModuleUtil.cpp
|
--- a/lib/Module/ModuleUtil.cpp
|
||||||
+++ b/lib/Module/ModuleUtil.cpp
|
+++ b/lib/Module/ModuleUtil.cpp
|
||||||
@@ -204,7 +204,7 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
@@ -204,7 +204,7 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||||
@ -85,7 +85,7 @@ index e57c052916f5..72b2009878c4 100644
|
|||||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||||
ErrorOr<std::unique_ptr<Module> > ResultErr =
|
ErrorOr<std::unique_ptr<Module> > ResultErr =
|
||||||
#else
|
#else
|
||||||
@@ -676,14 +697,22 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
@@ -677,14 +698,22 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ index e57c052916f5..72b2009878c4 100644
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
// The module has taken ownership of the MemoryBuffer so release it
|
// The module has taken ownership of the MemoryBuffer so release it
|
||||||
@@ -695,7 +724,10 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
@@ -696,7 +725,10 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
||||||
auto module = *errorOrModule;
|
auto module = *errorOrModule;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -124,5 +124,5 @@ index e57c052916f5..72b2009878c4 100644
|
|||||||
#else
|
#else
|
||||||
if (auto ec = module->materializeAllPermanently()) {
|
if (auto ec = module->materializeAllPermanently()) {
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
@ -69,10 +69,10 @@ index 14d235364401..feeeed8affa2 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
|
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
|
||||||
index 7c4368642552..d45519ed4215 100644
|
index e931dcef8b2e..c39c7d5bd7ba 100644
|
||||||
--- a/lib/Core/StatsTracker.cpp
|
--- a/lib/Core/StatsTracker.cpp
|
||||||
+++ b/lib/Core/StatsTracker.cpp
|
+++ b/lib/Core/StatsTracker.cpp
|
||||||
@@ -284,6 +284,29 @@ void StatsTracker::done() {
|
@@ -282,6 +282,29 @@ void StatsTracker::done() {
|
||||||
void StatsTracker::stepInstruction(ExecutionState &es) {
|
void StatsTracker::stepInstruction(ExecutionState &es) {
|
||||||
if (OutputIStats) {
|
if (OutputIStats) {
|
||||||
if (TrackInstructionTime) {
|
if (TrackInstructionTime) {
|
||||||
@ -102,7 +102,7 @@ index 7c4368642552..d45519ed4215 100644
|
|||||||
static sys::TimeValue lastNowTime(0,0),lastUserTime(0,0);
|
static sys::TimeValue lastNowTime(0,0),lastUserTime(0,0);
|
||||||
|
|
||||||
if (lastUserTime.seconds()==0 && lastUserTime.nanoseconds()==0) {
|
if (lastUserTime.seconds()==0 && lastUserTime.nanoseconds()==0) {
|
||||||
@@ -299,6 +322,7 @@ void StatsTracker::stepInstruction(ExecutionState &es) {
|
@@ -297,6 +320,7 @@ void StatsTracker::stepInstruction(ExecutionState &es) {
|
||||||
lastUserTime = user;
|
lastUserTime = user;
|
||||||
lastNowTime = now;
|
lastNowTime = now;
|
||||||
}
|
}
|
||||||
@ -195,5 +195,5 @@ index da96981079ae..a223b39ada57 100644
|
|||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
@ -28,10 +28,10 @@ index 5fb9f4ec5c2f..bf7cb6ff0bea 100644
|
|||||||
CurTy = 0;
|
CurTy = 0;
|
||||||
}
|
}
|
||||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||||
index 20059473bff9..c19c758268fd 100644
|
index 08474ae700ac..5a88f1ae3180 100644
|
||||||
--- a/lib/Core/Executor.cpp
|
--- a/lib/Core/Executor.cpp
|
||||||
+++ b/lib/Core/Executor.cpp
|
+++ b/lib/Core/Executor.cpp
|
||||||
@@ -2523,8 +2523,7 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
|
@@ -2520,8 +2520,7 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
|
||||||
uint64_t addend = sl->getElementOffset((unsigned) ci->getZExtValue());
|
uint64_t addend = sl->getElementOffset((unsigned) ci->getZExtValue());
|
||||||
constantOffset = constantOffset->Add(ConstantExpr::alloc(addend,
|
constantOffset = constantOffset->Add(ConstantExpr::alloc(addend,
|
||||||
Context::get().getPointerWidth()));
|
Context::get().getPointerWidth()));
|
||||||
@ -41,7 +41,7 @@ index 20059473bff9..c19c758268fd 100644
|
|||||||
uint64_t elementSize =
|
uint64_t elementSize =
|
||||||
kmodule->targetData->getTypeStoreSize(set->getElementType());
|
kmodule->targetData->getTypeStoreSize(set->getElementType());
|
||||||
Value *operand = ii.getOperand();
|
Value *operand = ii.getOperand();
|
||||||
@@ -2538,7 +2537,24 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
|
@@ -2535,7 +2534,24 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
|
||||||
} else {
|
} else {
|
||||||
kgepi->indices.push_back(std::make_pair(index, elementSize));
|
kgepi->indices.push_back(std::make_pair(index, elementSize));
|
||||||
}
|
}
|
||||||
@ -103,5 +103,5 @@ index 53f4c5b85754..6d18e07425c5 100644
|
|||||||
base = base->Add(addend);
|
base = base->Add(addend);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.2
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
<servicedata>
|
<servicedata>
|
||||||
<service name="tar_scm">
|
<service name="tar_scm">
|
||||||
<param name="url">git://github.com/klee/klee.git</param>
|
<param name="url">git://github.com/klee/klee.git</param>
|
||||||
<param name="changesrevision">d19500eb93083c8cc6bb72bcb54414015830cacb</param></service></servicedata>
|
<param name="changesrevision">9f11eababd767b012b623806b40fa0647affa47e</param></service></servicedata>
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:85276db9af2f59f54ddc4258db7ffabede4dea04ba3bf16722ab75b050909147
|
|
||||||
size 659920
|
|
3
klee-1.4.0+20171009.tar.xz
Normal file
3
klee-1.4.0+20171009.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ad3ed763f431f001921a8b6bdab69e38de3f0f1e0746af6468b71a478a1dffee
|
||||||
|
size 580524
|
42
klee.changes
42
klee.changes
@ -1,3 +1,45 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 10 12:45:08 UTC 2017 - jslaby@suse.com
|
||||||
|
|
||||||
|
- Update to version 1.4.0+20171009:
|
||||||
|
* Added support for hiding command-line options
|
||||||
|
* Removed "llvm::" and reformatting in CmdLineOptions.cpp
|
||||||
|
* Remove unnecessary null pointer checks
|
||||||
|
* Removed dead link, fixes #754
|
||||||
|
* [CMake] Fix initialisation order of `KLEE_COMPONENT_*` and `KLEE_SOLVER_LIBRARIES` variables. The code to add `NDEBUG` to `KLEE_COMPONENT_CXX_DEFINES` did so before initialisation and would be silently overwritten.
|
||||||
|
* [CMake] Report the value of some important variables during configure to aid debugging.
|
||||||
|
* Silenced some warnings about unused variables when assertions are disabled.
|
||||||
|
* Remove Autoconf/Makefile build system and adjust the TravisCI configuration, TravisCI scripts and Dockerfile build appropriately.
|
||||||
|
* Fix TravisCI `METASMT_DEFAULT` setting.
|
||||||
|
* [CMake] Fix bug when doing non-assert builds.
|
||||||
|
* [CMake] Add global clean target `clean_all`. Fixes #718.
|
||||||
|
* [CMake] Add `clean_doxygen` rule to clean up doxygen build tree and add this as a dependency of `clean_all`.
|
||||||
|
* enforce c++11
|
||||||
|
* Removed the word 'unsigned' from integer overflow error messages
|
||||||
|
* Silenced warnings on comparison of integers of different signs in TreeStreamTest
|
||||||
|
* Fixed initialization of distance to uncovered instructions when KLEE relies on default searchers
|
||||||
|
- removed:
|
||||||
|
* 0004-cmake-expand-library-dependencies-with-USE_CMAKE_FIN.patch
|
||||||
|
- renamed:
|
||||||
|
* 0005-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch ->
|
||||||
|
0004-llvm37-handle-getRegisteredOptions.patch
|
||||||
|
* 0006-llvm-make-KLEE-compile-against-LLVM-3.8.patch ->
|
||||||
|
0005-llvm-make-KLEE-compile-against-LLVM-3.8.patch
|
||||||
|
* 0007-llvm-make-KLEE-compile-against-LLVM-3.9.patch ->
|
||||||
|
0006-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||||
|
* 0008-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch ->
|
||||||
|
0007-llvm40-handle-different-header-names.patch
|
||||||
|
* 0009-llvm40-handle-different-header-names.patch ->
|
||||||
|
0007-llvm40-handle-different-header-names.patch
|
||||||
|
* 0010-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch ->
|
||||||
|
0008-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
||||||
|
* 0011-llvm40-errorOr-and-similar.patch ->
|
||||||
|
0009-llvm40-errorOr-and-similar.patch
|
||||||
|
* 0012-llvm-use-chrono-helpers-from-LLVM-4.0.patch ->
|
||||||
|
0010-llvm-use-chrono-helpers-from-LLVM-4.0.patch
|
||||||
|
* 0013-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch ->
|
||||||
|
0011-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 17 12:05:26 UTC 2017 - jslaby@suse.com
|
Thu Aug 17 12:05:26 UTC 2017 - jslaby@suse.com
|
||||||
|
|
||||||
|
24
klee.spec
24
klee.spec
@ -19,7 +19,7 @@
|
|||||||
%define llvm_version_minor 0
|
%define llvm_version_minor 0
|
||||||
%define llvm_version %{llvm_version_major}
|
%define llvm_version %{llvm_version_major}
|
||||||
|
|
||||||
%define version_unconverted 1.4.0+20170811
|
%define version_unconverted 1.4.0+20171009
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
%define with_uclibc 1
|
%define with_uclibc 1
|
||||||
@ -31,7 +31,7 @@ Name: klee
|
|||||||
Summary: LLVM Execution Engine
|
Summary: LLVM Execution Engine
|
||||||
License: NCSA
|
License: NCSA
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
Version: 1.4.0+20170811
|
Version: 1.4.0+20171009
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://klee.github.io/
|
Url: http://klee.github.io/
|
||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
@ -42,16 +42,14 @@ Patch0: 0001-errno-define-__errno_location.patch
|
|||||||
Patch1: 0001-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
|
Patch1: 0001-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
|
||||||
Patch2: 0002-llvm-make-KLEE-compile-against-LLVM-3.7.patch
|
Patch2: 0002-llvm-make-KLEE-compile-against-LLVM-3.7.patch
|
||||||
Patch3: 0003-test-add-versions-of-some-tests-for-LLVM-3.7.patch
|
Patch3: 0003-test-add-versions-of-some-tests-for-LLVM-3.7.patch
|
||||||
Patch4: 0004-cmake-expand-library-dependencies-with-USE_CMAKE_FIN.patch
|
Patch4: 0004-llvm37-handle-getRegisteredOptions.patch
|
||||||
Patch5: 0005-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
|
Patch5: 0005-llvm-make-KLEE-compile-against-LLVM-3.8.patch
|
||||||
Patch6: 0006-llvm-make-KLEE-compile-against-LLVM-3.8.patch
|
Patch6: 0006-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||||
Patch7: 0007-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
Patch7: 0007-llvm40-handle-different-header-names.patch
|
||||||
Patch8: 0008-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
|
Patch8: 0008-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
||||||
Patch9: 0009-llvm40-handle-different-header-names.patch
|
Patch9: 0009-llvm40-errorOr-and-similar.patch
|
||||||
Patch10: 0010-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
Patch10: 0010-llvm-use-chrono-helpers-from-LLVM-4.0.patch
|
||||||
Patch11: 0011-llvm40-errorOr-and-similar.patch
|
Patch11: 0011-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
|
||||||
Patch12: 0012-llvm-use-chrono-helpers-from-LLVM-4.0.patch
|
|
||||||
Patch13: 0013-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
|
|
||||||
Patch14: 0001-test-DirSeek-make-it-XFAIL-temporarily.patch
|
Patch14: 0001-test-DirSeek-make-it-XFAIL-temporarily.patch
|
||||||
|
|
||||||
BuildRequires: clang%{llvm_version}
|
BuildRequires: clang%{llvm_version}
|
||||||
@ -90,8 +88,6 @@ information on what KLEE is and what it can do, see the OSDI 2008 paper.
|
|||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
mkdir -p build/test/
|
mkdir -p build/test/
|
||||||
cp %{SOURCE2} build/test/
|
cp %{SOURCE2} build/test/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user