2022-03-16 10:11:07 +00:00
committed by Git OBS Bridge
parent 3f21f921a8
commit b362da2a7f
15 changed files with 37 additions and 412 deletions

View File

@@ -1,43 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Tue, 24 Aug 2021 13:59:21 +0200
Subject: Support/FileHandling.cpp: rewrite to C++14
Patch-mainline: no
References: llvm 13
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Support/FileHandling.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/Support/FileHandling.cpp b/lib/Support/FileHandling.cpp
index bc65a641ce20..9809b87d0051 100644
--- a/lib/Support/FileHandling.cpp
+++ b/lib/Support/FileHandling.cpp
@@ -22,10 +22,10 @@ namespace klee {
std::unique_ptr<llvm::raw_fd_ostream>
klee_open_output_file(const std::string &path, std::string &error) {
- error = "";
- std::unique_ptr<llvm::raw_fd_ostream> f;
+ error.clear();
std::error_code ec;
- f = std::unique_ptr<llvm::raw_fd_ostream>(new llvm::raw_fd_ostream(path.c_str(), ec, llvm::sys::fs::F_None)); // FIXME C++14
+ auto f = std::make_unique<llvm::raw_fd_ostream>(path.c_str(), ec,
+ llvm::sys::fs::F_None);
if (ec)
error = ec.message();
if (!error.empty()) {
@@ -37,8 +37,8 @@ klee_open_output_file(const std::string &path, std::string &error) {
#ifdef HAVE_ZLIB_H
std::unique_ptr<llvm::raw_ostream>
klee_open_compressed_output_file(const std::string &path, std::string &error) {
- error = "";
- std::unique_ptr<llvm::raw_ostream> f(new compressed_fd_ostream(path, error));
+ error.clear();
+ auto f = std::make_unique<compressed_fd_ostream>(path, error);
if (!error.empty()) {
f.reset(nullptr);
}
--
2.33.1

View File

@@ -1,38 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Tue, 24 Aug 2021 13:59:28 +0200
Subject: llvm13: llvm::fs::F_None has been removed
Patch-mainline: no
References: llvm 13
... and should be replaced with llvm::fs::OF_None since LLVM 7.
See: https://reviews.llvm.org/D101506
https://github.com/llvm/llvm-project/commit/1f67a3cba9b09636c56e2109d8a35ae96dc15782
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Support/FileHandling.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/Support/FileHandling.cpp b/lib/Support/FileHandling.cpp
index 9809b87d0051..462055210df7 100644
--- a/lib/Support/FileHandling.cpp
+++ b/lib/Support/FileHandling.cpp
@@ -24,8 +24,15 @@ std::unique_ptr<llvm::raw_fd_ostream>
klee_open_output_file(const std::string &path, std::string &error) {
error.clear();
std::error_code ec;
+
+#if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0)
+ auto f = std::make_unique<llvm::raw_fd_ostream>(path.c_str(), ec,
+ llvm::sys::fs::OF_None);
+#else
auto f = std::make_unique<llvm::raw_fd_ostream>(path.c_str(), ec,
llvm::sys::fs::F_None);
+#endif
+
if (ec)
error = ec.message();
if (!error.empty()) {
--
2.33.1

View File

@@ -1,51 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Tue, 24 Aug 2021 13:59:29 +0200
Subject: llvm13: llvm::cl::GeneralCategory is no longer a global
Patch-mainline: no
References: llvm 13
Therefore, llvm::cl::getGeneralCategory() should be used instead.
See: https://reviews.llvm.org/D105959
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
tools/kleaver/main.cpp | 5 ++++-
tools/klee/main.cpp | 4 ++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp
index 9a79474c77e6..0a4cfbffa945 100644
--- a/tools/kleaver/main.cpp
+++ b/tools/kleaver/main.cpp
@@ -387,8 +387,11 @@ static bool printInputAsSMTLIBv2(const char *Filename,
}
int main(int argc, char **argv) {
-
+#if LLVM_VERSION_CODE >= LLVM_VERSION(13, 0)
+ KCommandLine::HideOptions(llvm::cl::getGeneralCategory());
+#else
KCommandLine::HideOptions(llvm::cl::GeneralCategory);
+#endif
bool success = true;
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index f340e7438af2..506493152073 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -1157,7 +1157,11 @@ linkWithUclibc(StringRef libDir, std::string opt_suffix,
int main(int argc, char **argv, char **envp) {
atexit(llvm_shutdown); // Call llvm_shutdown() on exit.
+#if LLVM_VERSION_CODE >= LLVM_VERSION(13, 0)
+ KCommandLine::HideOptions(llvm::cl::getGeneralCategory());
+#else
KCommandLine::HideOptions(llvm::cl::GeneralCategory);
+#endif
llvm::InitializeNativeTarget();
--
2.33.1

View File

@@ -1,78 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Tue, 24 Aug 2021 13:59:31 +0200
Subject: llvm13: CreateLoad API with implicit types has been deprecated
Patch-mainline: no
References: llvm 13
See: https://github.com/llvm/llvm-project/commit/6312c53870897435b38881795460ad9f34bf9819
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Core/ExternalDispatcher.cpp | 6 ++++--
lib/Module/IntrinsicCleaner.cpp | 13 +++++++++----
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/lib/Core/ExternalDispatcher.cpp b/lib/Core/ExternalDispatcher.cpp
index baa5327aad3d..b1bfff47c9e6 100644
--- a/lib/Core/ExternalDispatcher.cpp
+++ b/lib/Core/ExternalDispatcher.cpp
@@ -287,7 +287,8 @@ Function *ExternalDispatcherImpl::createDispatcher(Function *target,
ConstantInt::get(Type::getInt64Ty(ctx), (uintptr_t)(void *)&gTheArgsP),
PointerType::getUnqual(PointerType::getUnqual(Type::getInt64Ty(ctx))),
"argsp");
- auto argI64s = Builder.CreateLoad(argI64sp, "args");
+ auto argI64s = Builder.CreateLoad(
+ argI64sp->getType()->getPointerElementType(), argI64sp, "args");
// Get the target function type.
FunctionType *FTy = cast<FunctionType>(
@@ -306,7 +307,8 @@ Function *ExternalDispatcherImpl::createDispatcher(Function *target,
ConstantInt::get(Type::getInt32Ty(ctx), idx));
auto argp = Builder.CreateBitCast(argI64p, PointerType::getUnqual(argTy));
- args[i] = Builder.CreateLoad(argp);
+ args[i] =
+ Builder.CreateLoad(argp->getType()->getPointerElementType(), argp);
unsigned argSize = argTy->getPrimitiveSizeInBits();
idx += ((!!argSize ? argSize : 64) + 63) / 64;
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
index b3b356d2959d..5e720e45684a 100644
--- a/lib/Module/IntrinsicCleaner.cpp
+++ b/lib/Module/IntrinsicCleaner.cpp
@@ -96,24 +96,29 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
Builder.CreatePointerCast(dst, i8pp, "vacopy.cast.dst");
auto castedSrc =
Builder.CreatePointerCast(src, i8pp, "vacopy.cast.src");
- auto load = Builder.CreateLoad(castedSrc, "vacopy.read");
+ auto load =
+ Builder.CreateLoad(castedSrc->getType()->getPointerElementType(),
+ castedSrc, "vacopy.read");
Builder.CreateStore(load, castedDst, false /* isVolatile */);
} else {
assert(WordSize == 8 && "Invalid word size!");
Type *i64p = PointerType::getUnqual(Type::getInt64Ty(ctx));
auto pDst = Builder.CreatePointerCast(dst, i64p, "vacopy.cast.dst");
auto pSrc = Builder.CreatePointerCast(src, i64p, "vacopy.cast.src");
- auto val = Builder.CreateLoad(pSrc, std::string());
+
+ auto pType = pSrc->getType()->getPointerElementType();
+
+ auto val = Builder.CreateLoad(pType, pSrc);
Builder.CreateStore(val, pDst, ii);
auto off = ConstantInt::get(Type::getInt64Ty(ctx), 1);
pDst = Builder.CreateGEP(nullptr, pDst, off, std::string());
pSrc = Builder.CreateGEP(nullptr, pSrc, off, std::string());
- val = Builder.CreateLoad(pSrc, std::string());
+ val = Builder.CreateLoad(pType, pSrc);
Builder.CreateStore(val, pDst);
pDst = Builder.CreateGEP(nullptr, pDst, off, std::string());
pSrc = Builder.CreateGEP(nullptr, pSrc, off, std::string());
- val = Builder.CreateLoad(pSrc, std::string());
+ val = Builder.CreateLoad(pType, pSrc);
Builder.CreateStore(val, pDst);
}
ii->eraseFromParent();
--
2.33.1

View File

@@ -1,62 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Tue, 24 Aug 2021 13:59:32 +0200
Subject: llvm13: CreateGEP no longer accepts nullptr
Patch-mainline: no
References: llvm 13
See: https://reviews.llvm.org/D105653
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Core/ExternalDispatcher.cpp | 2 +-
lib/Module/IntrinsicCleaner.cpp | 17 +++++++++--------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/Core/ExternalDispatcher.cpp b/lib/Core/ExternalDispatcher.cpp
index b1bfff47c9e6..e43a8a8368ef 100644
--- a/lib/Core/ExternalDispatcher.cpp
+++ b/lib/Core/ExternalDispatcher.cpp
@@ -303,7 +303,7 @@ Function *ExternalDispatcherImpl::createDispatcher(Function *target,
auto argTy =
(i < FTy->getNumParams() ? FTy->getParamType(i) : (*ai)->getType());
auto argI64p =
- Builder.CreateGEP(nullptr, argI64s,
+ Builder.CreateGEP(argI64s->getType()->getPointerElementType(), argI64s,
ConstantInt::get(Type::getInt32Ty(ctx), idx));
auto argp = Builder.CreateBitCast(argI64p, PointerType::getUnqual(argTy));
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
index 5e720e45684a..f4b867e55316 100644
--- a/lib/Module/IntrinsicCleaner.cpp
+++ b/lib/Module/IntrinsicCleaner.cpp
@@ -106,19 +106,20 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
auto pDst = Builder.CreatePointerCast(dst, i64p, "vacopy.cast.dst");
auto pSrc = Builder.CreatePointerCast(src, i64p, "vacopy.cast.src");
- auto pType = pSrc->getType()->getPointerElementType();
+ auto pSrcType = pSrc->getType()->getPointerElementType();
+ auto pDstType = pDst->getType()->getPointerElementType();
- auto val = Builder.CreateLoad(pType, pSrc);
+ auto val = Builder.CreateLoad(pSrcType, pSrc);
Builder.CreateStore(val, pDst, ii);
auto off = ConstantInt::get(Type::getInt64Ty(ctx), 1);
- pDst = Builder.CreateGEP(nullptr, pDst, off, std::string());
- pSrc = Builder.CreateGEP(nullptr, pSrc, off, std::string());
- val = Builder.CreateLoad(pType, pSrc);
+ pDst = Builder.CreateGEP(pDstType, pDst, off);
+ pSrc = Builder.CreateGEP(pSrcType, pSrc, off);
+ val = Builder.CreateLoad(pSrcType, pSrc);
Builder.CreateStore(val, pDst);
- pDst = Builder.CreateGEP(nullptr, pDst, off, std::string());
- pSrc = Builder.CreateGEP(nullptr, pSrc, off, std::string());
- val = Builder.CreateLoad(pType, pSrc);
+ pDst = Builder.CreateGEP(pDstType, pDst, off);
+ pSrc = Builder.CreateGEP(pSrcType, pSrc, off);
+ val = Builder.CreateLoad(pSrcType, pSrc);
Builder.CreateStore(val, pDst);
}
ii->eraseFromParent();
--
2.33.1

View File

@@ -1,41 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Tue, 24 Aug 2021 13:59:33 +0200
Subject: llvm13: llvm::APInt::toString has been moved to StringExtras.h
Patch-mainline: no
References: llvm 13
See: https://reviews.llvm.org/D103888
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
lib/Expr/Expr.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index db05e8423d67..2b9eab0dbc37 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -17,6 +17,9 @@
#include "klee/Support/IntEvaluation.h"
#include "llvm/ADT/Hashing.h"
+#if LLVM_VERSION_CODE >= LLVM_VERSION(13, 0)
+#include "llvm/ADT/StringExtras.h"
+#endif
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
@@ -366,7 +369,11 @@ void ConstantExpr::toMemory(void *address) {
}
void ConstantExpr::toString(std::string &Res, unsigned radix) const {
+#if LLVM_VERSION_CODE >= LLVM_VERSION(13, 0)
+ Res = llvm::toString(value, radix, false);
+#else
Res = value.toString(radix, false);
+#endif
}
ref<ConstantExpr> ConstantExpr::Concat(const ref<ConstantExpr> &RHS) {
--
2.33.1

View File

@@ -1,27 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Wed, 13 Oct 2021 13:02:46 +0200
Subject: llvm13: Add LLVM 13 to lit.cfg
Patch-mainline: no
References: llvm 13
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
test/lit.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/lit.cfg b/test/lit.cfg
index bf20c15e60f2..60bcb781bbd5 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -158,7 +158,7 @@ config.substitutions.append(
# Add feature for the LLVM version in use, so it can be tested in REQUIRES and
# XFAIL checks. We also add "not-XXX" variants, for the same reason.
known_llvm_versions = { "3.8", "3.9", "4.0", "5.0", "6.0", "7.0", "7.1", "8.0",
- "9.0", "10.0", "11.0", "11.1", "12.0" }
+ "9.0", "10.0", "11.0", "11.1", "12.0", "13.0" }
current_llvm_version_tuple = (int(config.llvm_version_major), int(config.llvm_version_minor))
current_llvm_version = "%s.%s" % current_llvm_version_tuple
--
2.33.1

View File

@@ -1,51 +0,0 @@
From: Lukas Zaoral <lzaoral@redhat.com>
Date: Sat, 16 Oct 2021 17:26:01 +0200
Subject: llvm13: Add LLVM 13 to Travis CI and GitHub Actions
Patch-mainline: no
References: llvm 13
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
.github/workflows/build.yaml | 4 ++++
.travis.yml | 3 +++
2 files changed, 7 insertions(+)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 9aaa99c71e95..c542781532d4 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -36,6 +36,7 @@ jobs:
strategy:
matrix:
name: [
+ "LLVM 13",
"LLVM 12",
"LLVM 11",
"LLVM 10",
@@ -59,6 +60,9 @@ jobs:
"No TCMalloc, optimised runtime",
]
include:
+ - name: "LLVM 13"
+ env:
+ LLVM_VERSION: 13
- name: "LLVM 12"
env:
LLVM_VERSION: 12
diff --git a/.travis.yml b/.travis.yml
index 8c7598aad7cb..111ba1a0a3ba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -53,6 +53,9 @@ env:
jobs:
include:
# Check supported LLVM versions
+ - name: "LLVM 13"
+ env: LLVM_VERSION=13.0
+
- name: "LLVM 12"
env: LLVM_VERSION=12.0
--
2.33.1

View File

@@ -1,6 +1,6 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="url">git://github.com/klee/klee.git</param>
<param name="url">https://github.com/klee/klee</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
<param name="versionformat">@PARENT_TAG@+%cd</param>

View File

@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/klee/klee.git</param>
<param name="changesrevision">5ee3a54001fe4291a0a5c3ce3beb33f856836cbb</param></service></servicedata>
<param name="url">https://github.com/klee/klee</param>
<param name="changesrevision">043f43fd03f06fbd332d16a24bb9f6b58ee66aef</param></service></servicedata>

View File

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

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7839dd63f1b914a15ecda8cb6336195a84d6b3483a9658ef8dac6f8225e0cd13
size 19642381

View File

@@ -1,3 +1,28 @@
-------------------------------------------------------------------
Wed Mar 16 09:05:12 UTC 2022 - jslaby@suse.cz
- Update to version 2.2+20220311:
* FD_Fail: use /dev/zero instead of /etc/mtab
* Core/Executor: Fix unaligned write of fp80 arguments
* Core/ExecutionState: Fix uninitialized reads in unit tests
* CI: add `-fno-sanitize-recover=undefined` to UBSAN flags
* tests: make UBSAN print stack traces
* CI: drop `-fsanitize=integer` from UBSAN flags
* CI: Update GTest to 1.11.0
* CI: Update Z3 to 4.8.14
* build: fix missing target for grep
* fix CMake: gtest from llvm includes gtest_main
* and many more
- delete (they are all upstream)
* 0001-Support-FileHandling.cpp-rewrite-to-C-14.patch
* 0002-llvm13-llvm-fs-F_None-has-been-removed.patch
* 0003-llvm13-llvm-cl-GeneralCategory-is-no-longer-a-global.patch
* 0004-llvm13-CreateLoad-API-with-implicit-types-has-been-d.patch
* 0005-llvm13-CreateGEP-no-longer-accepts-nullptr.patch
* 0006-llvm13-llvm-APInt-toString-has-been-moved-to-StringE.patch
* 0007-llvm13-Add-LLVM-13-to-lit.cfg.patch
* 0008-llvm13-Add-LLVM-13-to-Travis-CI-and-GitHub-Actions.patch
-------------------------------------------------------------------
Tue Oct 19 07:47:49 UTC 2021 - jslaby@suse.cz

View File

@@ -1,5 +1,4 @@
name: klee
version: 2.2+20211017
mtime: 1634506376
commit: 5ee3a54001fe4291a0a5c3ce3beb33f856836cbb
version: 2.2+20220311
mtime: 1647003697
commit: 043f43fd03f06fbd332d16a24bb9f6b58ee66aef

View File

@@ -1,7 +1,7 @@
#
# spec file for package klee
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -31,7 +31,7 @@ Name: klee
Summary: LLVM Execution Engine
License: NCSA
Group: Development/Languages/Other
Version: 2.2+20211017
Version: 2.2+20220311
Release: 0
URL: http://klee.github.io/
Source0: %{name}-%{version}.tar.xz
@@ -39,14 +39,6 @@ Source1: %{name}-rpmlintrc
Source2: https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-%{llvm_version_major}.0.0/llvm/utils/not/not.cpp
Source3: https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-%{llvm_version_major}.0.0/llvm/utils/FileCheck/FileCheck.cpp
Patch0: 0001-test-disable-until-it-is-fixed.patch
Patch1: 0001-Support-FileHandling.cpp-rewrite-to-C-14.patch
Patch2: 0002-llvm13-llvm-fs-F_None-has-been-removed.patch
Patch3: 0003-llvm13-llvm-cl-GeneralCategory-is-no-longer-a-global.patch
Patch4: 0004-llvm13-CreateLoad-API-with-implicit-types-has-been-d.patch
Patch5: 0005-llvm13-CreateGEP-no-longer-accepts-nullptr.patch
Patch6: 0006-llvm13-llvm-APInt-toString-has-been-moved-to-StringE.patch
Patch7: 0007-llvm13-Add-LLVM-13-to-lit.cfg.patch
Patch8: 0008-llvm13-Add-LLVM-13-to-Travis-CI-and-GitHub-Actions.patch
BuildRequires: clang%{llvm_version}
BuildRequires: cmake