Hello community,

here is the log from the commit of package klee for openSUSE:Factory checked in 
at 2017-04-28 09:13:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/klee (Old)
 and      /work/SRC/openSUSE:Factory/.klee.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "klee"

Fri Apr 28 09:13:49 2017 rev:2 rq:491222 version:1.3.0+20170409

Changes:
--------
--- /work/SRC/openSUSE:Factory/klee/klee.changes        2017-03-10 
21:45:55.621671998 +0100
+++ /work/SRC/openSUSE:Factory/.klee.new/klee.changes   2017-04-28 
09:13:52.941183343 +0200
@@ -1,0 +2,109 @@
+Wed Apr 26 09:18:55 UTC 2017 - [email protected]
+
+- Update to version 1.3.0+20170409:
+  * [TravisCI] Check if `METASMT_VERSION` is set and abort if it is not set. 
Also exit if any of the commands in `.travis/metaSMT.sh` fail.
+  * [TravisCI] Try to unbreak the metaSMT build.
+  * [TravisCI] Try unbreaking the TravisCI metaSMT build. Copying across the 
`cmake` directory breaks KLEE's CMake build.
+  * [CMake] Try to fix bug reported by #633.
+  * [CMake] Fix #631
+  * [CMake] When supported pass `USES_TERMINAL` argument to 
`ExternalProject_Add_Step()` so that when using Ninja the output of the bitcode 
build system is shown immediately.
+  * [CMake] Add the `clean_runtime` top level target to provide an easy way to 
clean the runtime build.
+  * [Docker] Unbreak build.
+  * [TravisCI] Make handling of `TRAVIS_OS_NAME` more robust by not assuming 
that its value not being `linux` implies `osx`.
+  * test: lit, add geq/lt-llvm- configs
+  * [NFC] Reindent `test/lit.cfg` and add vim mode line to use right 
indentation and syntax highlighting.
+  * [travis] fix a git submodule failure of metaSMT
+  * [CMake] Don't redownload FileCheck.cpp if it exists
+  * Removed unused variable 'fake_object' in MemoryObject
+
+-------------------------------------------------------------------
+Tue Mar 28 13:43:30 UTC 2017 - [email protected]
+
+- Update to version 1.3.0+20170328:
+  * runtime: POSIX, make it compile with glibc 2.25
+  * [Lit] Add system information (linux/darwim) to LIT configuration. Added 
'not-*' features that exist if target operating system does not match a list of 
know operating systems.
+  * Fix test case for OSX: only weak aliases are supported on darwin Rewritten 
tests by replacing 'XFAIL: darwin' with 'REQUIRES: not-darwin'
+  * test: fix 'not' build
+  * test: POSIX, stop FD_Fail to fail
+  * runtime: POSIX, check path prior dereference
+  * [travis] use a proper version of metaSMT via environment variable 
METASMT_VERSION
+  * [travis] build metaSMT without C++11
+  * remove special handling of metaSMT_CXXFLAGS (unnecessary now as we use a 
fixed version of metaSMT with this flag being properly set)
+  * [WIP] Fix bug where stats would not be updated on early exit caused by 
finding a bug with the `-exit-on-error` option enabled.
+  * Replace `llvm:errs()` with `klee_error()` as suggested by @andreamattavelli
+  * Add test case to check that on early exits stats are flushed
+  * Add `AssignmentValidatingSolver`. It's purpose is to check any computed 
assignments against the corresponding `Query` object and check the assignment 
evaluates correctly.
+  * [CMake] Unbreak build due to not adding AssignmentValidatingSolver.cpp to 
list of source files.
+  * [Travis-CI] Refactored Z3 in its own script
+  * [Travis-CI] Added support for macOS build
+- enable checking of the result (%check section), only on x86_64
+- add some patches
+  * 0001-errno-define-__errno_location.patch
+  * 0001-test-DirSeek-make-it-XFAIL-temporarily.patch
+  * 0001-test-add-versions-of-some-tests-for-LLVM-3.8.patch
+- renamed patches
+  * 0005-Make-KLEE-compile-against-LLVM-3.7.patch
+       -> 0002-Make-KLEE-compile-against-LLVM-3.7.patch
+  * 0006-Make-KLEE-compile-against-LLVM-3.8.patch
+       -> 0003-Make-KLEE-compile-against-LLVM-3.8.patch
+- deleted patches (they are upstream)
+  * 0001-runtime-POSIX-make-it-compile-with-glibc-2.25.patch
+  * 0002-Fix-compiler-warning.patch
+  * 0004-Cleanup-removed-unneccessary-bools.patch
+  * 0007-fix-compilation-on-LLVM-3.8-after-rebase-to-master.patch
+
+-------------------------------------------------------------------
+Wed Mar 15 12:57:25 UTC 2017 - [email protected]
+
+- add 0001-runtime-POSIX-make-it-compile-with-glibc-2.25.patch
+- Update to version 1.3.0+20170307:
+  * klee: remove use of deprecated 'register'
+  * Makefile: change -std-compile-opts to -O3
+  * CommandLine: do not copy list in optionIsSet
+  * Teach KLEE to respect the requested memory alignment of globals and stack 
variables when possible.
+  * llvm: stop using global context
+  * Module: simplify is_object checks
+  * convert iterators using static_cast
+  * Core: MCJIT functions need unique names
+  * Added new option --warnings-only-to-file which causes warnings to be 
written to warnings.txt only.  Disabled by default.
+  * Updated test cases that check warning messages.
+  * Core: explicitly create CallSite from Instruction
+  * fix for PathOS.id
+  * Using klee_message instead of llvm:errs
+  * Moved printFileLine() to be part of KInstruction
+  * test: POSIX/DirSeek, cleanup
+  * test: ConstantExpr, fix bogus test
+
+-------------------------------------------------------------------
+Thu Mar  2 14:11:06 UTC 2017 - [email protected]
+
+- enable uclibc & POSIX runtime
+- add some %doc files
+
+-------------------------------------------------------------------
+Wed Feb 22 10:36:55 UTC 2017 - [email protected]
+
+- Update to version 1.3.0+20170221:
+  * Fix `Feature/MemoryLimit.c` test when building KLEE with ASan.
+  * [TravisCI] Modify TravisCI/Docker build scripts to support doing 
ASan/UBSan builds of KLEE.
+  * Fix the Autoconf/Makefile build system when building with coverage flags.
+  * Teach both build systems to pass the user provided CXXFLAGS and CFLAGS 
when using the native compiler in system tests.
+  * In legacy build system fix building libkleeRuntest when building with ASan.
+  * Increased the type size for the stop-after-n-instructions option to avoid 
too strict limitations
+  * Revert "Increased the type size for the stop-after-n-instructions option 
to a…"
+  * Silenced two "control may reach end of non-void function [-Wreturn-type]" 
compiler warnings, one by adding an assert, and the other by refactoring the 
choose() function.
+  * Removing unused lib/SMT directory
+  * Added error message when STP fails to fork.
+  * ReadExpr::create() was missing an opportunity to constant fold when 
handling constant arrays.
+  * Added unit tests for ReadExpr::create() to check that constant folding is 
correctly applied
+  * Added pre/post conditions as assertions
+  * Fixed assertion invocation: We were invoking bits64::truncateToNBits with 
a width greater than 64
+  * Refactoring code to improve readability by using UINT32/64_C macros
+  * Fix linker compatibility under macOS
+  * Increased the type size for the stop-after-n-instructions option to avoid 
too strict limitations (LLVM >= 3.0)
+  * Silenced warning: comparison of integers of different signs ('const int' 
and 'const unsigned long long')
+  * Add test case that causes an assertion failure in 
`klee::getDirectCallTarget(llvm::CallSite)`.
+  * Teach `klee::getDirectCallTarget()` to resolve weak aliases. This is 
controlled by a new parameter `moduleIsFullyLinked`. When true the linkage type 
of a weak alias is ignored. It is legal to do this when the module is fully 
linked because there won't be another function that could override the weak 
alias.
+  * fix metaSMT version
+
+-------------------------------------------------------------------

