Accepting request 632727 from devel:tools:statica
- Update to version 1.4.0+20180829:
* klee-stats: add TResolve(%) to --print-all
* llvm.sh: fix patch source paths
* Disabled unit testing in default build
* Fixed runtest library to handle the case of a NULL "name" argument in klee_make_symbolic. Changed a test case to check this feature.
* Replace remaining *Inst::Create() calls with llvm::Builder
* [clang-format]Allow longer codelines in test/
* test: remove geq-llvm-3.4
* remove last comma from -debug-print-escaping-functions
* test/Feature/EscapingFunctionsAlias.c: clarify alias(ee) casting
* add declarations to escapingFunctions
* ModuleUtil: improve and test valueIsOnlyCalled
* fix: LLVM 3.5, begin_user() instead of begin_use()
* ExternalDispatcher: setErrorStr for EngineBuilder
* travis CI: add LLVM 3.8 build tests
* llvm38: test, change some tests
* llvm38: no more implicit iterators
* llvm38: archive child iterator changes
* llvm38: adapt to new Linker::linkModules
* llvm38: SmallString is always up-to-date
* llvm38: handle optimization passes changes
* llvm38: no rounding in APFloat
* Fix uploading of coverage information from inside of docker
* Add missing curl
* Fix slow Mac Travis build: wildcard is not expanded with quotes
* Added "override" in Executor.h to silence compiler warnings (and ran clang-format on patch)
* Removed support for klee_make_symbolic with 2 arguments. This has been deprecated for many years now and causes problems during replay. Changed and simplified affected test case.
* test: remove undefined behaviour
* Enabled tcmalloc by default
* Link dynamic libraries with specific paths instead of resolving them during runtime
* Fix incorrect invocation of klee
* Fix uninitialized memory: enums have to be initialized
* Add missing out-of-tree include files directory for TCMalloc
* Fix compiler warnings if assertions are disabled
* Support sanitizer suppression files with lit-based testing
* Extensive updates to the build script for dependencies and docker
* runtime: remove obsolete code for building modules instead of archives
* Reorder linking and optimizations
* Reorganise runtime libraries provided by KLEE
* Removed obsolete script
* test/lit.cfg: remove obsolete hack from (LLVM < 3.0 is no longer supported)
* CMake: use cmake_{push,pop}_check_state
* CMake: check for ctype and mallinfo functions with CXX instead of C compiler
* fix out of range access in KleeHandler::getKTestFilesInDir
* Explicitly initialize value to squelch a potentially uninitialized value warning
* Fix the final -Wimplicit-fallthrough warning
* Make ConstantExpr hashing function faster and modify affected test
- added patches:
* 0003-llvm39-switch-KLEE_RUNTIME_BUILD_TYPE-to-Debug-Asser.patch
* 0005-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
* 0020-llvm50-CallSite.paramHasAttr-is-indexed-from-0.patch
- removed patches (in upstream now):
* 0001-test-remove-undefined-behaviour.patch
* 0002-llvm38-no-rounding-in-APFloat.patch
* 0003-llvm38-handle-optimization-passes-changes.patch
* 0004-llvm38-SmallString-is-always-up-to-date.patch
* 0005-llvm38-materializeAllPermanently-was-renamed.patch
* 0006-llvm38-adapt-to-new-Linker-linkModules.patch
* 0007-llvm38-archive-child-iterator-changes.patch
* 0008-llvm38-no-more-implicit-iterators.patch
* 0009-llvm38-test-change-some-tests.patch
- renamed patches:
* 0010-llvm-make-KLEE-compile-against-LLVM-3.9.patch
-> 0001-llvm-make-KLEE-compile-against-LLVM-3.9.patch
* 0011-cmake-find_llvm-fix-libraries-with-llvm-config-3.9.patch
-> 0002-cmake-find_llvm-fix-libraries-with-llvm-config-3.9.patch
* 0012-llvm40-handle-different-header-names.patch
-> 0003-llvm39-switch-KLEE_RUNTIME_BUILD_TYPE-to-Debug-Asser.patch
* 0013-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
-> 0004-llvm40-handle-different-header-names.patch
* 0014-llvm40-errorOr-and-similar.patch
-> 0006-llvm40-errorOr-and-similar.patch
* 0015-llvm-use-chrono-helpers-from-LLVM-4.0.patch
-> 0007-llvm-use-chrono-helpers-from-LLVM-4.0.patch
* 0016-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
-> 0008-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
* 0017-llvm40-gep_type_iterator-has-no-operator.patch
-> 0009-llvm40-gep_type_iterator-has-no-operator.patch
* 0018-llvm50-avoid-on-function-arg_begin.patch
-> 0010-llvm50-avoid-on-function-arg_begin.patch
* 0019-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
-> 0011-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
* 0020-llvm50-handle-getOrInsertFunction-terminator.patch
-> 0012-llvm50-handle-getOrInsertFunction-terminator.patch
* 0021-llvm50-SwitchInst-case-functions-now-return-pointers.patch
-> 0013-llvm50-SwitchInst-case-functions-now-return-pointers.patch
* 0022-llvm50-handle-new-file_magic-s-location.patch
-> 0014-llvm50-handle-new-file_magic-s-location.patch
* 0023-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
-> 0015-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
* 0024-llvm50-AllocaInst-takes-address-space.patch
-> 0016-llvm50-AllocaInst-takes-address-space.patch
* 0025-llvm50-Intrinsic-objectsize-has-three-arguments.patch
-> 0017-llvm50-Intrinsic-objectsize-has-three-arguments.patch
* 0026-llvm50-test-change-objectsize.patch
-> 0018-llvm50-test-change-objectsize.patch
* 0027-llvm50-test-add-disable-O0-optnone-to-O0.patch
-> 0019-llvm50-test-add-disable-O0-optnone-to-O0.patch
* 0028-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
-> 0021-llvm6-SetVersionPrinter-now-passes-down-a-stream.patch
* 0029-llvm60-handle-headers-renaming.patch
-> 0022-llvm6-handle-headers-renaming.patch
- Update to version 1.4.0+20180614:
* Add unittest for DiscretePDF
* klee_int: allow NULL as name
* cmake: find_llvm, handle libLLVM-version.so properly
* Fixed memory leak from Executor::inCloseMerge, fixes #883
- Require python3-lit as the lit packaging was refactored
- switch to llvm 6
- removed patches:
* 0001-llvm-make-KLEE-compile-against-LLVM-3.8.patch
(it was split into multiple commits below)
* klee-skip-some-tests.patch
(tests should be working perfectly now)
- added patches:
* 0001-test-remove-undefined-behaviour.patch
* 0002-llvm38-no-rounding-in-APFloat.patch
* 0003-llvm38-handle-optimization-passes-changes.patch
* 0004-llvm38-SmallString-is-always-up-to-date.patch
* 0005-llvm38-materializeAllPermanently-was-renamed.patch
* 0006-llvm38-adapt-to-new-Linker-linkModules.patch
* 0007-llvm38-archive-child-iterator-changes.patch
* 0008-llvm38-no-more-implicit-iterators.patch
* 0011-cmake-find_llvm-fix-libraries-with-llvm-config-3.9.patch
* 0027-llvm50-test-add-disable-O0-optnone-to-O0.patch
- renamed patches:
* 0002-llvm38-test-change-some-tests.patch
-> 0009-llvm38-test-change-some-tests.patch
* 0003-llvm-make-KLEE-compile-against-LLVM-3.9.patch
-> 0010-llvm-make-KLEE-compile-against-LLVM-3.9.patch
* 0004-llvm40-handle-different-header-names.patch
-> 0012-llvm40-handle-different-header-names.patch
* 0005-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
-> 0013-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
* 0006-llvm40-errorOr-and-similar.patch
-> 0014-llvm40-errorOr-and-similar.patch
* 0007-llvm-use-chrono-helpers-from-LLVM-4.0.patch
-> 0015-llvm-use-chrono-helpers-from-LLVM-4.0.patch
* 0008-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
-> 0016-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
* 0009-llvm40-gep_type_iterator-has-no-operator.patch
-> 0017-llvm40-gep_type_iterator-has-no-operator.patch
* 0010-llvm50-avoid-on-function-arg_begin.patch
-> 0018-llvm50-avoid-on-function-arg_begin.patch
* 0011-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
-> 0019-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
* 0012-llvm50-handle-getOrInsertFunction-terminator.patch
-> 0020-llvm50-handle-getOrInsertFunction-terminator.patch
* 0013-llvm50-SwitchInst-case-functions-now-return-pointers.patch
-> 0021-llvm50-SwitchInst-case-functions-now-return-pointers.patch
* 0014-llvm50-handle-new-file_magic-s-location.patch
-> 0022-llvm50-handle-new-file_magic-s-location.patch
* 0015-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
-> 0023-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
* 0016-llvm50-AllocaInst-takes-address-space.patch
-> 0024-llvm50-AllocaInst-takes-address-space.patch
* 0017-llvm50-Intrinsic-objectsize-has-three-arguments.patch
-> 0025-llvm50-Intrinsic-objectsize-has-three-arguments.patch
* 0018-llvm50-test-change-objectsize.patch
-> 0026-llvm50-test-change-objectsize.patch
* 0019-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
-> 0028-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
* 0020-llvm60-handle-headers-renaming.patch
-> 0029-llvm60-handle-headers-renaming.patch
- Update to version 1.4.0+20180524:
* isLSB should be a boolean, as it is only used in truth contexts
* remove switch fallthrough in floating point comparision
* llvm37: enable travis testing
* llvm37: handle getRegisteredOptions
* test: add versions of some tests for LLVM 3.7
* llvm: make KLEE compile against LLVM 3.7
* llvm37: handle GetElementPtrInst::Create's new parameter
* test: add parenthesis around & operands
- removed patches that are in upstream now:
* 0001-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
* 0002-llvm-make-KLEE-compile-against-LLVM-3.7.patch
* 0003-test-add-versions-of-some-tests-for-LLVM-3.7.patch
* 0004-llvm37-handle-getRegisteredOptions.patch
- renamed patches:
* 0005-llvm-make-KLEE-compile-against-LLVM-3.8.patch
-> 0001-llvm-make-KLEE-compile-against-LLVM-3.8.patch
* 0007-llvm38-test-change-some-tests.patch
-> 0002-llvm38-test-change-some-tests.patch
* 0006-llvm-make-KLEE-compile-against-LLVM-3.9.patch
-> 0003-llvm-make-KLEE-compile-against-LLVM-3.9.patch
* 0008-llvm40-handle-different-header-names.patch
-> 0004-llvm40-handle-different-header-names.patch
* 0009-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
-> 0005-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
* 0010-llvm40-errorOr-and-similar.patch
-> 0006-llvm40-errorOr-and-similar.patch
* 0011-llvm-use-chrono-helpers-from-LLVM-4.0.patch
-> 0007-llvm-use-chrono-helpers-from-LLVM-4.0.patch
* 0012-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
-> 0008-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
* 0013-llvm40-gep_type_iterator-has-no-operator.patch
-> 0009-llvm40-gep_type_iterator-has-no-operator.patch
* 0014-llvm50-avoid-on-function-arg_begin.patch
-> 0010-llvm50-avoid-on-function-arg_begin.patch
* 0015-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
-> 0011-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
* 0016-llvm50-handle-getOrInsertFunction-terminator.patch
-> 0012-llvm50-handle-getOrInsertFunction-terminator.patch
* 0017-llvm50-SwitchInst-case-functions-now-return-pointers.patch
-> 0013-llvm50-SwitchInst-case-functions-now-return-pointers.patch
* 0018-llvm50-handle-new-file_magic-s-location.patch
-> 0014-llvm50-handle-new-file_magic-s-location.patch
* 0019-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
-> 0015-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
* 0020-llvm50-AllocaInst-takes-address-space.patch
-> 0016-llvm50-AllocaInst-takes-address-space.patch
- added patches
* 0017-llvm50-Intrinsic-objectsize-has-three-arguments.patch
* 0018-llvm50-test-change-objectsize.patch
* 0019-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
* 0020-llvm60-handle-headers-renaming.patch
- 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
- Update to version 1.4.0+20180518:
* tests: use names in klee_make_symbolic
* Delete coverageServer.py
* Abort execution if --only-output-states-covering-new is enabled but its dependency --output-istats is not
* Add support for concretizing symbolic objects passed to external functions
* Improve error messages for ReadStringAtAddress
* Improved code quality
* Implemented incomplete merging
* remove QueryLog.h
* Update clang-format standard for KLEE codebase to C++11
* Fix test case to check for correct call string
* Improve handling of constant array in Z3
* Remove the option for truncating lines in assembly.ll
* Remove workaround for bug in older LLVM version (< 3)
* Fix include files
* remove unused file: tools/klee/Debug.cpp
* Fixed test case to exercise modification to utimes()
* Fixed utimes() behavior for symbolic files when the second argument is NULL
* Moved regression test to proper location. Fixes #705
* Fix handling of errno if external functions are invoked
* Factor out method to update state memory with process state
* Ensured program reliably has 3 paths to be explored, and removed unnecessary options. Make klee_abort() call abort() in replay, and removed trivial test which cannot be easily integrated into the test suite.
* Implement klee_prefer_cex() and klee_abort() in Runtest and added corresponding tests
* add blockaddress and indirectbr instructions
* fix compilation warning
* exitOnError no output buf fix
* Change llvm apt repository to enable llvm 3.7+
* Fix python2 linking
* doDumpStates: incorrectly increments stats
* [CMake] Add option to set GTest include dir
* fix test/Feature/BFSSearcherAndDFSSearcherInterleaved.c to use explicit enumeration of possible strings instead of CHECK-SAME (does not work as intended with LLVM >= 3.7)
* Store CexCache stats and then update klee-stats to use them
* Add missing endian information to avoid selecction of big endian systems
* Fail for aggegrations with big endian ordering
* Fixed handling of constant vectors with complex data
* Test complex constant data vectors as well
* Make print function of ObjectState public and const
* Add testcase for constant array handling
* Add test case for constant vector init
* Fix correct element order of InsertElement/ExtractElement
* Fix getelementptr for array or vector indices
* Fix generation of expressions from constant sequential data
* Added comment for getPointerWidth
* llvm50: use auto variable instead of SwitchInst::CaseIt
* Enable caching for travis-ci
* Fix coverage generation
* MergeHandler: remove unused closedStateCount
* add wllvm to the python packages to be installed
* [Travis-CI] Added codecov.io support
- Dropped patches (they are in upstream already):
* 0001-MergeHandler-remove-unused-closedStateCount.patch
* 0002-llvm50-use-auto-variable-instead-of-SwitchInst-CaseI.patch
* 0001-Fix-generation-of-expressions-from-constant-sequenti.patch
* 0002-Fix-getelementptr-for-array-or-vector-indices.patch
* 0003-Fix-correct-element-order-of-InsertElement-ExtractEl.patch
* 0004-Provide-errno-independent-of-CTYPE_EXTERNALS-being-d.patch
* 0005-Track-errno-correctly.patch
* 0006-Declare-klee_get_errno-and-remove-local-declarations.patch
* 0007-Add-support-for-modelling-errno_location.patch
* 0008-Cleanup-test-cases.patch
* 0009-test-fix-Feature-BFSSearcherAndDFSSearcherInterleave.patch
- Add klee-skip-some-tests.patch
- Update to version 1.4.0+20180108:
* [NFC] Remove unused config header template that was only used by the old build system (now removed).
* fix regression test: use `%klee` instead of `klee`
* fix merging tests: use `%klee` instead of `klee`
* Move Homebrew tap from personal repository to the KLEE organization
* Updated TravisCI to use pip2 instead of pip
* Bumped xcode version for TravisCI
* Implemented bounded merging functionality
* Added pause and continue functionality for states in Executor
* Replace confusing message in lit.site.cfg.in about the file being autogenerated
* klee_make_symbolic: add test cases for API
* klee_make_symbolic: warn on deprecated usage
- added patches:
* 0001-MergeHandler-remove-unused-closedStateCount.patch
* 0002-llvm50-use-auto-variable-instead-of-SwitchInst-CaseI.patch
* 0013-llvm40-gep_type_iterator-has-no-operator.patch
* 0014-llvm50-avoid-on-function-arg_begin.patch
* 0015-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
* 0016-llvm50-handle-getOrInsertFunction-terminator.patch
* 0017-llvm50-SwitchInst-case-functions-now-return-pointers.patch
* 0018-llvm50-handle-new-file_magic-s-location.patch
* 0019-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
* 0020-llvm50-AllocaInst-takes-address-space.patch
- renamed patches:
* 0013-llvm38-test-change-some-tests.patch ->
0007-llvm38-test-change-some-tests.patch
* 0007-llvm40-handle-different-header-names.patch ->
0008-llvm40-handle-different-header-names.patch
* 0008-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch ->
0009-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
* 0009-llvm40-errorOr-and-similar.patch ->
0010-llvm40-errorOr-and-similar.patch
* 0010-llvm-use-chrono-helpers-from-LLVM-4.0.patch ->
0011-llvm-use-chrono-helpers-from-LLVM-4.0.patch
* 0011-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch ->
0012-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
* 0012-llvm40-gep_type_iterator-has-no-operator.patch ->
0013-llvm40-gep_type_iterator-has-no-operator.patch
- change "env python" to "python3" in tests, so that we can build and
depend on py3 only
- add python3-setuptools BuildRequires, so that we have pkg_resources
for tests
- Update to version 1.4.0+20171026:
* [cmake]Fix detection of non-standard path for tcmalloc
* fixing huge allocation size constant to be unsigned
* [travis] build metaSMT with C++11
* [travis] add a workaround to keep Travis alive when running tests for metaSMT-CVC4 (which needs around 10m for one specific test case)
* [travis] update scripts to additionally test CVC4 and Yices2
* [cmake] detect available metaSMT backends using a pre-defined flag and raise compile flags accordingly
* add support for CVC4 and Yices2 via metaSMT
* Fixed assert in BFSSearcher that does not hold as part of interleaved searcher
* Removed unnecessary and redundant variable
- removed
* 0001-errno-define-__errno_location.patch
* 0001-test-DirSeek-make-it-XFAIL-temporarily.patch
- added
* 0001-Fix-generation-of-expressions-from-constant-sequenti.patch
* 0002-Fix-getelementptr-for-array-or-vector-indices.patch
* 0003-Fix-correct-element-order-of-InsertElement-ExtractEl.patch
* 0004-Provide-errno-independent-of-CTYPE_EXTERNALS-being-d.patch
* 0005-Track-errno-correctly.patch
* 0006-Declare-klee_get_errno-and-remove-local-declarations.patch
* 0007-Add-support-for-modelling-errno_location.patch
* 0008-Cleanup-test-cases.patch
* 0009-test-fix-Feature-BFSSearcherAndDFSSearcherInterleave.patch
* 0012-llvm40-gep_type_iterator-has-no-operator.patch
* 0013-llvm38-test-change-some-tests.patch
- 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
- Update to version 1.4.0+20170811:
* Removing flaky test Vararg.c from Darwin build until we find a proper fix
* Fixed typos in comments related to vararg support.
* llvm: don't use clEnumValEnd for LLVM 4.0
* llvm: get rid of static_casts from iterators
* llvm37: do not copy DILocation to getDSPIPath
* Added location info for external calls and improved a message.
* llvm37: introduce type for PassManager
* move module loading into external function
* Corrected comment of Z3Solver class
* Added caching of Homebrew downloads
* Use assembly line for printing debug information
* Fixes bug in TreeStreamWriter::write reported by @gladtbx in #562. Also removes commented out code from that function.
* Implement basic support for vectorized instructions.
* Added some unit tests for TreeStream: one testing some basic behaviour, the other a regression test for #562
* Core: TimingSolver, use TimerStatIncrementer
* Replace assertions of types on LLVM instructions in the Executor with a pass that checks these assertions. This improves several things.
* Switching version to 1.4.0
* Release notes for 1.4.0
* Remove support for LLVM < 3.4
* Updated test cases to reflect removal of LLVM 2.9
* Cleanup Travis builder
* Remove klee-gcc
* Remove LLVM 2.9 from Makefiles
* [CMake] Fix bug where the runtime build system would not rebuild bitcode archive/modules when the list of source files that constitute it changes.
* [CMake] Add a sanity check to the runtime build system so that we provide a better error message (and stop earlier) when no C source files are found.
* llvm: get rid of static_casts from iterators (take 2)
* more portable shebangs
* Moved klee_choose from klee-libc to KLEE intrinsics.
* Re-enable parts of `FloatingPointOps.ll`. The message about failures doesn't seem relevant anymore given that LLVM 3.4 is the minimum version KLEE supports. Also do minor clean up. This was spotted by @andreamattavelli.
* Added the const qualifier to the keys in the constantMap
* This commit simply moves evalConstant to ExecutorUtil (where evalConstantExpr also resides), as suggested by an old comment.
* [CMake] Fix bug where we would inherit LLVM's `-DNDEBUG` define when LLVM was built without assertions. This prevented `ENABLE_KLEE_ASSERTS` from working correctly.
* [CMake] Emit warning when mixing assert and non assert builds.
* Cleanup tests for last LLVM 2.9 references
* Added regression test for bug reported by @kren1 in #262
* This reverts incorrect patch db29a0bba7
__fprintf_chk has a different prototype than fprintf
* Now that LLVM 2.9 is gone, we can use cl::bits instead of cl::list
* [CMake] Refactor STP detection and change the default value of `ENABLE_SOLVER_STP` to be set dynamically based on whether STP is available. Previously the default was always off.
* [CMake] Refactor Z3 detection and change the default value of `ENABLE_SOLVER_Z3` to be set dynamically based on whether Z3 is available. Previously the default was always off.
* [CMake] Add `ENABLE_ZLIB` option to control whether KLEE uses zlib. The default is `ON` if zlib is found on first configure and `OFF` if zlib is not found on first configure.
* [CMake] Change the default value of `ENABLE_SOLVER_METASMT` to be set dynamically based on whether MetaSMT is available. Previously the default was always off.
* [TravisCI] Make sure when building with CMake that only the solvers requested get used.
* Modified Travis-CI script to compile STP with BOOST support
* Fixed script for STP in Travis-CI: Build now exits on errors
* Added another variant of printFileLine in KInstruction that returns the location as a string. Also added const qualifier to the printFileLine functions
* Added an optional KInstruction* argument to evalConstant and evalConstantExpr which allows us to print the location associated with the constant in any error messages. Added a test case for the unsupported features for taking the address of a label, which exercises the patch.
* Fix build for FreeBSD.
* Fixed test case counter: Previously the number of test cases generated by KLEE was always incremented, even if a symbolic solution was not found.
* Removed merging searchers
* Added checks for div/mod by zero and overshifts in constant expressions. Such div/mod by zero expressions would previously crash KLEE. Added two test cases, one for div/mod by zero, the other for overshift. This fixes the bug reported in #268.
* Untabify this file, which was using a mix of spaces and tabs for alignment.
* Fixed a compiler warning (unused variable)
* Fixed a bug causing KLEE to generate files with no permissions bits set. This was introduced when we added the --readable-posix-inputs option.
* Added a basic test for klee-replay
- reshuffle with patches
* A 0001-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
* A 0002-llvm-make-KLEE-compile-against-LLVM-3.7.patch
* A 0003-test-add-versions-of-some-tests-for-LLVM-3.7.patch
* A 0004-cmake-expand-library-dependencies-with-USE_CMAKE_FIN.patch
* A 0005-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
* A 0006-llvm-make-KLEE-compile-against-LLVM-3.8.patch
* A 0007-llvm-make-KLEE-compile-against-LLVM-3.9.patch
* A 0008-llvm37-handle-GetElementPtrInst-Create-s-new-paramet.patch
* D 0001-llvm-don-t-use-clEnumValEnd-for-LLVM-4.0.patch
* D 0002-llvm-get-rid-of-static_casts-from-iterators.patch
* D 0003-Core-TimingSolver-use-WallTimer.patch
* D 0004-llvm-make-KLEE-compile-against-LLVM-3.7.patch
* D 0005-llvm-make-KLEE-compile-against-LLVM-3.8.patch
* D 0006-llvm-make-KLEE-compile-against-LLVM-3.9.patch
* D 0007-test-add-versions-of-some-tests-for-LLVM-3.8.patch
* D 0008-travis-CI-add-LLVM-3.8-build-tests.patch
- switch to python 3
- Build against LLVM 4
- Update to version 1.3.0+20170607:
* Fix test failure on systems with libstdc++ corresponding to gcc7.
* llvm: rename ExitOnError to OptExitOnError
* Prevent test failure when realloc fails in test/Feature/Realloc.c
- added patches:
0001-llvm-don-t-use-clEnumValEnd-for-LLVM-4.0.patch
0002-llvm-get-rid-of-static_casts-from-iterators.patch
0003-Core-TimingSolver-use-WallTimer.patch
0004-llvm-make-KLEE-compile-against-LLVM-3.7.patch
0005-llvm-make-KLEE-compile-against-LLVM-3.8.patch
0006-llvm-make-KLEE-compile-against-LLVM-3.9.patch
0007-test-add-versions-of-some-tests-for-LLVM-3.8.patch
0008-travis-CI-add-LLVM-3.8-build-tests.patch
0009-llvm40-handle-different-header-names.patch
0010-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
0011-llvm40-errorOr-and-similar.patch
0012-llvm-use-chrono-helpers-from-LLVM-4.0.patch
0013-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
- removed patches (renamed to the above):
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
- Update to version 1.3.0+20170602:
* use METASMT_REQUIRE_RTTI flag to decide whether we need RTTI
* [travis] add environment variable METASMT_BOOST_VERSION to control the boost version used by metaSMT and test it with the combination LLVM-2.9 + metaSMT
* [CMake] change WARNING to FATAL_ERROR when building with a non-RTTI LLVM version and a metaSMT version that requires RTTI
* [TravisCI] Try to unbreak the build against upstream STP.
* Remove redundant KLEE prefix while logging
* llvm: make KLEE compile against LLVM 3.5 and 3.6
* travis CI: add LLVM 3.5 and 3.6 tests
* Rearchitect ExternalDispatcher
* gitignore build
* [Z3] Support another solver failure reason that Z3 might give. I'm going to guess it means timeout but I'm not 100% sure about this.
* [Z3] Add assertions in Z3 builder to catch underflow with bad widths.
* [Z3] Move the `dump()` methods of the Z3NodeHandle<> specializations into `Z3Builder.cpp` so they can be called from in gdb.
* Refactor file opening code out of `main.cpp` and into `klee_open_output_file()` function so that it can be used by the Z3Solver.
* [Z3] Add the `-debug-z3-dump-queries=<path>` command line option. This is useful for getting access to the constraints being stored in the Z3 solver in the SMT-LIBv2.5 format.
* [Z3] Add option to manually validate Z3 models.
* [Z3] Implement API logging.
* [Z3] In `getConstraintLog()` use a separate builder from that of the solver. This is to avoid tampering with the cache of the builder the solver is using.
* [Z3] Switch from `Z3_mk_simple_solver()` to `Z3_mk_solver()`.
* [Z3] Add `-debug-z3-verbosity=<N>` option which behaves like Z3's `-v:<N>` option. This lets us see what Z3 is doing execution (e.g. which tactic is being applied) which is very useful for debugging.
* [Z3] Remove unused include.
* replace handleMetaSMT() with klee::createMetaSMTSolver() and move it into MetaSMTSolver.cpp so that the backend headers only need to be included once there
* hide backend solver declarations from public include
- remove 0001-Make-KLEE-compile-against-LLVM-3.5-and-3.6.patch
It is upstream already.
- 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
- 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
- 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
- enable uclibc & POSIX runtime
- add some %doc files
- 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
- Update to version 1.3.0+20170211:
* [cmake] add PATH_SUFFIXES needed to find z3 on Fedora
* test: fix broken Vararg test
* [CMake] More widely available rebuilding for runtimes
- switch to llvm 3.8
- Update to version 1.3.0+20170118:
* Typo fix when compiling with LLVM 3.5 and above
* [TravisCI] Fix bug where TravisCI build scripts would carry on executing even though configure/build failed. This due to using the `&&` operator which means failure of commands to execute in this compound statement will not trigger the script to exit as requested by `set -e`.
* [TravisCI] Remove `set +e` commands so that when running tests we fail fast rather than continuing to run the tests (due to `set -e` at the beginning of the script).
* [TravisCI] When building with the old build system move back to the root of the build tree after doing the hack the generate the lit configuration files.
* CMake: Fixed the LLVM version regex
* [CMake] Fix linker warning about mixed linking modes when LLVM was built with `-fvisibility-inlines-hidden`.
* Fix -Wformat warnings emitted by Apple Clang (800.0.42.1).
* rerun lit tests for non-default metaSMT backends
* Changed preferred permissions from 0622 to the more standard 0644.
* Fix two issues with AC_LINK_IFELSE for metaSMT:
* tests: Added substitution for llvm-ar
* Write tests to test `libkleeRuntest`. The `replay_posix_runtime.c` test is marked XFAIL because there is a bug in the implementation of `libkleeRuntest`.
* Fix bug reported privately by @danielschemmel .
* Change how error handling is done in libkleeRuntest.
* [CMake] Rename "integrationtests" to "systemtests".
* Rename old build system targets so that
* Remove undocumented and unused `check-local`, `check-dg` and `check-lit` targets from Autoconf/Makefile build system. Having these around just confuses things.
* [CMake] Only add dependencies to `check` if the target is enabled.
* [CMake] If CMP0037 policy is available set it to NEW so that we disallow using reserved target names.
* [CMake] Remove `ENABLE_TESTS` CMake cache option.
- Update to version 1.3.0+20161210:
* Fixing current version of STP in Dockerfile (see #505) to 2.1.2
* Switched to STP 2.1.2 on Travis CI builds
* Increasing version to 1.3.0
* Release notes for 1.3.0
* Remove support for reporting the approximate git tag.
* Added among the external calls that we model
* CMake: support LLVMCC.ExtraFlags
* Fixed the issue of klee-stats not being copied to bin/
* [TravisCI] Fix the list of available configuration environment variables.
* [TravisCI] Clean up the configuration matrix.
* [CMake] Fix bug in the Makefile bitcode build system where the runtime would not recompile if the LLVM C compiler flags changed. This could happen if the user did something like
* [CMake] Fix bug in the Makefile bitcode build system where the runtime would not recompile if the `Makefile.cmake.bitcode.rules` file changed.
* [CMake] Fix bug where if KLEE was built with `ENABLE_TCMALLOC` and then re-configured with `ENABLE_TCMALLOC` set to OFF then `klee/Config/config.h` was not correctly re-generated.
- Update to version 1.0.0+20161129:
* [CMake] Add missing dependencies reported in #507.
* [CMake] Fix link order of LLVM libraries and required system libraries.
* [CMake] Add another missing LLVM component dependency for `kleeModule`.
* [CMake] Fix determining the system libraries needed by LLVM from `llvm-config` when using LLVM 3.5 and newer.
* [CMake] Fix bug where the wrong path is checked for when checking to see if we can find klee-uclibc's C library.
* [CMake] Fix some indentation issues.
* Renamed .pc to .kquery (kleaver query)
* Fix bug in implementation of `NotExpr`. It should not implement `compareContents()`.
* Remove default implementation of `Expr::compareContents(const Expr&)` and make it a pure virtual method. Also make it protected rather than public because it is an implementation detail of `Expr::compare()`.
* Clean up `Expr::compare()` interface by
- remove 0001-lib-Module-needs-codegen.patch
- Update to version 20161121:
* [CMake] Implement install of the kleeRuntest target.
* [CMake] Fix the build when `-DBUILD_SHARED_LIBS=ON` is passed. This fixes issue #507.
- remove proper-shared-libs.patch
- add 0001-lib-Module-needs-codegen.patch
- Update to version 20161119:
* add nicer error messages for --use-merge and add explanation why it currently cannot be used with random-path
* Fix BFS searcher
* [CMake] Re-express LLVM and KLEE library dependencies as transitive dependencies on KLEE's libraries rather than on the final binaries. This is better because it means we can build other tools that use KLEE's libraries and not need to express the needed LLVM dependencies.
* [CMake] Remove use of tabs in `CMakeLists.txt` files.
* [CMake] Document implicit `STP_DIR` and `metaSMT_DIR` options.
* Documented the level at which BFS operates in KLEE, as part of --help
* Remove option --randomize-fork. If someone needs this, the right way is to implement it in the solver.
* [CMake] Remove unneeded dependency declarations for the unit tests. These were changes that I forgot to make in dda296e09ee53ed85ccf1c3f08e7e809adce612e .
* [CMake] Fix the old Autoconf/Makefile build system files in source tree interfering with CMake build.
- switch to cmake
- Update to version 20161117:
* remove mimic_stp option and the associated ITE chain construction for shift operators
* When building KLEE with the sanitizers make sure the runtime is not built with them because KLEE can't handle this.
* Use newer trusty-based Travis CI (#452)
* Fix `-Wmisleading-indentation` warning and also correctly set the `dirty` flag if we remove `llvm.trap` from the module.
* remove outdated FIXME (metaSMT-Z3 implements assumption via push/pop)
* change signature of runAndGetCex() to match runAndGetCexForked()
* move the query creation part into runAndGetCex() (to be consistent with runAndGetCexForked())
* upgrade to boolector-2.2.0 & remove the no longer needed aux array vector
* update comments
* apply clang-format
* Adds support for Darwin platform in RaiseAsm pass
* Implement a CMake based build system for KLEE.
* Add the Dockerfile to `.dockerignore` so that changes the Dockerfile don't trigger unnecessary rebuilds. Also make the Dockerfile ignore Vim source files anywhere in the tree.
* [CMake] Report git revision information if available.
* [cmake] Build with newer JIT (for LLVM >= 3.6)
- Update to version 20160929:
* Fixed the description of -posix-runtime option
* configure: add option to enable timestamping
* configure: run AutoRegen.sh
* Fix bug in `AssignmentEvaluator` where NotOptimizedExpr would not (#466)
- remove 0001-configure-add-option-to-enable-timestamping.patch: upstream
- remove 0002-configure-run-AutoRegen.sh.patch: upstream
- add 0001-configure-add-option-to-enable-timestamping.patch
- add 0002-configure-run-AutoRegen.sh.patch
- remove no_date_time.patch
- Update to version 20160926:
* Extended support for assembler raising
* Check the existence of the entry point during the initialization of the POSIX runtime. If the check fails, exit with an error. (#457)
* Clang-format ``ConstructSolverChain.cpp``
* Add ``-debug-cross-check-core-solver`` option to allow cross-checking with another solver. For example the core solver can be STP and the cross checking solver can be Z3.
* Correct out of date comments for some of the klee error handling functions.
* Rename `-debug-cross-check-core-solver` option to `-debug-crosscheck-core-solver` as requested by Cristian
* Avoid internalization of non-standard entry point (i.e. not the main function) (#455)
* Modified logging information to steer the usage of klee_message, klee_warning, and klee_error
- remove Executor-skip-empty-asm-instead-of-abort.patch: upstream
- remove Executor-do-not-crash-on-non-sized-globals.patch: upstream
- Add gperftools-devel, libacl-devel, libcap-devel, libselinux-devel
to BuildRequires. It allows for more features.
- update to 20160528
* Fixed an incorrect read() invocation and missing includes for FD_Fail2.c
* Improved help message for POSIX environment options.
* add entry for llvm-2.9 and z3
* add include in Z3Solver.cpp (did not compile with llvm-2.9)
* Split creation of symbolic files and stdin in two distinct options
* Fixed bug #375 in Kleaver's parser
* Allow relocation of installed klee tree
* Modified -debug-print-instructions to allow to write directly on log file.
* Add cmake 2.8.11 as additional dependency
- Executor-skip-empty-asm-instead-of-abort.patch: add
- Executor-do-not-crash-on-non-sized-globals.patch: add
- update to 20160419
- build against llvm34-klee and do not rebuild llvm
- add proper-shared-libs.patch
- update to 20160306
- update to 20151113
- use date for filename
- add: no_date_time.patch
- update to 1440176974
- use llvm 3.4
- initial commit
OBS-URL: https://build.opensuse.org/request/show/632727
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/klee?expand=0&rev=11
This commit is contained in:
commit
76df04b8b0
@ -1,270 +0,0 @@
|
||||
From: =?UTF-8?q?Richard=20Trembeck=C3=BD?= <richardt@centrum.sk>
|
||||
Date: Wed, 4 May 2016 15:21:45 +0200
|
||||
Subject: llvm: make KLEE compile against LLVM 3.8
|
||||
Patch-mainline: no
|
||||
|
||||
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 +++++-
|
||||
7 files changed, 77 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||
index f0781e5b882a..2c7e8d4d52a6 100644
|
||||
--- a/lib/Core/Executor.cpp
|
||||
+++ b/lib/Core/Executor.cpp
|
||||
@@ -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());
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ Res.mod(
|
||||
+ APFloat(*fpWidthToSemantics(right->getWidth()), right->getAPValue()));
|
||||
+#else
|
||||
Res.mod(APFloat(*fpWidthToSemantics(right->getWidth()),right->getAPValue()),
|
||||
APFloat::rmNearestTiesToEven);
|
||||
+#endif
|
||||
bindLocal(ki, state, ConstantExpr::alloc(Res.bitcastToAPInt()));
|
||||
break;
|
||||
}
|
||||
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
|
||||
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) {
|
||||
for (succ_iterator it = succ_begin(bb), ie = succ_end(bb); it != ie; ++it)
|
||||
res.push_back(&*(it->begin()));
|
||||
} else {
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ res.push_back(&*(++(i->getIterator())));
|
||||
+#else
|
||||
res.push_back(&*(++BasicBlock::iterator(i)));
|
||||
+#endif
|
||||
}
|
||||
|
||||
return res;
|
||||
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
|
||||
index 3729ff82cd9d..e10e886e8915 100644
|
||||
--- a/lib/Module/IntrinsicCleaner.cpp
|
||||
+++ b/lib/Module/IntrinsicCleaner.cpp
|
||||
@@ -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 deletion of instructions makes iterator invalid.
|
||||
++i;
|
||||
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 ours
|
||||
+ IRBuilder<> builder(ii->getParent(), i_);
|
||||
+#else
|
||||
IRBuilder<> builder(ii->getParent(), ii);
|
||||
-
|
||||
+#endif
|
||||
Value *op1 = ii->getArgOperand(0);
|
||||
Value *op2 = ii->getArgOperand(1);
|
||||
|
||||
diff --git a/lib/Module/LowerSwitch.cpp b/lib/Module/LowerSwitch.cpp
|
||||
index 0f4e8b1eb72b..056885219e85 100644
|
||||
--- a/lib/Module/LowerSwitch.cpp
|
||||
+++ b/lib/Module/LowerSwitch.cpp
|
||||
@@ -64,7 +64,11 @@ void LowerSwitchPass::switchConvert(CaseItr begin, CaseItr end,
|
||||
// iterate through all the cases, creating a new BasicBlock for each
|
||||
for (CaseItr it = begin; it < end; ++it) {
|
||||
BasicBlock *newBlock = BasicBlock::Create(F->getContext(), "NodeBlock");
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ Function::iterator FI = origBlock->getIterator();
|
||||
+#else
|
||||
Function::iterator FI = origBlock;
|
||||
+#endif
|
||||
F->getBasicBlockList().insert(++FI, newBlock);
|
||||
|
||||
ICmpInst *cmpInst =
|
||||
@@ -101,7 +105,11 @@ void LowerSwitchPass::processSwitchInst(SwitchInst *SI) {
|
||||
// if-then statements go to this and the PHI nodes are happy.
|
||||
BasicBlock* newDefault = BasicBlock::Create(F->getContext(), "newDefault");
|
||||
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ F->getBasicBlockList().insert(defaultBlock->getIterator(), newDefault);
|
||||
+#else
|
||||
F->getBasicBlockList().insert(defaultBlock, newDefault);
|
||||
+#endif
|
||||
BranchInst::Create(defaultBlock, newDefault);
|
||||
|
||||
// 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
|
||||
index b07d3d2fe348..e6d592b135b6 100644
|
||||
--- a/lib/Module/ModuleUtil.cpp
|
||||
+++ b/lib/Module/ModuleUtil.cpp
|
||||
@@ -207,8 +207,19 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
|
||||
StringRef memberName;
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
- ErrorOr<StringRef> memberNameErr = AI->getName();
|
||||
- std::error_code ec = memberNameErr.getError();
|
||||
+ std::error_code ec;
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ ErrorOr<object::Archive::Child> childErr = *AI;
|
||||
+ ec = childErr.getError();
|
||||
+ if (ec) {
|
||||
+ errorMessage = ec.message();
|
||||
+ return false;
|
||||
+ }
|
||||
+#else
|
||||
+ object::Archive::child_iterator childErr = AI;
|
||||
+#endif
|
||||
+ ErrorOr<StringRef> memberNameErr = childErr->getName();
|
||||
+ ec = memberNameErr.getError();
|
||||
if (!ec) {
|
||||
memberName = memberNameErr.get();
|
||||
#else
|
||||
@@ -226,7 +237,8 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
}
|
||||
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
- ErrorOr<std::unique_ptr<llvm::object::Binary> > child = AI->getAsBinary();
|
||||
+ ErrorOr<std::unique_ptr<llvm::object::Binary> > child =
|
||||
+ childErr->getAsBinary();
|
||||
ec = child.getError();
|
||||
#else
|
||||
OwningPtr<object::Binary> child;
|
||||
@@ -235,7 +247,7 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
if (ec) {
|
||||
// If we can't open as a binary object file its hopefully a bitcode file
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
- ErrorOr<MemoryBufferRef> buff = AI->getMemoryBufferRef();
|
||||
+ ErrorOr<MemoryBufferRef> buff = childErr->getMemoryBufferRef();
|
||||
ec = buff.getError();
|
||||
#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer> > buffErr = AI->getMemoryBuffer();
|
||||
@@ -343,7 +355,9 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
KLEE_DEBUG_WITH_TYPE("klee_linker", dbgs() << "Found " << GV->getName() <<
|
||||
" in " << M->getModuleIdentifier() << "\n");
|
||||
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ if (Linker::linkModules(*composite, std::unique_ptr<Module>(M)))
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
if (Linker::LinkModules(composite, M))
|
||||
#else
|
||||
if (Linker::LinkModules(composite, M, Linker::DestroySource, &errorMessage))
|
||||
@@ -360,8 +374,10 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
// Link succeed, now clean up
|
||||
modulesLoadedOnPass++;
|
||||
KLEE_DEBUG_WITH_TYPE("klee_linker", dbgs() << "Linking succeeded.\n");
|
||||
-
|
||||
+// M was owned by linkModules function
|
||||
+#if LLVM_VERSION_CODE < LLVM_VERSION(3, 8)
|
||||
delete M;
|
||||
+#endif
|
||||
archiveModules[i] = 0;
|
||||
|
||||
// We need to recompute the undefined symbols in the composite module
|
||||
@@ -427,7 +443,9 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
std::string ErrorMessage;
|
||||
|
||||
if (magic == sys::fs::file_magic::bitcode) {
|
||||
+#if LLVM_VERSION_CODE < LLVM_VERSION(3, 8)
|
||||
Module *Result = 0;
|
||||
+#endif
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||
ErrorOr<std::unique_ptr<Module> > ResultErr =
|
||||
@@ -445,6 +463,10 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
ErrorMessage.c_str());
|
||||
}
|
||||
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ if (Linker::linkModules(*module, std::move(ResultErr.get()))) {
|
||||
+ ErrorMessage = "linking error";
|
||||
+#else
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||
Result = ResultErr->release();
|
||||
#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
@@ -456,6 +478,7 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
ErrorMessage = "linking error";
|
||||
#else
|
||||
if (Linker::LinkModules(module, Result, Linker::DestroySource, &ErrorMessage)) {
|
||||
+#endif
|
||||
#endif
|
||||
klee_error("Link with library %s failed: %s", libraryName.c_str(),
|
||||
ErrorMessage.c_str());
|
||||
@@ -639,7 +662,11 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
||||
auto module = *errorOrModule;
|
||||
#endif
|
||||
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ if (auto ec = module->materializeAll()) {
|
||||
+#else
|
||||
if (auto ec = module->materializeAllPermanently()) {
|
||||
+#endif
|
||||
errorMsg = ec.message();
|
||||
return nullptr;
|
||||
}
|
||||
diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp
|
||||
index 64e4863f70b3..944f51ef336d 100644
|
||||
--- a/lib/Module/Optimize.cpp
|
||||
+++ b/lib/Module/Optimize.cpp
|
||||
@@ -102,7 +102,12 @@ static void AddStandardCompilePasses(klee::LegacyLLVMPassManagerTy &PM) {
|
||||
addPass(PM, createCFGSimplificationPass()); // Clean up after IPCP & DAE
|
||||
|
||||
addPass(PM, createPruneEHPass()); // Remove dead EH info
|
||||
- addPass(PM, createFunctionAttrsPass()); // Deduce function attrs
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ addPass(PM, createPostOrderFunctionAttrsPass());
|
||||
+ addPass(PM, createReversePostOrderFunctionAttrsPass());
|
||||
+#else
|
||||
+ addPass(PM, createFunctionAttrsPass()); // Deduce function attrs
|
||||
+#endif
|
||||
|
||||
if (!DisableInline)
|
||||
addPass(PM, createFunctionInliningPass()); // Inline small functions
|
||||
@@ -217,8 +222,14 @@ void Optimize(Module *M, const std::string &EntryPoint) {
|
||||
addPass(Passes, createScalarReplAggregatesPass()); // Break up allocas
|
||||
|
||||
// Run a few AA driven optimizations here and now, to cleanup the code.
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+ addPass(Passes, createPostOrderFunctionAttrsPass());
|
||||
+ addPass(Passes, createReversePostOrderFunctionAttrsPass());
|
||||
+ // addPass(Passes, createGlobalsAAWrapperPass());
|
||||
+#else
|
||||
addPass(Passes, createFunctionAttrsPass()); // Add nocapture
|
||||
addPass(Passes, createGlobalsModRefPass()); // IP alias analysis
|
||||
+#endif
|
||||
|
||||
addPass(Passes, createLICMPass()); // Hoist loop invariants
|
||||
addPass(Passes, createGVNPass()); // Remove redundancies
|
||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||
index ab9dfe286ffb..3d73ae07fcb5 100644
|
||||
--- a/tools/klee/main.cpp
|
||||
+++ b/tools/klee/main.cpp
|
||||
@@ -291,7 +291,12 @@ KleeHandler::KleeHandler(int argc, char **argv)
|
||||
for (; i <= INT_MAX; ++i) {
|
||||
SmallString<128> d(directory);
|
||||
llvm::sys::path::append(d, "klee-out-");
|
||||
- raw_svector_ostream ds(d); ds << i; ds.flush();
|
||||
+ raw_svector_ostream ds(d);
|
||||
+ ds << i;
|
||||
+// SmallString is always up-to-date, no need to flush. See Support/raw_ostream.h
|
||||
+#if LLVM_VERSION_CODE < LLVM_VERSION(3, 8)
|
||||
+ ds.flush();
|
||||
+#endif
|
||||
|
||||
// create directory and try to link klee-last
|
||||
if (mkdir(d.c_str(), 0775) == 0) {
|
||||
--
|
||||
2.17.0
|
||||
|
@ -7,18 +7,18 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
lib/Core/Executor.cpp | 16 ++++++++++++++++
|
||||
lib/Core/MemoryManager.cpp | 5 ++++-
|
||||
lib/Module/ModuleUtil.cpp | 36 +++++++++++++++++++++++++++++++++---
|
||||
lib/Module/Optimize.cpp | 28 ++++++++++++++++++++++++++++
|
||||
lib/Module/ModuleUtil.cpp | 33 ++++++++++++++++++++++++++++++---
|
||||
lib/Module/Optimize.cpp | 34 ++++++++++++++++++++++++++++++++++
|
||||
lib/Module/RaiseAsm.cpp | 10 +++++++++-
|
||||
tools/kleaver/main.cpp | 4 ++++
|
||||
tools/klee/main.cpp | 4 ++++
|
||||
7 files changed, 98 insertions(+), 5 deletions(-)
|
||||
7 files changed, 101 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||
index 2c7e8d4d52a6..b2178cccefd2 100644
|
||||
index b053d4882431..7f69a618b8ec 100644
|
||||
--- a/lib/Core/Executor.cpp
|
||||
+++ b/lib/Core/Executor.cpp
|
||||
@@ -1305,10 +1305,18 @@ void Executor::executeCall(ExecutionState &state,
|
||||
@@ -1338,10 +1338,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 2c7e8d4d52a6..b2178cccefd2 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1341,10 +1349,18 @@ void Executor::executeCall(ExecutionState &state,
|
||||
@@ -1374,10 +1382,18 @@ void Executor::executeCall(ExecutionState &state,
|
||||
|
||||
Expr::Width argWidth = arguments[i]->getWidth();
|
||||
if (argWidth > Expr::Int64) {
|
||||
@ -75,70 +75,10 @@ index 24e2ed97581f..f40e8bc9deb8 100644
|
||||
// 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
|
||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||
index e6d592b135b6..ee4af254dae2 100644
|
||||
index 5ca0a55b12d2..0e87b5a6deca 100644
|
||||
--- a/lib/Module/ModuleUtil.cpp
|
||||
+++ b/lib/Module/ModuleUtil.cpp
|
||||
@@ -196,7 +196,11 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
|
||||
KLEE_DEBUG_WITH_TYPE("klee_linker", dbgs() << "Loading modules\n");
|
||||
// Load all bitcode files in to memory so we can examine their symbols
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ Error Err;
|
||||
+ for (object::Archive::child_iterator AI = archive->child_begin(Err),
|
||||
+ AE = archive->child_end(); AI != AE; ++AI)
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
for (object::Archive::child_iterator AI = archive->child_begin(),
|
||||
AE = archive->child_end(); AI != AE; ++AI)
|
||||
#else
|
||||
@@ -236,7 +240,17 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
return false;
|
||||
}
|
||||
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ Expected<std::unique_ptr<llvm::object::Binary> > child =
|
||||
+ childErr->getAsBinary();
|
||||
+ if (!child) {
|
||||
+ // I don't know why, but
|
||||
+ // ec = errorToErrorCode(child.takeError())
|
||||
+ // does not work here, so:
|
||||
+ consumeError(child.takeError());
|
||||
+ ec = std::make_error_code(std::errc::io_error);
|
||||
+ }
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
ErrorOr<std::unique_ptr<llvm::object::Binary> > child =
|
||||
childErr->getAsBinary();
|
||||
ec = child.getError();
|
||||
@@ -319,6 +333,13 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
}
|
||||
|
||||
}
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ if (Err) {
|
||||
+ SS << "Cannot iterate over archive";
|
||||
+ SS.flush();
|
||||
+ return false;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
KLEE_DEBUG_WITH_TYPE("klee_linker", dbgs() << "Loaded " << archiveModules.size() << " modules\n");
|
||||
|
||||
@@ -490,7 +511,12 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
#endif
|
||||
|
||||
} else if (magic == sys::fs::file_magic::archive) {
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ Expected<std::unique_ptr<object::Binary> > arch =
|
||||
+ object::createBinary(Buffer, &Context);
|
||||
+ if (!arch)
|
||||
+ ec = errorToErrorCode(arch.takeError());
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
ErrorOr<std::unique_ptr<object::Binary> > arch =
|
||||
object::createBinary(Buffer, &Context);
|
||||
ec = arch.getError();
|
||||
@@ -548,7 +574,11 @@ Function *klee::getDirectCallTarget(CallSite cs, bool moduleIsFullyLinked) {
|
||||
@@ -284,7 +284,11 @@ Function *klee::getDirectCallTarget(CallSite cs, bool moduleIsFullyLinked) {
|
||||
if (Function *f = dyn_cast<Function>(v)) {
|
||||
return f;
|
||||
} else if (llvm::GlobalAlias *ga = dyn_cast<GlobalAlias>(v)) {
|
||||
@ -150,12 +90,70 @@ index e6d592b135b6..ee4af254dae2 100644
|
||||
v = ga->getAliasee();
|
||||
} else {
|
||||
v = NULL;
|
||||
@@ -393,7 +397,13 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
}
|
||||
|
||||
if (magic == sys::fs::file_magic::archive) {
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ Expected<std::unique_ptr<object::Binary> > archOwner =
|
||||
+ object::createBinary(Buffer, &context);
|
||||
+ if (!archOwner)
|
||||
+ ec = errorToErrorCode(archOwner.takeError());
|
||||
+ llvm::object::Binary *arch = archOwner.get().get();
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
ErrorOr<std::unique_ptr<object::Binary>> archOwner =
|
||||
object::createBinary(Buffer, &context);
|
||||
ec = archOwner.getError();
|
||||
@@ -414,7 +424,12 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
|
||||
if (auto archive = dyn_cast<object::Archive>(arch)) {
|
||||
// Load all bitcode files into memory
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ Error Err;
|
||||
+ for (object::Archive::child_iterator AI = archive->child_begin(Err),
|
||||
+ AE = archive->child_end();
|
||||
+ AI != AE; ++AI)
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
for (object::Archive::child_iterator AI = archive->child_begin(),
|
||||
AE = archive->child_end();
|
||||
AI != AE; ++AI)
|
||||
@@ -455,7 +470,12 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
return false;
|
||||
}
|
||||
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ Expected<std::unique_ptr<llvm::object::Binary> > child =
|
||||
+ childOrErr->getAsBinary();
|
||||
+ if (!child)
|
||||
+ ec = errorToErrorCode(child.takeError());
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
ErrorOr<std::unique_ptr<llvm::object::Binary>> child =
|
||||
childOrErr->getAsBinary();
|
||||
ec = child.getError();
|
||||
@@ -519,7 +539,14 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ if (Err) {
|
||||
+ errorMsg = "Cannot iterate over archive";
|
||||
+ return false;
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
+
|
||||
return true;
|
||||
}
|
||||
if (magic.is_object()) {
|
||||
diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp
|
||||
index 944f51ef336d..ae1d4839f772 100644
|
||||
index c788ee36cadb..34af46262080 100644
|
||||
--- a/lib/Module/Optimize.cpp
|
||||
+++ b/lib/Module/Optimize.cpp
|
||||
@@ -35,6 +35,11 @@
|
||||
#include "llvm/Analysis/Verifier.h"
|
||||
@@ -39,6 +39,11 @@
|
||||
#include "llvm/Analysis/GlobalsModRef.h"
|
||||
#endif
|
||||
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
@ -166,7 +164,7 @@ index 944f51ef336d..ae1d4839f772 100644
|
||||
using namespace llvm;
|
||||
|
||||
// Don't verify at the end
|
||||
@@ -103,7 +108,11 @@ static void AddStandardCompilePasses(klee::LegacyLLVMPassManagerTy &PM) {
|
||||
@@ -107,7 +112,11 @@ static void AddStandardCompilePasses(klee::LegacyLLVMPassManagerTy &PM) {
|
||||
|
||||
addPass(PM, createPruneEHPass()); // Remove dead EH info
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
@ -175,10 +173,10 @@ index 944f51ef336d..ae1d4839f772 100644
|
||||
+#else
|
||||
addPass(PM, createPostOrderFunctionAttrsPass());
|
||||
+#endif
|
||||
addPass(PM, createReversePostOrderFunctionAttrsPass());
|
||||
addPass(PM, createReversePostOrderFunctionAttrsPass()); // Deduce function attrs
|
||||
#else
|
||||
addPass(PM, createFunctionAttrsPass()); // Deduce function attrs
|
||||
@@ -116,7 +125,11 @@ static void AddStandardCompilePasses(klee::LegacyLLVMPassManagerTy &PM) {
|
||||
addPass(PM, createFunctionAttrsPass()); // Deduce function attrs
|
||||
@@ -120,7 +129,11 @@ static void AddStandardCompilePasses(klee::LegacyLLVMPassManagerTy &PM) {
|
||||
addPass(PM, createInstructionCombiningPass()); // Cleanup for scalarrepl.
|
||||
addPass(PM, createJumpThreadingPass()); // Thread jumps.
|
||||
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
||||
@ -190,23 +188,28 @@ index 944f51ef336d..ae1d4839f772 100644
|
||||
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
|
||||
|
||||
addPass(PM, createTailCallEliminationPass()); // Eliminate tail calls
|
||||
@@ -179,8 +192,15 @@ void Optimize(Module *M, const std::string &EntryPoint) {
|
||||
@@ -183,7 +196,20 @@ void Optimize(Module *M, llvm::ArrayRef<const char *> preservedFunctions) {
|
||||
// for a main function. If main is defined, mark all other functions
|
||||
// internal.
|
||||
if (!DisableInternalize) {
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ auto PreserveEP = [=](const GlobalValue &GV) {
|
||||
+ return GV.getName().equals(EntryPoint);
|
||||
+ auto PreserveFunctions = [=](const GlobalValue &GV) {
|
||||
+ StringRef GVName = GV.getName();
|
||||
+
|
||||
+ for (const char *fun: preservedFunctions)
|
||||
+ if (GVName.equals(fun))
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+ };
|
||||
+ ModulePass *pass = createInternalizePass(PreserveEP);
|
||||
+ ModulePass *pass = createInternalizePass(PreserveFunctions);
|
||||
+#else
|
||||
ModulePass *pass = createInternalizePass(
|
||||
std::vector<const char *>(1, EntryPoint.c_str()));
|
||||
ModulePass *pass = createInternalizePass(preservedFunctions);
|
||||
+#endif
|
||||
addPass(Passes, pass);
|
||||
}
|
||||
|
||||
@@ -219,11 +239,19 @@ void Optimize(Module *M, const std::string &EntryPoint) {
|
||||
@@ -222,11 +248,19 @@ void Optimize(Module *M, llvm::ArrayRef<const char *> preservedFunctions) {
|
||||
// The IPO passes may leave cruft around. Clean up after them.
|
||||
addPass(Passes, createInstructionCombiningPass());
|
||||
addPass(Passes, createJumpThreadingPass()); // Thread jumps.
|
||||
@ -223,11 +226,11 @@ index 944f51ef336d..ae1d4839f772 100644
|
||||
+#else
|
||||
addPass(Passes, createPostOrderFunctionAttrsPass());
|
||||
+#endif
|
||||
addPass(Passes, createReversePostOrderFunctionAttrsPass());
|
||||
// addPass(Passes, createGlobalsAAWrapperPass());
|
||||
addPass(Passes, createReversePostOrderFunctionAttrsPass()); // Add nocapture
|
||||
addPass(Passes, createGlobalsAAWrapperPass()); // IP alias analysis
|
||||
#else
|
||||
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
|
||||
index c597fa2a7b82..d9b3e40154ba 100644
|
||||
index c597fa2a7b82..4967a2fa8578 100644
|
||||
--- a/lib/Module/RaiseAsm.cpp
|
||||
+++ b/lib/Module/RaiseAsm.cpp
|
||||
@@ -60,7 +60,11 @@ bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) {
|
||||
@ -249,7 +252,7 @@ index c597fa2a7b82..d9b3e40154ba 100644
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
+ TM = NativeTarget->createTargetMachine(HostTriple, "", "", TargetOptions(),
|
||||
+ None);
|
||||
+ None);
|
||||
+ TLI = TM->getSubtargetImpl(*(M.begin()))->getTargetLowering();
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||
TM = NativeTarget->createTargetMachine(HostTriple, "", "", TargetOptions());
|
||||
@ -272,10 +275,10 @@ index b8b32e31264a..800cece95e9c 100644
|
||||
llvm::cl::ParseCommandLineOptions(argc, argv);
|
||||
|
||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||
index 3d73ae07fcb5..c0ea4fa54551 100644
|
||||
index c655aa560f62..7be5f07cdc0e 100644
|
||||
--- a/tools/klee/main.cpp
|
||||
+++ b/tools/klee/main.cpp
|
||||
@@ -1132,7 +1132,11 @@ int main(int argc, char **argv, char **envp) {
|
||||
@@ -1092,7 +1092,11 @@ int main(int argc, char **argv, char **envp) {
|
||||
llvm::InitializeNativeTarget();
|
||||
|
||||
parseArguments(argc, argv);
|
||||
@ -288,5 +291,5 @@ index 3d73ae07fcb5..c0ea4fa54551 100644
|
||||
if (Watchdog) {
|
||||
if (MaxTime==0) {
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
@ -0,0 +1,38 @@
|
||||
From: Jiri Slaby <jirislaby@gmail.com>
|
||||
Date: Fri, 25 May 2018 15:17:03 +0200
|
||||
Subject: cmake: find_llvm, fix libraries with llvm-config 3.9
|
||||
Patch-mainline: no
|
||||
|
||||
llvm-config from llvm 3.9 was broken. Fix handling of improperly
|
||||
returned libraries.
|
||||
From:
|
||||
liblibLLVM-3.9.so.so
|
||||
To:
|
||||
libLLVM-3.9.so
|
||||
|
||||
Fixes #895.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
cmake/find_llvm.cmake | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake
|
||||
index adf68c4fc82a..8ceed19f7b9e 100644
|
||||
--- a/cmake/find_llvm.cmake
|
||||
+++ b/cmake/find_llvm.cmake
|
||||
@@ -172,7 +172,11 @@ else()
|
||||
set(targets_to_return "")
|
||||
set(created_targets "")
|
||||
foreach (llvm_lib ${_llvm_libs_list})
|
||||
+ # a bug in llvm-config from LLVM 3.9
|
||||
+ string(REGEX REPLACE "lib(libLLVM[-.a-zA-Z0-9]+\\.so)\\.so$" "\\1" llvm_lib "${llvm_lib}")
|
||||
+
|
||||
get_filename_component(llvm_lib_file_name "${llvm_lib}" NAME)
|
||||
+
|
||||
string(REGEX REPLACE "^(lib)?(LLVM[-.a-zA-Z0-9]+)\\..+$" "\\2" target_name "${llvm_lib_file_name}")
|
||||
list(APPEND targets_to_return "${target_name}")
|
||||
if (NOT TARGET "${target_name}")
|
||||
--
|
||||
2.18.0
|
||||
|
@ -1,155 +0,0 @@
|
||||
From: Jiri Slaby <jirislaby@gmail.com>
|
||||
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 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.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.leq37.ll b/test/Feature/BitcastAlias.leq37.ll
|
||||
new file mode 100644
|
||||
index 000000000000..e860acb24594
|
||||
--- /dev/null
|
||||
+++ b/test/Feature/BitcastAlias.leq37.ll
|
||||
@@ -0,0 +1,38 @@
|
||||
+; 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
|
||||
+; RUN: grep PASS %t2
|
||||
+
|
||||
+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
|
||||
+
|
||||
+define i32 @__foo(i32 %i) nounwind {
|
||||
+entry:
|
||||
+ ret i32 %i
|
||||
+}
|
||||
+
|
||||
+declare i32 @puts(i8*)
|
||||
+
|
||||
+@.passstr = private constant [5 x i8] c"PASS\00", align 1
|
||||
+@.failstr = private constant [5 x i8] c"FAIL\00", align 1
|
||||
+
|
||||
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readnone {
|
||||
+entry:
|
||||
+ %call = call i32 (i64) bitcast (i32 (i32)* @foo to i32 (i64)*)(i64 52)
|
||||
+ %r = icmp eq i32 %call, 52
|
||||
+ br i1 %r, label %bbtrue, label %bbfalse
|
||||
+
|
||||
+bbtrue:
|
||||
+ %0 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.passstr, i64 0, i64 0)) nounwind
|
||||
+ ret i32 0
|
||||
+
|
||||
+bbfalse:
|
||||
+ %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/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: 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 %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..c29ec8a62243
|
||||
--- /dev/null
|
||||
+++ b/test/Feature/BitcastAliasMD2U.leq37.ll
|
||||
@@ -0,0 +1,38 @@
|
||||
+; 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 -search=nurs:md2u %t1.bc > %t2
|
||||
+; RUN: grep PASS %t2
|
||||
+
|
||||
+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
|
||||
+
|
||||
+define i32 @__foo(i32 %i) nounwind {
|
||||
+entry:
|
||||
+ ret i32 %i
|
||||
+}
|
||||
+
|
||||
+declare i32 @puts(i8*)
|
||||
+
|
||||
+@.passstr = private constant [5 x i8] c"PASS\00", align 1
|
||||
+@.failstr = private constant [5 x i8] c"FAIL\00", align 1
|
||||
+
|
||||
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readnone {
|
||||
+entry:
|
||||
+ %call = call i32 (i64) bitcast (i32 (i32)* @foo to i32 (i64)*)(i64 52)
|
||||
+ %r = icmp eq i32 %call, 52
|
||||
+ br i1 %r, label %bbtrue, label %bbfalse
|
||||
+
|
||||
+bbtrue:
|
||||
+ %0 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.passstr, i64 0, i64 0)) nounwind
|
||||
+ ret i32 0
|
||||
+
|
||||
+bbfalse:
|
||||
+ %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.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
|
||||
|
@ -0,0 +1,33 @@
|
||||
From: Jiri Slaby <jirislaby@gmail.com>
|
||||
Date: Fri, 20 Jul 2018 09:34:51 +0200
|
||||
Subject: llvm39: switch KLEE_RUNTIME_BUILD_TYPE to Debug+Asserts
|
||||
Patch-mainline: no
|
||||
|
||||
So that we do not optimize the library during build. It should be
|
||||
optimized only on runtime, depending on the -optimize parameter.
|
||||
|
||||
It could cause various failures like:
|
||||
inlinable function call in a function with debug info must have a !dbg location
|
||||
call void @klee_overshift_check(i64 64, i64 %int_cast_to_i64)
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c34b8786f313..961ab19d75df 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -520,7 +520,7 @@ set(available_klee_runtime_build_types
|
||||
if (NOT KLEE_RUNTIME_BUILD_TYPE)
|
||||
message(STATUS "KLEE_RUNTIME_BUILD_TYPE is not set. Setting default")
|
||||
message(STATUS "The available runtime build types are: ${available_klee_runtime_build_types}")
|
||||
- set(KLEE_RUNTIME_BUILD_TYPE "Release+Debug+Asserts" CACHE String
|
||||
+ set(KLEE_RUNTIME_BUILD_TYPE "Debug+Asserts" CACHE String
|
||||
"Options are ${available_klee_runtime_build_types}"
|
||||
FORCE)
|
||||
endif()
|
||||
--
|
||||
2.18.0
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
3 files changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
|
||||
index 75e71c0a557f..232cd88fd621 100644
|
||||
index 74d91a8f0122..c041be10313c 100644
|
||||
--- a/lib/Module/KModule.cpp
|
||||
+++ b/lib/Module/KModule.cpp
|
||||
@@ -21,7 +21,11 @@
|
||||
@ -26,25 +26,25 @@ index 75e71c0a557f..232cd88fd621 100644
|
||||
+#else
|
||||
#include "llvm/Bitcode/ReaderWriter.h"
|
||||
+#endif
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||
index ee4af254dae2..8aa070743048 100644
|
||||
index 0e87b5a6deca..c2792454d904 100644
|
||||
--- a/lib/Module/ModuleUtil.cpp
|
||||
+++ b/lib/Module/ModuleUtil.cpp
|
||||
@@ -26,7 +26,9 @@
|
||||
@@ -24,7 +24,9 @@
|
||||
#include "llvm/Object/Archive.h"
|
||||
#include "llvm/Object/Error.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/SourceMgr.h"
|
||||
#include "llvm/Object/ObjectFile.h"
|
||||
+#if LLVM_VERSION_CODE < LLVM_VERSION(4, 0)
|
||||
#include "llvm/Support/DataStream.h"
|
||||
+#endif
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/SourceMgr.h"
|
||||
|
||||
#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5)
|
||||
#include "llvm/Linker.h"
|
||||
@@ -36,8 +38,13 @@
|
||||
#include "llvm/IR/AssemblyAnnotationWriter.h"
|
||||
@@ -43,8 +45,13 @@
|
||||
#include "llvm/IR/DiagnosticPrinter.h"
|
||||
#endif
|
||||
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
||||
@ -59,18 +59,18 @@ index ee4af254dae2..8aa070743048 100644
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||
index c0ea4fa54551..154a76feb361 100644
|
||||
index 7be5f07cdc0e..c7dc517a8eee 100644
|
||||
--- a/tools/klee/main.cpp
|
||||
+++ b/tools/klee/main.cpp
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/Support/Errno.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "klee/Interpreter.h"
|
||||
#include "klee/Statistics.h"
|
||||
|
||||
-#include "llvm/Bitcode/ReaderWriter.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
@@ -45,6 +44,12 @@
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InstrTypes.h"
|
||||
@@ -46,6 +45,12 @@
|
||||
#include "llvm/Support/system_error.h"
|
||||
#endif
|
||||
|
||||
@ -84,5 +84,5 @@ index c0ea4fa54551..154a76feb361 100644
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -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 b2178cccefd2..75132e0db71b 100644
|
||||
index 7f69a618b8ec..1a5b7b9df527 100644
|
||||
--- a/lib/Core/Executor.cpp
|
||||
+++ b/lib/Core/Executor.cpp
|
||||
@@ -1448,12 +1448,21 @@ static bool isDebugIntrinsic(const Function *f, KModule *KM) {
|
||||
@@ -1480,12 +1480,21 @@ static bool isDebugIntrinsic(const Function *f, KModule *KM) {
|
||||
|
||||
static inline const llvm::fltSemantics * fpWidthToSemantics(unsigned width) {
|
||||
switch(width) {
|
||||
@ -35,5 +35,5 @@ index b2178cccefd2..75132e0db71b 100644
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -5,124 +5,49 @@ Patch-mainline: no
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
lib/Module/ModuleUtil.cpp | 50 ++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 41 insertions(+), 9 deletions(-)
|
||||
lib/Module/ModuleUtil.cpp | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||
index 8aa070743048..ad847de0b368 100644
|
||||
index c2792454d904..7f4bdb49380a 100644
|
||||
--- a/lib/Module/ModuleUtil.cpp
|
||||
+++ b/lib/Module/ModuleUtil.cpp
|
||||
@@ -204,7 +204,7 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
KLEE_DEBUG_WITH_TYPE("klee_linker", dbgs() << "Loading modules\n");
|
||||
// Load all bitcode files in to memory so we can examine their symbols
|
||||
@@ -432,7 +432,7 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
if (auto archive = dyn_cast<object::Archive>(arch)) {
|
||||
// Load all bitcode files into memory
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
- Error Err;
|
||||
+ Error Err = Error::success();
|
||||
for (object::Archive::child_iterator AI = archive->child_begin(Err),
|
||||
AE = archive->child_end(); AI != AE; ++AI)
|
||||
#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
@@ -229,8 +229,14 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
- Error Err;
|
||||
+ Error Err = Error::success();
|
||||
for (object::Archive::child_iterator AI = archive->child_begin(Err),
|
||||
AE = archive->child_end();
|
||||
AI != AE; ++AI)
|
||||
@@ -460,8 +460,14 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
#else
|
||||
object::Archive::child_iterator childErr = AI;
|
||||
object::Archive::child_iterator childOrErr = AI;
|
||||
#endif
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
||||
+ Expected<StringRef> memberNameErr = childErr->getName();
|
||||
+ ec = memberNameErr ? std::error_code() :
|
||||
+ errorToErrorCode(memberNameErr.takeError());
|
||||
+ Expected<StringRef> memberNameErr = childOrErr->getName();
|
||||
+ ec = memberNameErr ? std::error_code() :
|
||||
+ errorToErrorCode(memberNameErr.takeError());
|
||||
+#else
|
||||
ErrorOr<StringRef> memberNameErr = childErr->getName();
|
||||
ec = memberNameErr.getError();
|
||||
ErrorOr<StringRef> memberNameErr = childOrErr->getName();
|
||||
ec = memberNameErr.getError();
|
||||
+#endif
|
||||
if (!ec) {
|
||||
memberName = memberNameErr.get();
|
||||
if (!ec) {
|
||||
memberName = memberNameErr.get();
|
||||
#else
|
||||
@@ -267,7 +273,10 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
|
||||
@@ -492,7 +498,10 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
#endif
|
||||
if (ec) {
|
||||
// If we can't open as a binary object file its hopefully a bitcode file
|
||||
if (ec) {
|
||||
// If we can't open as a binary object file its hopefully a bitcode file
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
||||
+ Expected<MemoryBufferRef> buff = childErr->getMemoryBufferRef();
|
||||
+ ec = buff ? std::error_code() : errorToErrorCode(buff.takeError());
|
||||
+ Expected<MemoryBufferRef> buff = childOrErr->getMemoryBufferRef();
|
||||
+ ec = buff ? std::error_code() : errorToErrorCode(buff.takeError());
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
ErrorOr<MemoryBufferRef> buff = childErr->getMemoryBufferRef();
|
||||
ec = buff.getError();
|
||||
ErrorOr<MemoryBufferRef> buff = childOrErr->getMemoryBufferRef();
|
||||
ec = buff.getError();
|
||||
#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
@@ -291,13 +300,20 @@ 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)
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
||||
+ Expected<std::unique_ptr<Module> > resultErr =
|
||||
+ parseBitcodeFile(buff.get(), composite->getContext());
|
||||
+ ec = resultErr ? std::error_code() :
|
||||
+ errorToErrorCode(resultErr.takeError());
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||
ErrorOr<std::unique_ptr<Module> > resultErr =
|
||||
+ parseBitcodeFile(buff.get(), composite->getContext());
|
||||
+ ec = resultErr.getError();
|
||||
#else
|
||||
ErrorOr<Module *> resultErr =
|
||||
-#endif
|
||||
parseBitcodeFile(buff.get(), composite->getContext());
|
||||
ec = resultErr.getError();
|
||||
+#endif
|
||||
if (ec)
|
||||
errorMessage = ec.message();
|
||||
else
|
||||
@@ -474,7 +490,12 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
#if LLVM_VERSION_CODE < LLVM_VERSION(3, 8)
|
||||
Module *Result = 0;
|
||||
#endif
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
||||
+ Expected<std::unique_ptr<Module> > ResultErr =
|
||||
+ parseBitcodeFile(Buffer, Context);
|
||||
+ if (!ResultErr) {
|
||||
+ ErrorMessage = errorToErrorCode(ResultErr.takeError()).message();
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
|
||||
ErrorOr<std::unique_ptr<Module> > ResultErr =
|
||||
#else
|
||||
@@ -680,14 +701,22 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
+ std::error_code ec;
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
||||
+ Expected<std::unique_ptr<Module>> errorOrModule =
|
||||
+ getOwningLazyBitcodeModule(std::move(buffer.get()), ctx);
|
||||
+ ec = errorOrModule ? std::error_code() :
|
||||
+ errorToErrorCode(errorOrModule.takeError());
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
auto errorOrModule = getLazyBitcodeModule(std::move(buffer.get()), ctx);
|
||||
+ ec = errorOrModule.getError();
|
||||
#else
|
||||
auto errorOrModule = getLazyBitcodeModule(buffer->get(), ctx);
|
||||
+ ec = errorOrModule.getError();
|
||||
#endif
|
||||
|
||||
- if (!errorOrModule) {
|
||||
- errorMsg = errorOrModule.getError().message().c_str();
|
||||
+ if (ec) {
|
||||
+ errorMsg = ec.message();
|
||||
return nullptr;
|
||||
}
|
||||
// The module has taken ownership of the MemoryBuffer so release it
|
||||
@@ -699,7 +728,10 @@ Module *klee::loadModule(LLVMContext &ctx, const std::string &path, std::string
|
||||
auto module = *errorOrModule;
|
||||
#endif
|
||||
|
||||
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
|
||||
+ if (llvm::Error err = module->materializeAll()) {
|
||||
+ std::error_code ec = errorToErrorCode(std::move(err));
|
||||
+#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
|
||||
if (auto ec = module->materializeAll()) {
|
||||
#else
|
||||
if (auto ec = module->materializeAllPermanently()) {
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -69,10 +69,10 @@ index 220e260c975e..12522c866439 100644
|
||||
}
|
||||
|
||||
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
|
||||
index 7881f0e84be5..0be727fbc346 100644
|
||||
index 97e7fccb5e3c..ecf90bd0126a 100644
|
||||
--- a/lib/Core/StatsTracker.cpp
|
||||
+++ b/lib/Core/StatsTracker.cpp
|
||||
@@ -286,6 +286,29 @@ void StatsTracker::done() {
|
||||
@@ -285,6 +285,29 @@ void StatsTracker::done() {
|
||||
void StatsTracker::stepInstruction(ExecutionState &es) {
|
||||
if (OutputIStats) {
|
||||
if (TrackInstructionTime) {
|
||||
@ -102,7 +102,7 @@ index 7881f0e84be5..0be727fbc346 100644
|
||||
static sys::TimeValue lastNowTime(0,0),lastUserTime(0,0);
|
||||
|
||||
if (lastUserTime.seconds()==0 && lastUserTime.nanoseconds()==0) {
|
||||
@@ -301,6 +324,7 @@ void StatsTracker::stepInstruction(ExecutionState &es) {
|
||||
@@ -300,6 +323,7 @@ void StatsTracker::stepInstruction(ExecutionState &es) {
|
||||
lastUserTime = user;
|
||||
lastNowTime = now;
|
||||
}
|
||||
@ -195,5 +195,5 @@ index da96981079ae..a223b39ada57 100644
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -27,10 +27,10 @@ index 5fb9f4ec5c2f..bf7cb6ff0bea 100644
|
||||
CurTy = 0;
|
||||
}
|
||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||
index 75132e0db71b..1c08870b7a20 100644
|
||||
index 1a5b7b9df527..51d36b352e5c 100644
|
||||
--- a/lib/Core/Executor.cpp
|
||||
+++ b/lib/Core/Executor.cpp
|
||||
@@ -2598,8 +2598,7 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
|
||||
@@ -2621,8 +2621,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 75132e0db71b..1c08870b7a20 100644
|
||||
uint64_t elementSize =
|
||||
kmodule->targetData->getTypeStoreSize(set->getElementType());
|
||||
Value *operand = ii.getOperand();
|
||||
@@ -2613,7 +2612,24 @@ void Executor::computeOffsets(KGEPInstruction *kgepi, TypeIt ib, TypeIt ie) {
|
||||
@@ -2636,7 +2635,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 75132e0db71b..1c08870b7a20 100644
|
||||
}
|
||||
kgepi->offset = constantOffset->getZExtValue();
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -28,5 +28,5 @@ index a352db3339c4..7718ae9d0ccb 100644
|
||||
const StructLayout *SL = kmodule->targetData->getStructLayout(STy);
|
||||
base = base->Add(
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -18,10 +18,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||
index 154a76feb361..def83b584167 100644
|
||||
index c7dc517a8eee..883be83a4130 100644
|
||||
--- a/tools/klee/main.cpp
|
||||
+++ b/tools/klee/main.cpp
|
||||
@@ -658,7 +658,11 @@ static int initEnv(Module *mainModule) {
|
||||
@@ -655,7 +655,11 @@ static void initEnv(Module *mainModule) {
|
||||
Instruction *firstInst = &*(mainFn->begin()->begin());
|
||||
|
||||
Value *oldArgc = &*(mainFn->arg_begin());
|
||||
@ -33,9 +33,9 @@ index 154a76feb361..def83b584167 100644
|
||||
|
||||
AllocaInst* argcPtr =
|
||||
new AllocaInst(oldArgc->getType(), "argcPtr", firstInst);
|
||||
@@ -1117,7 +1121,11 @@ static llvm::Module *linkWithUclibc(llvm::Module *mainModule, StringRef libDir)
|
||||
args.push_back(llvm::ConstantExpr::getBitCast(userMainFn,
|
||||
ft->getParamType(0)));
|
||||
@@ -1057,7 +1061,11 @@ createLibCWrapper(std::vector<std::unique_ptr<llvm::Module>> &modules,
|
||||
args.push_back(
|
||||
llvm::ConstantExpr::getBitCast(inModuleRefernce, ft->getParamType(0)));
|
||||
args.push_back(&*(stub->arg_begin())); // argc
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
|
||||
+ args.push_back(&*(stub->arg_begin() + 1)); // argv
|
||||
@ -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.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -12,10 +12,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
|
||||
index f73d1614c250..5433d9211ead 100644
|
||||
index a5c7f652e976..65e858c3336d 100644
|
||||
--- a/lib/Expr/Expr.cpp
|
||||
+++ b/lib/Expr/Expr.cpp
|
||||
@@ -328,7 +328,11 @@ ref<Expr> ConstantExpr::fromMemory(void *address, Width width) {
|
||||
@@ -333,7 +333,11 @@ ref<Expr> ConstantExpr::fromMemory(void *address, Width width) {
|
||||
// FIXME: what about machines without x87 support?
|
||||
default:
|
||||
return ConstantExpr::alloc(llvm::APInt(width,
|
||||
@ -28,5 +28,5 @@ index f73d1614c250..5433d9211ead 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -10,11 +10,11 @@ Since commit 9d54400bba7eb04bca80fce97fa170452d19eaf1.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
include/klee/Config/Version.h | 6 ++++++
|
||||
lib/Module/Checks.cpp | 8 ++++----
|
||||
lib/Module/IntrinsicCleaner.cpp | 3 ++-
|
||||
tools/klee/main.cpp | 20 ++++++++++----------
|
||||
4 files changed, 22 insertions(+), 15 deletions(-)
|
||||
include/klee/Config/Version.h | 6 ++++++
|
||||
lib/Module/Checks.cpp | 8 ++++----
|
||||
lib/Module/IntrinsicCleaner.cpp | 3 ++-
|
||||
tools/klee/main.cpp | 4 ++--
|
||||
4 files changed, 14 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/include/klee/Config/Version.h b/include/klee/Config/Version.h
|
||||
index 532051602fe3..a02ce28baaae 100644
|
||||
@ -58,11 +58,11 @@ index aac63e1d9854..406b3045e527 100644
|
||||
}
|
||||
|
||||
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
|
||||
index e10e886e8915..d4f93bdc591e 100644
|
||||
index c48952c28004..ab16a2654492 100644
|
||||
--- a/lib/Module/IntrinsicCleaner.cpp
|
||||
+++ b/lib/Module/IntrinsicCleaner.cpp
|
||||
@@ -214,7 +214,8 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
|
||||
// Intrisic instruction "llvm.trap" found. Directly lower it to
|
||||
@@ -210,7 +210,8 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
|
||||
// Intrinsic 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));
|
||||
@ -72,10 +72,10 @@ index e10e886e8915..d4f93bdc591e 100644
|
||||
F->setDoesNotThrow();
|
||||
|
||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||
index def83b584167..ff87d210b863 100644
|
||||
index 883be83a4130..c0805f457717 100644
|
||||
--- a/tools/klee/main.cpp
|
||||
+++ b/tools/klee/main.cpp
|
||||
@@ -678,8 +678,8 @@ static int initEnv(Module *mainModule) {
|
||||
@@ -675,8 +675,8 @@ static void initEnv(Module *mainModule) {
|
||||
cast<Function>(mainModule->getOrInsertFunction("klee_init_env",
|
||||
Type::getVoidTy(ctx),
|
||||
argcPtr->getType(),
|
||||
@ -86,35 +86,6 @@ index def83b584167..ff87d210b863 100644
|
||||
assert(initEnvFn);
|
||||
std::vector<Value*> args;
|
||||
args.push_back(argcPtr);
|
||||
@@ -1038,20 +1038,20 @@ static llvm::Module *linkWithUclibc(llvm::Module *mainModule, StringRef libDir)
|
||||
mainModule->getOrInsertFunction("realpath",
|
||||
PointerType::getUnqual(i8Ty),
|
||||
PointerType::getUnqual(i8Ty),
|
||||
- PointerType::getUnqual(i8Ty),
|
||||
- NULL);
|
||||
+ PointerType::getUnqual(i8Ty)
|
||||
+ KLEE_LLVM_GOIF_TERMINATOR);
|
||||
mainModule->getOrInsertFunction("getutent",
|
||||
- PointerType::getUnqual(i8Ty),
|
||||
- NULL);
|
||||
+ PointerType::getUnqual(i8Ty)
|
||||
+ KLEE_LLVM_GOIF_TERMINATOR);
|
||||
mainModule->getOrInsertFunction("__fgetc_unlocked",
|
||||
Type::getInt32Ty(ctx),
|
||||
- PointerType::getUnqual(i8Ty),
|
||||
- NULL);
|
||||
+ PointerType::getUnqual(i8Ty)
|
||||
+ KLEE_LLVM_GOIF_TERMINATOR);
|
||||
mainModule->getOrInsertFunction("__fputc_unlocked",
|
||||
Type::getInt32Ty(ctx),
|
||||
Type::getInt32Ty(ctx),
|
||||
- PointerType::getUnqual(i8Ty),
|
||||
- NULL);
|
||||
+ PointerType::getUnqual(i8Ty)
|
||||
+ KLEE_LLVM_GOIF_TERMINATOR);
|
||||
}
|
||||
|
||||
f = mainModule->getFunction("__ctype_get_mb_cur_max");
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -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 1c08870b7a20..ee6821b6dc18 100644
|
||||
index 51d36b352e5c..75af0fd09bd8 100644
|
||||
--- a/lib/Core/Executor.cpp
|
||||
+++ b/lib/Core/Executor.cpp
|
||||
@@ -1641,7 +1641,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
||||
@@ -1673,7 +1673,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 1c08870b7a20..ee6821b6dc18 100644
|
||||
} else {
|
||||
// Handle possible different branch targets
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -6,17 +6,13 @@ Patch-mainline: no
|
||||
llvm 5, moved file_magic to BinaryFormat in commit
|
||||
19ca2b0f9daed883c21730285d7f04424e5f5f88, so adapt to that.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
|
||||
`
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
lib/Module/ModuleUtil.cpp | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
|
||||
index ad847de0b368..5f967410568c 100644
|
||||
index 7f4bdb49380a..f1dbdb13bcff 100644
|
||||
--- a/lib/Module/ModuleUtil.cpp
|
||||
+++ b/lib/Module/ModuleUtil.cpp
|
||||
@@ -14,6 +14,9 @@
|
||||
@ -26,10 +22,10 @@ index ad847de0b368..5f967410568c 100644
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
|
||||
+#include "llvm/BinaryFormat/Magic.h"
|
||||
+#endif
|
||||
#include "llvm/IRReader/IRReader.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
@@ -477,7 +480,9 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
@@ -380,13 +383,19 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
MemoryBuffer *Buffer = bufferErr->get();
|
||||
#endif
|
||||
|
||||
@ -40,30 +36,28 @@ index ad847de0b368..5f967410568c 100644
|
||||
sys::fs::file_magic magic = sys::fs::identify_magic(Buffer.getBuffer());
|
||||
#else
|
||||
sys::fs::file_magic magic = sys::fs::identify_magic(Buffer->getBuffer());
|
||||
@@ -486,7 +491,11 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
LLVMContext &Context = module->getContext();
|
||||
std::string ErrorMessage;
|
||||
#endif
|
||||
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
|
||||
+ if (magic == file_magic::bitcode) {
|
||||
+#else
|
||||
if (magic == sys::fs::file_magic::bitcode) {
|
||||
+#endif
|
||||
#if LLVM_VERSION_CODE < LLVM_VERSION(3, 8)
|
||||
Module *Result = 0;
|
||||
#endif
|
||||
@@ -538,7 +547,11 @@ Module *klee::linkWithLibrary(Module *module,
|
||||
delete Result;
|
||||
#endif
|
||||
SMDiagnostic Err;
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6)
|
||||
std::unique_ptr<llvm::Module> module(parseIR(Buffer, Err, context));
|
||||
@@ -403,7 +412,11 @@ bool klee::loadFile(const std::string &fileName, LLVMContext &context,
|
||||
return true;
|
||||
}
|
||||
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
|
||||
+ } else if (magic == file_magic::archive) {
|
||||
+ if (magic == file_magic::archive) {
|
||||
+#else
|
||||
} else if (magic == sys::fs::file_magic::archive) {
|
||||
if (magic == sys::fs::file_magic::archive) {
|
||||
+#endif
|
||||
#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9)
|
||||
Expected<std::unique_ptr<object::Binary> > arch =
|
||||
object::createBinary(Buffer, &Context);
|
||||
Expected<std::unique_ptr<object::Binary> > archOwner =
|
||||
object::createBinary(Buffer, &context);
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -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 ee6821b6dc18..9004b46e8f15 100644
|
||||
index 75af0fd09bd8..46fd2be42351 100644
|
||||
--- a/lib/Core/Executor.cpp
|
||||
+++ b/lib/Core/Executor.cpp
|
||||
@@ -2294,7 +2294,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
||||
@@ -2326,7 +2326,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 ee6821b6dc18..9004b46e8f15 100644
|
||||
llvm::APFloat::rmTowardZero, &isExact);
|
||||
bindLocal(ki, state, ConstantExpr::alloc(value, resultType));
|
||||
break;
|
||||
@@ -2311,7 +2316,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
||||
@@ -2343,7 +2348,12 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
||||
|
||||
uint64_t value = 0;
|
||||
bool isExact = true;
|
||||
@ -45,5 +45,5 @@ index ee6821b6dc18..9004b46e8f15 100644
|
||||
bindLocal(ki, state, ConstantExpr::alloc(value, resultType));
|
||||
break;
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -12,10 +12,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
|
||||
index ff87d210b863..c85fee861f03 100644
|
||||
index c0805f457717..d45a92160e59 100644
|
||||
--- a/tools/klee/main.cpp
|
||||
+++ b/tools/klee/main.cpp
|
||||
@@ -664,10 +664,18 @@ static int initEnv(Module *mainModule) {
|
||||
@@ -661,10 +661,18 @@ static void initEnv(Module *mainModule) {
|
||||
Value *oldArgv = &*(++mainFn->arg_begin());
|
||||
#endif
|
||||
|
||||
@ -35,5 +35,5 @@ index ff87d210b863..c85fee861f03 100644
|
||||
/* Insert void klee_init_env(int* argc, char*** argv) */
|
||||
std::vector<const Type*> params;
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -14,10 +14,10 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
|
||||
index d4f93bdc591e..e8c63cd334d0 100644
|
||||
index ab16a2654492..19807ce08583 100644
|
||||
--- a/lib/Module/IntrinsicCleaner.cpp
|
||||
+++ b/lib/Module/IntrinsicCleaner.cpp
|
||||
@@ -230,13 +230,29 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
|
||||
@@ -227,13 +227,29 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
|
||||
case Intrinsic::objectsize: {
|
||||
// We don't know the size of an object in general so we replace
|
||||
// with 0 or -1 depending on the second argument to the intrinsic.
|
||||
@ -48,5 +48,5 @@ index d4f93bdc591e..e8c63cd334d0 100644
|
||||
IntegerType *intType = dyn_cast<IntegerType>(ii->getType());
|
||||
assert(intType && "intrinsic does not have integer return type");
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
@ -95,5 +95,5 @@ index 3a111f99c619..95070e66e45c 100644
|
||||
|
||||
declare void @abort() noreturn nounwind
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
||||
|
1564
0019-llvm50-test-add-disable-O0-optnone-to-O0.patch
Normal file
1564
0019-llvm50-test-add-disable-O0-optnone-to-O0.patch
Normal file
File diff suppressed because it is too large
Load Diff
46
0020-llvm50-CallSite.paramHasAttr-is-indexed-from-0.patch
Normal file
46
0020-llvm50-CallSite.paramHasAttr-is-indexed-from-0.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From: Jiri Slaby <jirislaby@gmail.com>
|
||||
Date: Fri, 20 Jul 2018 10:06:29 +0200
|
||||
Subject: llvm50: CallSite.paramHasAttr is indexed from 0
|
||||
Patch-mainline: no
|
||||
|
||||
Since LLVM 5 commit 1f8f0490690b, CallSite.paramHasAttr is indexed from
|
||||
0, so make sure we use correct indexing in klee. And use
|
||||
CallSite.hasRetAttr for return attributes.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
lib/Core/Executor.cpp | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
|
||||
index 46fd2be42351..f05561e7fe82 100644
|
||||
--- a/lib/Core/Executor.cpp
|
||||
+++ b/lib/Core/Executor.cpp
|
||||
@@ -1543,7 +1543,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
||||
CallSite(cast<CallInst>(caller)));
|
||||
|
||||
// XXX need to check other param attrs ?
|
||||
- bool isSExt = cs.paramHasAttr(0, llvm::Attribute::SExt);
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
|
||||
+ bool isSExt = cs.hasRetAttr(llvm::Attribute::SExt);
|
||||
+#else
|
||||
+ bool isSExt = cs.paramHasAttr(0, llvm::Attribute::SExt);
|
||||
+#endif
|
||||
if (isSExt) {
|
||||
result = SExtExpr::create(result, to);
|
||||
} else {
|
||||
@@ -1837,7 +1841,11 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
|
||||
|
||||
if (from != to) {
|
||||
// XXX need to check other param attrs ?
|
||||
+#if LLVM_VERSION_CODE >= LLVM_VERSION(5, 0)
|
||||
+ bool isSExt = cs.paramHasAttr(i, llvm::Attribute::SExt);
|
||||
+#else
|
||||
bool isSExt = cs.paramHasAttr(i+1, llvm::Attribute::SExt);
|
||||
+#endif
|
||||
if (isSExt) {
|
||||
arguments[i] = SExtExpr::create(arguments[i], to);
|
||||
} else {
|
||||
--
|
||||
2.18.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
From: Jiri Slaby <jirislaby@gmail.com>
|
||||
Date: Mon, 21 May 2018 15:12:44 +0200
|
||||
Subject: llvm60: SetVersionPrinter now passes down a stream
|
||||
Subject: llvm6: SetVersionPrinter now passes down a stream
|
||||
Patch-mainline: no
|
||||
|
||||
I.e. klee::printVersion should now have a parameter -- the output
|
||||
@ -81,5 +81,5 @@ index d39249df023f..b7f2b6ff347a 100644
|
||||
llvm::cl::PrintVersionMessage();
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
From: Jiri Slaby <jirislaby@gmail.com>
|
||||
Date: Mon, 21 May 2018 15:14:41 +0200
|
||||
Subject: llvm60: handle headers renaming
|
||||
Subject: llvm6: handle headers renaming
|
||||
Patch-mainline: no
|
||||
|
||||
Some headers were moved from llvm/Target/ to llvm/CodeGen/. Handle that.
|
||||
@ -11,7 +11,7 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
|
||||
index d9b3e40154ba..d478ff828796 100644
|
||||
index 4967a2fa8578..eef22fb81553 100644
|
||||
--- a/lib/Module/RaiseAsm.cpp
|
||||
+++ b/lib/Module/RaiseAsm.cpp
|
||||
@@ -18,10 +18,16 @@
|
||||
@ -33,5 +33,5 @@ index d9b3e40154ba..d478ff828796 100644
|
||||
|
||||
using namespace llvm;
|
||||
--
|
||||
2.17.0
|
||||
2.18.0
|
||||
|
@ -10,7 +10,7 @@
|
||||
// FileCheck does a line-by line check of a file that validates whether it
|
||||
// contains the expected content. This is useful for regression tests etc.
|
||||
//
|
||||
// This program exits with an error status of 2 on error, exit status of 0 if
|
||||
// This program exits with an exit status of 2 on error, exit status of 0 if
|
||||
// the file matched the expected contents, and exit status of 1 if it did not
|
||||
// contain the expected contents.
|
||||
//
|
||||
@ -62,6 +62,10 @@ static cl::list<std::string> ImplicitCheckNot(
|
||||
"this pattern occur which are not matched by a positive pattern"),
|
||||
cl::value_desc("pattern"));
|
||||
|
||||
static cl::list<std::string> GlobalDefines("D", cl::Prefix,
|
||||
cl::desc("Define a variable to be used in capture patterns."),
|
||||
cl::value_desc("VAR=VALUE"));
|
||||
|
||||
static cl::opt<bool> AllowEmptyInput(
|
||||
"allow-empty", cl::init(false),
|
||||
cl::desc("Allow the input file to be empty. This is useful when making\n"
|
||||
@ -73,6 +77,12 @@ static cl::opt<bool> MatchFullLines(
|
||||
"Allows leading and trailing whitespace if --strict-whitespace\n"
|
||||
"is not also passed."));
|
||||
|
||||
static cl::opt<bool> EnableVarScope(
|
||||
"enable-var-scope", cl::init(false),
|
||||
cl::desc("Enables scope for regex variables. Variables with names that\n"
|
||||
"do not start with '$' will be reset at the beginning of\n"
|
||||
"each CHECK-LABEL block."));
|
||||
|
||||
typedef cl::list<std::string>::const_iterator prefix_iterator;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -263,15 +273,19 @@ bool Pattern::ParsePattern(StringRef PatternStr, StringRef Prefix,
|
||||
// is relaxed, more strict check is performed in \c EvaluateExpression.
|
||||
bool IsExpression = false;
|
||||
for (unsigned i = 0, e = Name.size(); i != e; ++i) {
|
||||
if (i == 0 && Name[i] == '@') {
|
||||
if (NameEnd != StringRef::npos) {
|
||||
SM.PrintMessage(SMLoc::getFromPointer(Name.data()),
|
||||
SourceMgr::DK_Error,
|
||||
"invalid name in named regex definition");
|
||||
return true;
|
||||
if (i == 0) {
|
||||
if (Name[i] == '$') // Global vars start with '$'
|
||||
continue;
|
||||
if (Name[i] == '@') {
|
||||
if (NameEnd != StringRef::npos) {
|
||||
SM.PrintMessage(SMLoc::getFromPointer(Name.data()),
|
||||
SourceMgr::DK_Error,
|
||||
"invalid name in named regex definition");
|
||||
return true;
|
||||
}
|
||||
IsExpression = true;
|
||||
continue;
|
||||
}
|
||||
IsExpression = true;
|
||||
continue;
|
||||
}
|
||||
if (Name[i] != '_' && !isalnum(Name[i]) &&
|
||||
(!IsExpression || (Name[i] != '+' && Name[i] != '-'))) {
|
||||
@ -1193,7 +1207,7 @@ size_t CheckString::CheckDag(const SourceMgr &SM, StringRef Buffer,
|
||||
// If there's CHECK-NOTs between two CHECK-DAGs or from CHECK to
|
||||
// CHECK-DAG, verify that there's no 'not' strings occurred in that
|
||||
// region.
|
||||
StringRef SkippedRegion = Buffer.substr(LastPos, MatchPos);
|
||||
StringRef SkippedRegion = Buffer.slice(LastPos, MatchPos);
|
||||
if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable))
|
||||
return StringRef::npos;
|
||||
// Clear "not strings".
|
||||
@ -1262,6 +1276,18 @@ static void DumpCommandLine(int argc, char **argv) {
|
||||
errs() << "\n";
|
||||
}
|
||||
|
||||
// Remove local variables from \p VariableTable. Global variables
|
||||
// (start with '$') are preserved.
|
||||
static void ClearLocalVars(StringMap<StringRef> &VariableTable) {
|
||||
SmallVector<StringRef, 16> LocalVars;
|
||||
for (const auto &Var : VariableTable)
|
||||
if (Var.first()[0] != '$')
|
||||
LocalVars.push_back(Var.first());
|
||||
|
||||
for (const auto &Var : LocalVars)
|
||||
VariableTable.erase(Var);
|
||||
}
|
||||
|
||||
/// Check the input to FileCheck provided in the \p Buffer against the \p
|
||||
/// CheckStrings read from the check file.
|
||||
///
|
||||
@ -1273,6 +1299,9 @@ bool CheckInput(SourceMgr &SM, StringRef Buffer,
|
||||
/// VariableTable - This holds all the current filecheck variables.
|
||||
StringMap<StringRef> VariableTable;
|
||||
|
||||
for (const auto& Def : GlobalDefines)
|
||||
VariableTable.insert(StringRef(Def).split('='));
|
||||
|
||||
unsigned i = 0, j = 0, e = CheckStrings.size();
|
||||
while (true) {
|
||||
StringRef CheckRegion;
|
||||
@ -1298,6 +1327,9 @@ bool CheckInput(SourceMgr &SM, StringRef Buffer,
|
||||
++j;
|
||||
}
|
||||
|
||||
if (EnableVarScope)
|
||||
ClearLocalVars(VariableTable);
|
||||
|
||||
for (; i != j; ++i) {
|
||||
const CheckString &CheckStr = CheckStrings[i];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">git://github.com/klee/klee.git</param>
|
||||
<param name="changesrevision">d2fbdf74493d69e73fbfaedc0d59e593dfd7c69d</param></service></servicedata>
|
||||
<param name="changesrevision">b893d2158ce001da97f2c741ac8320b4c3b9ed53</param></service></servicedata>
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d03fcc9a6ed53e1e2e7784813b5a3f612b09cc33fda8db68e7aade78ec839bb5
|
||||
size 592052
|
3
klee-1.4.0+20180829.tar.xz
Normal file
3
klee-1.4.0+20180829.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7f46c097ddadb8c4b6a3ec70294b7a8d2c8d6451a67913d698813832695a046c
|
||||
size 597812
|
@ -1,21 +0,0 @@
|
||||
From: Jiri Slaby <jirislaby@gmail.com>
|
||||
Date: Thu, 15 Jun 2017 15:20:49 +0200
|
||||
Subject: klee: skip some tests
|
||||
Patch-mainline: no
|
||||
|
||||
Some of the tests trigger FAILURE occasionally. The reason is unknown
|
||||
yet. So mark them as to require an unknown prerequisite to disable the
|
||||
tests completely.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
test/Concrete/ConstantExpr.llvm37.ll | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/test/Concrete/ConstantExpr.llvm37.ll
|
||||
+++ b/test/Concrete/ConstantExpr.llvm37.ll
|
||||
@@ -1,3 +1,4 @@
|
||||
+; REQUIRES: bubak
|
||||
; REQUIRES: geq-llvm-3.7
|
||||
; RUN: %S/ConcreteTest.py --klee='%klee' --lli=%lli %s
|
||||
|
162
klee.changes
162
klee.changes
@ -1,3 +1,109 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 02 08:39:37 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 1.4.0+20180829:
|
||||
* klee-stats: add TResolve(%) to --print-all
|
||||
* llvm.sh: fix patch source paths
|
||||
* Disabled unit testing in default build
|
||||
* Fixed runtest library to handle the case of a NULL "name" argument in klee_make_symbolic. Changed a test case to check this feature.
|
||||
* Replace remaining *Inst::Create() calls with llvm::Builder
|
||||
* [clang-format]Allow longer codelines in test/
|
||||
* test: remove geq-llvm-3.4
|
||||
* remove last comma from -debug-print-escaping-functions
|
||||
* test/Feature/EscapingFunctionsAlias.c: clarify alias(ee) casting
|
||||
* add declarations to escapingFunctions
|
||||
* ModuleUtil: improve and test valueIsOnlyCalled
|
||||
* fix: LLVM 3.5, begin_user() instead of begin_use()
|
||||
* ExternalDispatcher: setErrorStr for EngineBuilder
|
||||
* travis CI: add LLVM 3.8 build tests
|
||||
* llvm38: test, change some tests
|
||||
* llvm38: no more implicit iterators
|
||||
* llvm38: archive child iterator changes
|
||||
* llvm38: adapt to new Linker::linkModules
|
||||
* llvm38: SmallString is always up-to-date
|
||||
* llvm38: handle optimization passes changes
|
||||
* llvm38: no rounding in APFloat
|
||||
* Fix uploading of coverage information from inside of docker
|
||||
* Add missing curl
|
||||
* Fix slow Mac Travis build: wildcard is not expanded with quotes
|
||||
* Added "override" in Executor.h to silence compiler warnings (and ran clang-format on patch)
|
||||
* Removed support for klee_make_symbolic with 2 arguments. This has been deprecated for many years now and causes problems during replay. Changed and simplified affected test case.
|
||||
* test: remove undefined behaviour
|
||||
* Enabled tcmalloc by default
|
||||
* Link dynamic libraries with specific paths instead of resolving them during runtime
|
||||
* Fix incorrect invocation of klee
|
||||
* Fix uninitialized memory: enums have to be initialized
|
||||
* Add missing out-of-tree include files directory for TCMalloc
|
||||
* Fix compiler warnings if assertions are disabled
|
||||
* Support sanitizer suppression files with lit-based testing
|
||||
* Extensive updates to the build script for dependencies and docker
|
||||
* runtime: remove obsolete code for building modules instead of archives
|
||||
* Reorder linking and optimizations
|
||||
* Reorganise runtime libraries provided by KLEE
|
||||
* Removed obsolete script
|
||||
* test/lit.cfg: remove obsolete hack from (LLVM < 3.0 is no longer supported)
|
||||
* CMake: use cmake_{push,pop}_check_state
|
||||
* CMake: check for ctype and mallinfo functions with CXX instead of C compiler
|
||||
* fix out of range access in KleeHandler::getKTestFilesInDir
|
||||
* Explicitly initialize value to squelch a potentially uninitialized value warning
|
||||
* Fix the final -Wimplicit-fallthrough warning
|
||||
* Make ConstantExpr hashing function faster and modify affected test
|
||||
- added patches:
|
||||
* 0003-llvm39-switch-KLEE_RUNTIME_BUILD_TYPE-to-Debug-Asser.patch
|
||||
* 0005-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
||||
* 0020-llvm50-CallSite.paramHasAttr-is-indexed-from-0.patch
|
||||
- removed patches (in upstream now):
|
||||
* 0001-test-remove-undefined-behaviour.patch
|
||||
* 0002-llvm38-no-rounding-in-APFloat.patch
|
||||
* 0003-llvm38-handle-optimization-passes-changes.patch
|
||||
* 0004-llvm38-SmallString-is-always-up-to-date.patch
|
||||
* 0005-llvm38-materializeAllPermanently-was-renamed.patch
|
||||
* 0006-llvm38-adapt-to-new-Linker-linkModules.patch
|
||||
* 0007-llvm38-archive-child-iterator-changes.patch
|
||||
* 0008-llvm38-no-more-implicit-iterators.patch
|
||||
* 0009-llvm38-test-change-some-tests.patch
|
||||
- renamed patches:
|
||||
* 0010-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||
-> 0001-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||
* 0011-cmake-find_llvm-fix-libraries-with-llvm-config-3.9.patch
|
||||
-> 0002-cmake-find_llvm-fix-libraries-with-llvm-config-3.9.patch
|
||||
* 0012-llvm40-handle-different-header-names.patch
|
||||
-> 0003-llvm39-switch-KLEE_RUNTIME_BUILD_TYPE-to-Debug-Asser.patch
|
||||
* 0013-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
||||
-> 0004-llvm40-handle-different-header-names.patch
|
||||
* 0014-llvm40-errorOr-and-similar.patch
|
||||
-> 0006-llvm40-errorOr-and-similar.patch
|
||||
* 0015-llvm-use-chrono-helpers-from-LLVM-4.0.patch
|
||||
-> 0007-llvm-use-chrono-helpers-from-LLVM-4.0.patch
|
||||
* 0016-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
|
||||
-> 0008-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
|
||||
* 0017-llvm40-gep_type_iterator-has-no-operator.patch
|
||||
-> 0009-llvm40-gep_type_iterator-has-no-operator.patch
|
||||
* 0018-llvm50-avoid-on-function-arg_begin.patch
|
||||
-> 0010-llvm50-avoid-on-function-arg_begin.patch
|
||||
* 0019-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
|
||||
-> 0011-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
|
||||
* 0020-llvm50-handle-getOrInsertFunction-terminator.patch
|
||||
-> 0012-llvm50-handle-getOrInsertFunction-terminator.patch
|
||||
* 0021-llvm50-SwitchInst-case-functions-now-return-pointers.patch
|
||||
-> 0013-llvm50-SwitchInst-case-functions-now-return-pointers.patch
|
||||
* 0022-llvm50-handle-new-file_magic-s-location.patch
|
||||
-> 0014-llvm50-handle-new-file_magic-s-location.patch
|
||||
* 0023-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
|
||||
-> 0015-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
|
||||
* 0024-llvm50-AllocaInst-takes-address-space.patch
|
||||
-> 0016-llvm50-AllocaInst-takes-address-space.patch
|
||||
* 0025-llvm50-Intrinsic-objectsize-has-three-arguments.patch
|
||||
-> 0017-llvm50-Intrinsic-objectsize-has-three-arguments.patch
|
||||
* 0026-llvm50-test-change-objectsize.patch
|
||||
-> 0018-llvm50-test-change-objectsize.patch
|
||||
* 0027-llvm50-test-add-disable-O0-optnone-to-O0.patch
|
||||
-> 0019-llvm50-test-add-disable-O0-optnone-to-O0.patch
|
||||
* 0028-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
|
||||
-> 0021-llvm6-SetVersionPrinter-now-passes-down-a-stream.patch
|
||||
* 0029-llvm60-handle-headers-renaming.patch
|
||||
-> 0022-llvm6-handle-headers-renaming.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 16 09:09:56 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
||||
@ -7,6 +113,62 @@ Sat Jun 16 09:09:56 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
* cmake: find_llvm, handle libLLVM-version.so properly
|
||||
* Fixed memory leak from Executor::inCloseMerge, fixes #883
|
||||
- Require python3-lit as the lit packaging was refactored
|
||||
- switch to llvm 6
|
||||
- removed patches:
|
||||
* 0001-llvm-make-KLEE-compile-against-LLVM-3.8.patch
|
||||
(it was split into multiple commits below)
|
||||
* klee-skip-some-tests.patch
|
||||
(tests should be working perfectly now)
|
||||
- added patches:
|
||||
* 0001-test-remove-undefined-behaviour.patch
|
||||
* 0002-llvm38-no-rounding-in-APFloat.patch
|
||||
* 0003-llvm38-handle-optimization-passes-changes.patch
|
||||
* 0004-llvm38-SmallString-is-always-up-to-date.patch
|
||||
* 0005-llvm38-materializeAllPermanently-was-renamed.patch
|
||||
* 0006-llvm38-adapt-to-new-Linker-linkModules.patch
|
||||
* 0007-llvm38-archive-child-iterator-changes.patch
|
||||
* 0008-llvm38-no-more-implicit-iterators.patch
|
||||
* 0011-cmake-find_llvm-fix-libraries-with-llvm-config-3.9.patch
|
||||
* 0027-llvm50-test-add-disable-O0-optnone-to-O0.patch
|
||||
- renamed patches:
|
||||
* 0002-llvm38-test-change-some-tests.patch
|
||||
-> 0009-llvm38-test-change-some-tests.patch
|
||||
* 0003-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||
-> 0010-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||
* 0004-llvm40-handle-different-header-names.patch
|
||||
-> 0012-llvm40-handle-different-header-names.patch
|
||||
* 0005-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
||||
-> 0013-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
||||
* 0006-llvm40-errorOr-and-similar.patch
|
||||
-> 0014-llvm40-errorOr-and-similar.patch
|
||||
* 0007-llvm-use-chrono-helpers-from-LLVM-4.0.patch
|
||||
-> 0015-llvm-use-chrono-helpers-from-LLVM-4.0.patch
|
||||
* 0008-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
|
||||
-> 0016-llvm-PointerType-is-not-SequentialType-in-LLVM-4.patch
|
||||
* 0009-llvm40-gep_type_iterator-has-no-operator.patch
|
||||
-> 0017-llvm40-gep_type_iterator-has-no-operator.patch
|
||||
* 0010-llvm50-avoid-on-function-arg_begin.patch
|
||||
-> 0018-llvm50-avoid-on-function-arg_begin.patch
|
||||
* 0011-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
|
||||
-> 0019-llvm50-integerPartWidth-is-from-llvm-APFloatBase.patch
|
||||
* 0012-llvm50-handle-getOrInsertFunction-terminator.patch
|
||||
-> 0020-llvm50-handle-getOrInsertFunction-terminator.patch
|
||||
* 0013-llvm50-SwitchInst-case-functions-now-return-pointers.patch
|
||||
-> 0021-llvm50-SwitchInst-case-functions-now-return-pointers.patch
|
||||
* 0014-llvm50-handle-new-file_magic-s-location.patch
|
||||
-> 0022-llvm50-handle-new-file_magic-s-location.patch
|
||||
* 0015-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
|
||||
-> 0023-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
|
||||
* 0016-llvm50-AllocaInst-takes-address-space.patch
|
||||
-> 0024-llvm50-AllocaInst-takes-address-space.patch
|
||||
* 0017-llvm50-Intrinsic-objectsize-has-three-arguments.patch
|
||||
-> 0025-llvm50-Intrinsic-objectsize-has-three-arguments.patch
|
||||
* 0018-llvm50-test-change-objectsize.patch
|
||||
-> 0026-llvm50-test-change-objectsize.patch
|
||||
* 0019-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
|
||||
-> 0028-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
|
||||
* 0020-llvm60-handle-headers-renaming.patch
|
||||
-> 0029-llvm60-handle-headers-renaming.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 25 10:57:57 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
49
klee.spec
49
klee.spec
@ -15,11 +15,11 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define llvm_version_major 4
|
||||
%define llvm_version_major 6
|
||||
%define llvm_version_minor 0
|
||||
%define llvm_version %{llvm_version_major}
|
||||
|
||||
%define version_unconverted 1.4.0+20180614
|
||||
%define version_unconverted 1.4.0+20180829
|
||||
|
||||
%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+20180614
|
||||
Version: 1.4.0+20180829
|
||||
Release: 0
|
||||
Url: http://klee.github.io/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
@ -39,9 +39,9 @@ Source1: %{name}-rpmlintrc
|
||||
Source2: https://raw.githubusercontent.com/llvm-mirror/llvm/release_%{llvm_version_major}%{llvm_version_minor}/utils/not/not.cpp
|
||||
Source3: https://raw.githubusercontent.com/llvm-mirror/llvm/release_%{llvm_version_major}%{llvm_version_minor}/utils/FileCheck/FileCheck.cpp
|
||||
|
||||
Patch201: 0001-llvm-make-KLEE-compile-against-LLVM-3.8.patch
|
||||
Patch202: 0002-llvm38-test-change-some-tests.patch
|
||||
Patch203: 0003-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||
Patch201: 0001-llvm-make-KLEE-compile-against-LLVM-3.9.patch
|
||||
Patch202: 0002-cmake-find_llvm-fix-libraries-with-llvm-config-3.9.patch
|
||||
Patch203: 0003-llvm39-switch-KLEE_RUNTIME_BUILD_TYPE-to-Debug-Asser.patch
|
||||
Patch204: 0004-llvm40-handle-different-header-names.patch
|
||||
Patch205: 0005-llvm-APFloat-members-are-functions-in-LLVM-4.0.patch
|
||||
Patch206: 0006-llvm40-errorOr-and-similar.patch
|
||||
@ -57,10 +57,10 @@ Patch215: 0015-llvm50-use-MutableArrayRef-for-APFloat-convertToInte.patch
|
||||
Patch216: 0016-llvm50-AllocaInst-takes-address-space.patch
|
||||
Patch217: 0017-llvm50-Intrinsic-objectsize-has-three-arguments.patch
|
||||
Patch218: 0018-llvm50-test-change-objectsize.patch
|
||||
Patch219: 0019-llvm60-SetVersionPrinter-now-passes-down-a-stream.patch
|
||||
Patch220: 0020-llvm60-handle-headers-renaming.patch
|
||||
|
||||
Patch300: klee-skip-some-tests.patch
|
||||
Patch219: 0019-llvm50-test-add-disable-O0-optnone-to-O0.patch
|
||||
Patch220: 0020-llvm50-CallSite.paramHasAttr-is-indexed-from-0.patch
|
||||
Patch221: 0021-llvm6-SetVersionPrinter-now-passes-down-a-stream.patch
|
||||
Patch222: 0022-llvm6-handle-headers-renaming.patch
|
||||
|
||||
BuildRequires: clang%{llvm_version}
|
||||
BuildRequires: cmake
|
||||
@ -87,29 +87,7 @@ information on what KLEE is and what it can do, see the OSDI 2008 paper.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch201 -p1
|
||||
%patch202 -p1
|
||||
%patch203 -p1
|
||||
%patch204 -p1
|
||||
%patch205 -p1
|
||||
%patch206 -p1
|
||||
%patch207 -p1
|
||||
%patch208 -p1
|
||||
%patch209 -p1
|
||||
%patch210 -p1
|
||||
%patch211 -p1
|
||||
%patch212 -p1
|
||||
%patch213 -p1
|
||||
%patch214 -p1
|
||||
%patch215 -p1
|
||||
%patch216 -p1
|
||||
%patch217 -p1
|
||||
%patch218 -p1
|
||||
%patch219 -p1
|
||||
%patch220 -p1
|
||||
|
||||
#%%patch300 -p1
|
||||
%autopatch -p1
|
||||
|
||||
mkdir -p build/test/
|
||||
cp %{SOURCE2} build/test/
|
||||
@ -167,8 +145,9 @@ ninja check
|
||||
%{_libdir}/libkleeRuntest.so*
|
||||
%dir %{_libdir}/klee/
|
||||
%dir %{_libdir}/klee/runtime/
|
||||
%{_libdir}/klee/runtime/klee-libc.bc
|
||||
%{_libdir}/klee/runtime/kleeRuntimeIntrinsic.bc
|
||||
%{_libdir}/klee/runtime/libklee-libc.bca
|
||||
%{_libdir}/klee/runtime/libkleeRuntimeFreeStanding.bca
|
||||
%{_libdir}/klee/runtime/libkleeRuntimeIntrinsic.bca
|
||||
%if %{with_uclibc}
|
||||
%{_libdir}/klee/runtime/klee-uclibc.bca
|
||||
%{_libdir}/klee/runtime/libkleeRuntimePOSIX.bca
|
||||
|
3
not.cpp
3
not.cpp
@ -39,8 +39,7 @@ int main(int argc, const char **argv) {
|
||||
}
|
||||
|
||||
std::string ErrMsg;
|
||||
int Result = sys::ExecuteAndWait(*Program, argv, nullptr, nullptr, 0, 0,
|
||||
&ErrMsg);
|
||||
int Result = sys::ExecuteAndWait(*Program, argv, 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user