Old:
----
  0002-Fix-compiler-warning.patch
  0004-Cleanup-removed-unneccessary-bools.patch
  0005-Make-KLEE-compile-against-LLVM-3.7.patch
  0006-Make-KLEE-compile-against-LLVM-3.8.patch
  0007-fix-compilation-on-LLVM-3.8-after-rebase-to-master.patch
  klee-1.3.0+20170211.tar.xz

New:
----
  0001-errno-define-__errno_location.patch
  0001-test-DirSeek-make-it-XFAIL-temporarily.patch
  0001-test-add-versions-of-some-tests-for-LLVM-3.8.patch
  0002-Make-KLEE-compile-against-LLVM-3.7.patch
  0003-Make-KLEE-compile-against-LLVM-3.8.patch
  klee-1.3.0+20170409.tar.xz
  not.cpp

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ klee.spec ++++++
--- /var/tmp/diff_new_pack.QG9DkF/_old  2017-04-28 09:13:54.213003995 +0200
+++ /var/tmp/diff_new_pack.QG9DkF/_new  2017-04-28 09:13:54.217003431 +0200
@@ -15,33 +15,44 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-%define llvm_version 3_8
-
-%define version_unconverted 1.3.0+20170211
+%define llvm_version_major 3
+%define llvm_version_minor 8
+%define llvm_version %{llvm_version_major}_%{llvm_version_minor}
+
+%define version_unconverted 1.3.0+20170409
+
+%ifarch %{ix86} x86_64
+%define with_uclibc 1
+%else
+%define with_uclibc 0
+%endif
 
 Name:           klee
 Summary:        LLVM Execution Engine
 License:        NCSA
 Group:          Development/Languages/Other
-Version:        1.3.0+20170211
+Version:        1.3.0+20170409
 Release:        0
 Url:            http://klee.github.io/
 Source0:        %{name}-%{version}.tar.xz
 Source1:        %{name}-rpmlintrc
+Source2:        
https://raw.githubusercontent.com/llvm-mirror/llvm/release_%{llvm_version_major}%{llvm_version_minor}/utils/not/not.cpp
 Patch0:         0001-Make-KLEE-compile-against-LLVM-3.5-and-3.6.patch
-Patch1:         0002-Fix-compiler-warning.patch
-Patch3:         0004-Cleanup-removed-unneccessary-bools.patch
-Patch4:         0005-Make-KLEE-compile-against-LLVM-3.7.patch
-Patch5:         0006-Make-KLEE-compile-against-LLVM-3.8.patch
-Patch6:         0007-fix-compilation-on-LLVM-3.8-after-rebase-to-master.patch
-BuildRequires:  bison
+Patch1:         0002-Make-KLEE-compile-against-LLVM-3.7.patch
+Patch2:         0003-Make-KLEE-compile-against-LLVM-3.8.patch
+Patch3:         0001-test-add-versions-of-some-tests-for-LLVM-3.8.patch
+Patch4:         0001-errno-define-__errno_location.patch
+Patch5:         0001-test-DirSeek-make-it-XFAIL-temporarily.patch
 BuildRequires:  clang%{llvm_version}
 BuildRequires:  cmake
-BuildRequires:  flex
 BuildRequires:  gperftools-devel
+%if %{with_uclibc}
+BuildRequires:  klee-uclibc-devel-static
+%endif
 BuildRequires:  libacl-devel
 BuildRequires:  libcap-devel
 BuildRequires:  libselinux-devel
+BuildRequires:  lit
 BuildRequires:  llvm%{llvm_version}-devel
 BuildRequires:  ninja
 BuildRequires:  python-base
@@ -58,10 +69,12 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
+mkdir -p build/test/
+cp %{SOURCE2} build/test/
 
 %build
 %define __builder ninja
@@ -74,12 +87,23 @@
        -DENABLE_SOLVER_STP=ON \
        -DENABLE_TCMALLOC=ON \
        -DENABLE_UNIT_TESTS=OFF \
-       -DENABLE_SYSTEM_TESTS=OFF \
+       -DENABLE_SYSTEM_TESTS=ON \
        -DCMAKE_C_FLAGS="%optflags" \
        -DCMAKE_CXX_FLAGS="%optflags" \
+%if %{with_uclibc}
+       -DENABLE_POSIX_RUNTIME=ON \
+       -DENABLE_KLEE_UCLIBC=ON \
+       -DKLEE_UCLIBC_PATH=%{_libdir}/klee-uclibc/ \
+%endif
        -DBUILD_SHARED_LIBS:BOOL=OFF
 %make_jobs
 
+%check
+%ifarch x86_64
+cd build
+ninja check
+%endif
+
 %install
 %cmake_install
 
@@ -89,6 +113,7 @@
 
 %files
 %defattr(-,root,root)
+%doc LICENSE.TXT NEWS README.md TODO.txt
 %{_bindir}/gen-random-bout
 %{_bindir}/kleaver
 %{_bindir}/klee
@@ -99,6 +124,11 @@
 %{_libdir}/libkleeRuntest.so*
 %dir %{_libdir}/klee/
 %dir %{_libdir}/klee/runtime/
-%{_libdir}/klee/runtime/klee*.bc
+%{_libdir}/klee/runtime/klee-libc.bc
+%{_libdir}/klee/runtime/kleeRuntimeIntrinsic.bc
+%if %{with_uclibc}
+%{_libdir}/klee/runtime/klee-uclibc.bca
+%{_libdir}/klee/runtime/libkleeRuntimePOSIX.bca
+%endif
 
 %changelog

++++++ 0001-Make-KLEE-compile-against-LLVM-3.5-and-3.6.patch ++++++
++++ 1020 lines (skipped)
++++ between 
/work/SRC/openSUSE:Factory/klee/0001-Make-KLEE-compile-against-LLVM-3.5-and-3.6.patch
++++ and 
/work/SRC/openSUSE:Factory/.klee.new/0001-Make-KLEE-compile-against-LLVM-3.5-and-3.6.patch

++++++ 0001-errno-define-__errno_location.patch ++++++
From: Jiri Slaby <[email protected]>
Date: Fri, 17 Mar 2017 13:15:18 +0100
Subject: errno: define __errno_location
Patch-mainline: no

POSIX runtime library is built on my system with a reference to
__errno_location(). And then it is undefined when klee is run
--with-posix:
KLEE: NOTE: Using model: lib/libkleeRuntimePOSIX.bca
KLEE: output directory is "test/Runtime/POSIX/Output/Read1.c.tmp.klee-out"
KLEE: Using STP solver backend
KLEE: WARNING: undefined reference to function: __errno_location
KLEE: WARNING ONCE: calling external: __errno_location()
KLEE: ERROR: (location information missing) ASSERTION FAIL: x == -1 && errno == 
EFAULT
KLEE: NOTE: now ignoring this error at this location
EXITING ON ERROR:
Error: ASSERTION FAIL: x == -1 && errno == EFAULT
Stack:
       #000000170 in main (argc=4, argv=24928704)

Therefore, the tests fail.

Define __errno_location as a weak symbol to return the actual int errno.

Signed-off-by: Jiri Slaby <[email protected]>
---
 runtime/POSIX/errno_location.c | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 runtime/POSIX/errno_location.c

diff --git a/runtime/POSIX/errno_location.c b/runtime/POSIX/errno_location.c
new file mode 100644
index 000000000000..58a5dab631ae
--- /dev/null
+++ b/runtime/POSIX/errno_location.c
@@ -0,0 +1,9 @@
+#include <errno.h>
+
+#undef errno
+int errno __attribute__((weak));
+
+int __attribute__((weak)) *__errno_location(void)
+{
+       return &errno;
+}
-- 
2.12.0

++++++ 0001-test-DirSeek-make-it-XFAIL-temporarily.patch ++++++
From: Jiri Slaby <[email protected]>
Date: Fri, 17 Mar 2017 13:40:30 +0100
Subject: test: disable some tests temporarily
Patch-mainline: no

They fail for some reason I cannot debug ATM, I will fix it later.

Signed-off-by: Jiri Slaby <[email protected]>
---
 test/Runtime/POSIX/DirSeek.c |    1 +
 test/Runtime/POSIX/Ioctl.c   |    1 +
 2 files changed, 2 insertions(+)

--- a/test/Runtime/POSIX/DirSeek.c
+++ b/test/Runtime/POSIX/DirSeek.c
@@ -8,6 +8,7 @@
 // RUN: rm -rf %t.klee-out %t.klee-out-tmp
 // RUN: %gentmp %t.klee-out-tmp
 // RUN: %klee --output-dir=%t.klee-out --run-in=%t.klee-out-tmp --libc=uclibc 
--posix-runtime --exit-on-error %t2.bc --sym-files 0 2
+// XFAIL: *
 
 // For this test really to work as intended it needs to be run in a
 // directory large enough to cause uclibc to do multiple getdents
--- a/test/Runtime/POSIX/Ioctl.c
+++ b/test/Runtime/POSIX/Ioctl.c
@@ -1,6 +1,7 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --posix-runtime --exit-on-error %t.bc 
--sym-files 0 4
+// REQUIRES: undefined-symbol
 
 #include <assert.h>
 #include <fcntl.h>
++++++ 0001-test-add-versions-of-some-tests-for-LLVM-3.8.patch ++++++
++++ 1620 lines (skipped)

++++++ 0005-Make-KLEE-compile-against-LLVM-3.7.patch -> 
0002-Make-KLEE-compile-against-LLVM-3.7.patch ++++++
--- 
/work/SRC/openSUSE:Factory/klee/0005-Make-KLEE-compile-against-LLVM-3.7.patch   
    2017-03-10 21:45:55.441697524 +0100
+++ 
/work/SRC/openSUSE:Factory/.klee.new/0002-Make-KLEE-compile-against-LLVM-3.7.patch
  2017-04-28 09:13:52.665222258 +0200
@@ -1,37 +1,21 @@
 From: =?UTF-8?q?Richard=20Trembeck=C3=BD?= <[email protected]>
 Date: Thu, 28 Apr 2016 18:27:24 +0200
-Subject: Make KLEE compile against LLVM 3.7
+Subject: llvm: make KLEE compile against LLVM 3.7
 Patch-mainline: no
 
-Signed-off-by: Jiri Slaby <[email protected]>
+Signed-off-by: Jiri Slaby <[email protected]>
 ---
- include/klee/CommandLine.h                      |  3 +-
- include/klee/Internal/Support/FloatEvaluation.h |  7 +++++
- lib/Core/ExternalDispatcher.cpp                 | 15 ++++++----
- lib/Core/StatsTracker.cpp                       |  3 +-
- lib/Module/InstructionInfoTable.cpp             |  8 ++++-
- lib/Module/IntrinsicCleaner.cpp                 | 14 +++++++++
- lib/Module/KModule.cpp                          | 13 ++++++++-
- lib/Module/ModuleUtil.cpp                       | 24 +++++++++++++--
- lib/Module/Optimize.cpp                         | 39 +++++++++++++++++--------
- lib/Module/RaiseAsm.cpp                         |  6 ++--
- tools/klee/main.cpp                             |  9 +++++-
- 11 files changed, 113 insertions(+), 28 deletions(-)
+ include/klee/Internal/Support/FloatEvaluation.h |  7 +++++++
+ lib/Core/ExternalDispatcher.cpp                 |  4 ++++
+ lib/Module/InstructionInfoTable.cpp             |  8 +++++++-
+ lib/Module/IntrinsicCleaner.cpp                 | 14 ++++++++++++++
+ lib/Module/KModule.cpp                          | 13 ++++++++++++-
+ lib/Module/ModuleUtil.cpp                       | 22 +++++++++++++++++++---
+ lib/Module/Optimize.cpp                         | 21 +++++++++++++++++++--
+ lib/Module/RaiseAsm.cpp                         |  5 ++++-
+ tools/klee/main.cpp                             |  6 +++++-
+ 9 files changed, 91 insertions(+), 9 deletions(-)
 
-diff --git a/include/klee/CommandLine.h b/include/klee/CommandLine.h
-index 95aa51e041e2..cc186db711fc 100644
---- a/include/klee/CommandLine.h
-+++ b/include/klee/CommandLine.h
-@@ -70,8 +70,7 @@ extern llvm::cl::opt<klee::MetaSMTBackendType> 
MetaSMTBackend;
- 
- //A bit of ugliness so we can use cl::list<> like cl::bits<>, see 
queryLoggingOptions
- template <typename T>
--static bool optionIsSet(llvm::cl::list<T> list, T option)
--{
-+static bool optionIsSet(llvm::cl::list<T> &list, T option) {
-     return std::find(list.begin(), list.end(), option) != list.end();
- }
- 
 diff --git a/include/klee/Internal/Support/FloatEvaluation.h 
b/include/klee/Internal/Support/FloatEvaluation.h
 index 6d9092f2ea37..436e0dc8152f 100644
 --- a/include/klee/Internal/Support/FloatEvaluation.h
@@ -53,47 +37,23 @@
    }
  }
 diff --git a/lib/Core/ExternalDispatcher.cpp b/lib/Core/ExternalDispatcher.cpp
-index 09dd715a53ae..fa29f6e3047c 100644
+index 9701d35add85..d49373f84e64 100644
 --- a/lib/Core/ExternalDispatcher.cpp
 +++ b/lib/Core/ExternalDispatcher.cpp
-@@ -253,11 +253,16 @@ Function *ExternalDispatcher::createDispatcher(Function 
*target, Instruction *in
-     // functions.
+@@ -257,7 +257,11 @@ Function *ExternalDispatcher::createDispatcher(Function 
*target, Instruction *in
      LLVM_TYPE_Q Type *argTy = (i < FTy->getNumParams() ? FTy->getParamType(i) 
: 
                                 (*ai)->getType());
--    Instruction *argI64p = 
--      GetElementPtrInst::Create(argI64s, 
--                                
ConstantInt::get(Type::getInt32Ty(getGlobalContext()), 
--                                                 idx), 
--                                "", dBB);
-+    Instruction *argI64p =
-+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
-+        GetElementPtrInst::Create(
-+            nullptr, argI64s,
-+#else
-+        GetElementPtrInst::Create(
-+            argI64s,
-+#endif
-+            ConstantInt::get(Type::getInt32Ty(getGlobalContext()), idx), "",
-+            dBB);
- 
-     Instruction *argp = new BitCastInst(argI64p, 
PointerType::getUnqual(argTy),
-                                         "", dBB);
-diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
-index b1851bbae545..5c21b5eaeeef 100644
---- a/lib/Core/StatsTracker.cpp
-+++ b/lib/Core/StatsTracker.cpp
-@@ -167,7 +167,8 @@ static bool instructionIsCoverable(Instruction *i) {
-     } else {
-       Instruction *prev = --it;
-       if (isa<CallInst>(prev) || isa<InvokeInst>(prev)) {
--        Function *target = getDirectCallTarget(prev);
-+        CallSite cs(prev);
-+        Function *target = getDirectCallTarget(cs);
-         if (target && target->doesNotReturn())
-           return false;
-       }
+     Instruction *argI64p = 
++#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
++      GetElementPtrInst::Create(nullptr, argI64s,
++#else
+       GetElementPtrInst::Create(argI64s, 
++#endif
+                                 ConstantInt::get(Type::getInt32Ty(ctx), idx),
+                                 "", dBB);
+ 
 diff --git a/lib/Module/InstructionInfoTable.cpp 
b/lib/Module/InstructionInfoTable.cpp
-index 7e9a9e268b40..53c64878391f 100644
+index adf054423f13..625c4a297ead 100644
 --- a/lib/Module/InstructionInfoTable.cpp
 +++ b/lib/Module/InstructionInfoTable.cpp
 @@ -87,7 +87,7 @@ static void buildInstructionToLineMap(Module *m,
@@ -122,28 +82,28 @@
    }
  
 diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
-index 54582e6954cf..66e9392a618d 100644
+index 3f7644af3d37..9af6f9f40f21 100644
 --- a/lib/Module/IntrinsicCleaner.cpp
 +++ b/lib/Module/IntrinsicCleaner.cpp
-@@ -109,11 +109,25 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock 
&b, Module &M) {
+@@ -110,11 +110,25 @@ 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);
-           Value *off = ConstantInt::get(Type::getInt64Ty(getGlobalContext()), 
1);
+           Value *off = ConstantInt::get(Type::getInt64Ty(ctx), 1);
 +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
-+          pDst =
-+              GetElementPtrInst::Create(nullptr, pDst, off, std::string(), 
ii);
-+          pSrc =
-+              GetElementPtrInst::Create(nullptr, pSrc, off, std::string(), 
ii);
++          pDst = GetElementPtrInst::Create(nullptr, pDst, off, std::string(),
++            ii);
++          pSrc = GetElementPtrInst::Create(nullptr, pSrc, off, std::string(),
++            ii);
 +#else
            pDst = GetElementPtrInst::Create(pDst, off, std::string(), ii);
            pSrc = GetElementPtrInst::Create(pSrc, off, std::string(), ii);
 +#endif
            val = new LoadInst(pSrc, std::string(), ii); new StoreInst(val, 
pDst, ii);
 +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
-+          pDst =
-+              GetElementPtrInst::Create(nullptr, pDst, off, std::string(), 
ii);
-+          pSrc =
-+              GetElementPtrInst::Create(nullptr, pSrc, off, std::string(), 
ii);
++          pDst = GetElementPtrInst::Create(nullptr, pDst, off, std::string(),
++            ii);
++          pSrc = GetElementPtrInst::Create(nullptr, pSrc, off, std::string(),
++            ii);
 +#else
            pDst = GetElementPtrInst::Create(pDst, off, std::string(), ii);
            pSrc = GetElementPtrInst::Create(pSrc, off, std::string(), ii);
@@ -152,7 +112,7 @@
          }
          ii->removeFromParent();
 diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
-index 598c439f9da0..cc328b1bb974 100644
+index 45dc34bfec46..4fac18739aba 100644
 --- a/lib/Module/KModule.cpp
 +++ b/lib/Module/KModule.cpp
 @@ -46,8 +46,11 @@
@@ -168,7 +128,7 @@
  #include "llvm/Support/CommandLine.h"
  #include "llvm/Support/raw_ostream.h"
  #include "llvm/Support/raw_os_ostream.h"
-@@ -301,7 +304,11 @@ void KModule::prepare(const Interpreter::ModuleOptions 
&opts,
+@@ -305,7 +308,11 @@ void KModule::prepare(const Interpreter::ModuleOptions 
&opts,
    // invariant transformations that we will end up doing later so that
    // optimize is seeing what is as close as possible to the final
    // module.
@@ -180,7 +140,7 @@
    pm.add(new RaiseAsmPass());
    if (opts.CheckDivZero) pm.add(new DivCheckPass());
    if (opts.CheckOvershift) pm.add(new OvershiftCheckPass());
-@@ -369,7 +376,11 @@ void KModule::prepare(const Interpreter::ModuleOptions 
&opts,
+@@ -373,7 +380,11 @@ void KModule::prepare(const Interpreter::ModuleOptions 
&opts,
    // linked in something with intrinsics but any external calls are
    // going to be unresolved. We really need to handle the intrinsics
    // directly I think?
@@ -193,65 +153,60 @@
    switch(SwitchType) {
    case eSwitchTypeInternal: break;
 diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
-index 83e7260ce250..c2f06e484c31 100644
+index c7f1c6d9d4a7..de0130a2632c 100644
 --- a/lib/Module/ModuleUtil.cpp
 +++ b/lib/Module/ModuleUtil.cpp
-@@ -272,14 +272,22 @@ static bool linkBCA(object::Archive* archive, Module* 
composite, std::string& er
- // FIXME: Maybe load bitcode file lazily? Then if we need to link, materialise
- // the module
+@@ -274,13 +274,21 @@ static bool linkBCA(object::Archive* archive, Module* 
composite, std::string& er
+         Module *Result = 0;
+         // FIXME: Maybe load bitcode file lazily? Then if we need to link, 
materialise the module
  #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
+-        ErrorOr<Module *> resultErr = parseBitcodeFile(buff.get(),
+-          composite->getContext());
 +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
-+        ErrorOr<std::unique_ptr<Module> > Result_error =
++        ErrorOr<std::unique_ptr<Module> > resultErr =
 +#else
-         ErrorOr<Module *> Result_error =
++        ErrorOr<Module *> resultErr =
 +#endif
-             parseBitcodeFile(buff.get(), getGlobalContext());
-         ec = Result_error.getError();
++          parseBitcodeFile(buff.get(), composite->getContext());
+         ec = resultErr.getError();
          if (ec)
            errorMessage = ec.message();
          else
--          Result = Result_error.get();
 +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
-+          Result = Result_error->release();
- #else
-+          Result = Result_error.get();
++          Result = resultErr->release();
++#else
+           Result = resultErr.get();
 +#endif
-+#else // LLVM 3.3, 3.4
-         Result =
-             ParseBitcodeFile(buff.get(), getGlobalContext(), &errorMessage);
- #endif
-@@ -416,8 +424,15 @@ Module *klee::linkWithLibrary(Module *module,
- 
+ #else
+         Result = ParseBitcodeFile(buff.get(), composite->getContext(),
+           &errorMessage);
+@@ -439,7 +447,12 @@ Module *klee::linkWithLibrary(Module *module,
    if (magic == sys::fs::file_magic::bitcode) {
- 
+     Module *Result = 0;
+ #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
+-    ErrorOr<Module *> ResultErr = parseBitcodeFile(Buffer, Context);
 +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
-+    ErrorOr<std::unique_ptr<Module> > Result = parseBitcodeFile(buff, 
Context);
-+
-+    if ((ec = Buffer.getError()) || Linker::LinkModules(module, 
Result->get()))
-+      klee_error("Link with library %s failed: %s", libraryName.c_str(),
-+                 ec.message().c_str());
-+#else // LLVM 3.5, 3.6
-     ErrorOr<Module *> Result = parseBitcodeFile(buff, Context);
--#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
-+#if LLVM_VERSION_CODE == LLVM_VERSION(3, 6)
-     if ((ec = Buffer.getError()) || Linker::LinkModules(module, Result.get()))
- #else // LLVM 3.5
-     if ((ec = Buffer.getError()) ||
-@@ -426,8 +441,11 @@ Module *klee::linkWithLibrary(Module *module,
- #endif
-       klee_error("Link with library %s failed: %s", libraryName.c_str(),
-                  ec.message().c_str());
--
++    ErrorOr<std::unique_ptr<Module> > ResultErr =
++#else
++    ErrorOr<Module *> ResultErr =
++#endif
++      parseBitcodeFile(Buffer, Context);
+     if ((ec = ResultErr.getError())) {
+       ErrorMessage = ec.message();
+ #else
+@@ -464,7 +477,10 @@ Module *klee::linkWithLibrary(Module *module,
+           ErrorMessage.c_str());
+     }
+ 
 +// unique_ptr owns the Module, we don't have to delete it
 +#if LLVM_VERSION_CODE < LLVM_VERSION(3, 7)
-     delete Result.get();
-+#endif
+     delete Result;
 +#endif
  
    } else if (magic == sys::fs::file_magic::archive) {
  #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
 diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp
-index 8cd592069523..3eca0db6c174 100644
+index c0f3f34ca8e8..68acd2b17dda 100644
 --- a/lib/Module/Optimize.cpp
 +++ b/lib/Module/Optimize.cpp
 @@ -16,7 +16,11 @@
@@ -291,7 +246,7 @@
    PM.add(createVerifierPass());                  // Verify that input is 
correct
  
  #if LLVM_VERSION_CODE < LLVM_VERSION(3, 0)
-@@ -166,27 +177,31 @@ static void AddStandardCompilePasses(PassManager &PM) {
+@@ -166,14 +177,20 @@ static void AddStandardCompilePasses(PassManager &PM) {
  void Optimize(Module *M, const std::string &EntryPoint) {
  
    // Instantiate the pass manager to organize the passes.
@@ -305,44 +260,22 @@
    if (VerifyEach)
      Passes.add(createVerifierPass());
  
--#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
-+#if LLVM_VERSION_CODE <= LLVM_VERSION(3, 1)
-+  // Add an appropriate TargetData instance for this module...
-+  addPass(Passes, new TargetData(M));
-+#elif LLVM_VERSION_CODE <= LLVM_VERSION(3, 4)
-   // Add an appropriate DataLayout instance for this module...
--  DataLayoutPass *dlpass = new DataLayoutPass();
--  dlpass->doInitialization(*M);
--  addPass(Passes, dlpass);
--#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
-+  addPass(Passes, new DataLayout(M));
-+#elif LLVM_VERSION_CODE == LLVM_VERSION(3, 5)
-   // Add an appropriate DataLayout instance for this module...
-   addPass(Passes, new DataLayoutPass(M));
--#elif LLVM_VERSION_CODE > LLVM_VERSION(3, 1)
-+#elif LLVM_VERSION_CODE == LLVM_VERSION(3, 6)
    // Add an appropriate DataLayout instance for this module...
--  addPass(Passes, new DataLayout(M));
--#else
--  // Add an appropriate TargetData instance for this module...
--  addPass(Passes, new TargetData(M));
--#endif
-+  DataLayoutPass *dlpass = new DataLayoutPass();
-+  dlpass->doInitialization(*M);
-+  addPass(Passes, dlpass);
-+#endif // LLVM 3.7+ doesn't have DataLayoutPass anymore.
- 
-   // DWD - Run the opt standard pass list as well.
-   AddStandardCompilePasses(Passes);
+-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
++#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
++  // LLVM 3.7+ doesn't have DataLayoutPass anymore.
++#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
+   DataLayoutPass *dlpass = new DataLayoutPass();
+   dlpass->doInitialization(*M);
+   addPass(Passes, dlpass);
 diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
-index bde9fba93c3a..a2972ce7ee9b 100644
+index 5fc54ef17743..29576ad10e9e 100644
 --- a/lib/Module/RaiseAsm.cpp
 +++ b/lib/Module/RaiseAsm.cpp
-@@ -103,8 +103,10 @@ bool RaiseAsmPass::runOnModule(Module &M) {
+@@ -103,7 +103,10 @@ bool RaiseAsmPass::runOnModule(Module &M) {
      klee_warning("Warning: unable to select native target: %s", Err.c_str());
      TLI = 0;
    } else {
--
 -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
 +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
 +    TM = NativeTarget->createTargetMachine(HostTriple, "", "", 
TargetOptions());
@@ -352,21 +285,18 @@
      TLI = TM->getSubtargetImpl()->getTargetLowering();
  #elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 1)
 diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
-index 3747d69db0ed..9265abe04820 100644
+index 90d54e064dd3..20b1e33a6617 100644
 --- a/tools/klee/main.cpp
 +++ b/tools/klee/main.cpp
-@@ -59,6 +59,10 @@
- #include "llvm/Support/system_error.h"
- #endif
- 
-+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
+@@ -46,6 +46,7 @@
+ #include "llvm/Support/CommandLine.h"
+ #include "llvm/Support/ManagedStatic.h"
+ #include "llvm/Support/MemoryBuffer.h"
 +#include "llvm/Support/Path.h"
-+#endif
-+
- #include <dirent.h>
- #include <signal.h>
- #include <unistd.h>
-@@ -1292,8 +1296,11 @@ int main(int argc, char **argv, char **envp) {
+ #include "llvm/Support/raw_ostream.h"
+ 
+ #if LLVM_VERSION_CODE < LLVM_VERSION(3, 0)
+@@ -1290,8 +1291,11 @@ int main(int argc, char **argv, char **envp) {
      // from the std::unique_ptr
      Buffer->release();
    }
@@ -380,5 +310,5 @@
      klee_error("error loading program '%s': %s", InputFile.c_str(),
                 ec.message().c_str());
 -- 
-2.11.1
+2.12.0
 

++++++ 0005-Make-KLEE-compile-against-LLVM-3.7.patch -> 
0003-Make-KLEE-compile-against-LLVM-3.8.patch ++++++
++++ 602 lines (skipped)
++++ between 
/work/SRC/openSUSE:Factory/klee/0005-Make-KLEE-compile-against-LLVM-3.7.patch
++++ and 
/work/SRC/openSUSE:Factory/.klee.new/0003-Make-KLEE-compile-against-LLVM-3.8.patch

++++++ _service ++++++
--- /var/tmp/diff_new_pack.QG9DkF/_old  2017-04-28 09:13:54.340985947 +0200
+++ /var/tmp/diff_new_pack.QG9DkF/_new  2017-04-28 09:13:54.344985384 +0200
@@ -1,13 +1,13 @@
 <services>
-  <service name="tar_scm" mode="localonly">
+  <service name="tar_scm" mode="disabled">
     <param name="url">git://github.com/klee/klee.git</param>
     <param name="scm">git</param>
     <param name="changesgenerate">enable</param>
     <param name="versionformat">1.3.0+%cd</param>
   </service>
-  <service name="recompress" mode="localonly">
+  <service name="recompress" mode="disabled">
     <param name="file">klee-*.tar</param>
     <param name="compression">xz</param>
   </service>
-  <service name="set_version" mode="localonly" />
+  <service name="set_version" mode="disabled" />
 </services>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.QG9DkF/_old  2017-04-28 09:13:54.372981436 +0200
+++ /var/tmp/diff_new_pack.QG9DkF/_new  2017-04-28 09:13:54.372981436 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param name="url">git://github.com/klee/klee.git</param>
-          <param 
name="changesrevision">3dd14b8de73b8662217dcb931b28f4e9ff823c4f</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">28872c1a0cb8a8f6b835af67719b9cd9aba66d3f</param></service></servicedata>
\ No newline at end of file

++++++ klee-1.3.0+20170211.tar.xz -> klee-1.3.0+20170409.tar.xz ++++++
++++ 5317 lines of diff (skipped)

++++++ klee-rpmlintrc ++++++
--- /var/tmp/diff_new_pack.QG9DkF/_old  2017-04-28 09:13:55.188866383 +0200
+++ /var/tmp/diff_new_pack.QG9DkF/_new  2017-04-28 09:13:55.188866383 +0200
@@ -1,2 +1,3 @@
 addFilter("shlib-policy-name-error.*libkleeRuntest1_0")
+addFilter("binaryinfo-readelf-failed.*bca")
 addFilter("devel-file-in-non-devel-package")

++++++ not.cpp ++++++
//===- not.cpp - The 'not' testing tool -----------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Usage:
//   not cmd
//     Will return true if cmd doesn't crash and returns false.
//   not --crash cmd
//     Will return true if cmd crashes (e.g. for testing crash reporting).

#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;

int main(int argc, const char **argv) {
  bool ExpectCrash = false;

  ++argv;
  --argc;

  if (argc > 0 && StringRef(argv[0]) == "--crash") {
    ++argv;
    --argc;
    ExpectCrash = true;
  }

  if (argc == 0)
    return 1;

  auto Program = sys::findProgramByName(argv[0]);
  if (!Program) {
    errs() << "Error: Unable to find `" << argv[0]
           << "' in PATH: " << Program.getError().message() << "\n";
    return 1;
  }

  std::string ErrMsg;
  int Result = sys::ExecuteAndWait(*Program, argv, nullptr, nullptr, 0, 0,
                                   &ErrMsg);
#ifdef _WIN32
  // Handle abort() in msvcrt -- It has exit code as 3.  abort(), aka
  // unreachable, should be recognized as a crash.  However, some binaries use
  // exit code 3 on non-crash failure paths, so only do this if we expect a
  // crash.
  if (ExpectCrash && Result == 3)
    Result = -3;
#endif
  if (Result < 0) {
    errs() << "Error: " << ErrMsg << "\n";
    if (ExpectCrash)
      return 0;
    return 1;
  }

  if (ExpectCrash)
    return 1;

  return Result == 0;
}

Reply via email to