about summary refs log tree commit diff homepage
AgeCommit message (Collapse)Author
2016-01-12Refactor setting the core solver (i.e. STP, MetaSMT or DummySolver) by providingDan Liew
a ``createCoreSolver()`` function. The solver used is set by the new ``--solver-backend`` command line argument. The default is STP. This change necessitated refactoring the MetaSMT stuff. That clearly didn't belong in the Executor! The MetaSMT command line option is now ``--metasmt-backend`` as this only picks the MetaSMT backend. In order to use MetaSMT ``--solver-backend=metasmt`` needs to be passed. Note I don't have MetaSMT built on my development machine so I don't know if the MetaSMT stuff even compiles...
2016-01-12Drop unnecessary ``#include``s from Solver.cpp.Dan Liew
2016-01-12Refactor MetaSMTSolver and MetaSMTSolverImpl out of Solver.cpp intoDan Liew
their own file ``MetaSMTSolver.cpp``. Whilst I'm here also clang-format the modified code. This might not be a NFC (non functional change) as there's a good chance this has broken the MetaSMT build of KLEE. I don't have a build of MetaSMT to hand and there is no TravisCI build. At this point because there is no maintainer for this code I think we should consider removing it as it is going bitrot.
2016-01-12[NFC] Refactor STPSolver and STPSolverImpl out of Solver.cpp into theirDan Liew
own file ``STPSolver.cpp``. Whilst I'm here also clang-format the modified code.
2016-01-12[NFC] Refactor DummySolver out of Solver.cpp into its own fileDan Liew
``DummySolver.cpp``. Whilst I'm here also clang-format the modified code.
2016-01-12[NFC] Refactor ValidatingSolver out of Solver.cpp into its own fileDan Liew
``ValidatingSolver.cpp``. Whilst I'm here also clang-format the modified code.
2016-01-07[NFC] Refactor SolverImpl out of Solver.cpp into its own fileDan Liew
(SolverImpl.cpp). Whilst I'm here also clang-format the modified code.
2016-01-05Merge pull request #325 from delcypher/fix_independence_solver_leakCristian Cadar
Fix independence solver leak
2015-12-26Merge pull request #326 from domainexpert/upstreamDan Liew
Removed Language: Cpp Entry from .clang-format
2015-12-25Removed Language: Cpp entry from .clang-format due to incompatibility with ↵Andrew Santosa
Clang 3.4.2
2015-12-23Fix memory leak detected by ASan whenDan Liew
``IndependentSolver::computeInitialValues()`` was called where at least one of the constraint sets computed by ``getAllIndependentConstraintsSets()`` is either unsatisfiable or the solver failed. To make things (a little) clearer I've made it so that no ``std::list<>*`` is passed to``getAllIndependentConstraintsSets()``. Instead ``getAllIndependentConstraintsSets()`` now returns a ``std::list<>*`` that the caller is responsible for cleaning up. The behaviour previously was really confusing because it was unclear if the caller or callee was responsible for the clean up. This fixes #322
2015-12-23[NFC]Dan Liew
Reformat ``getAllIndependentConstraintsSets()`` using clang-format. It was not formatted correctly and was consequently a little hard to read. Also add braces around a for loop body. The original code for this function came from d9bcbba2c94086039c11c86200670639ee2ec19f
2015-12-23Merge pull request #323 from delcypher/support_objectsize_intrinsicDan Liew
Implement support for lowering the ``llvm.objectsize`` intrinsic
2015-12-23Merge pull request #321 from delcypher/fix_parser_leakDan Liew
Fix a leak detected by ASan in the KQuery parser where on destruction of
2015-12-23Merge pull request #319 from delcypher/fix_inc_array_hash_exprDan Liew
Fix duplication of klee::ArrayHashFn
2015-12-19Implement support for lowering the ``llvm.objectsize`` intrinsicDan Liew
introduced in LLVM 2.7. Previously KLEE would emit the following error message when ``IntrinsicLowering::LowerIntrinsicCall()`` was called on the intrinsic ``` LLVM ERROR: Code generator does not support intrinsic function 'llvm.objectsize.i64.p0i8'! ``` The ``IntrinsicCleaner`` pass now lowers this intrinsic to a constant integer depending on the second argument to the intrinsic. This corresponds to the case where the size of the object pointed to by the first argument is unknown. An alternative design would be to handle this intrinsic in the Executor where is actually possible to know the size of objects during execution. However that would be much more complicated because if the pointer is symbolic we would have to fork for every object that could be pointed to. The implementation is similar to #260 but we handle the second argument to the intrinsic correctly and also have a simple test case. Unfortunately we have to have a different version of the test case for LLVM 2.9 because the expected suffix for the intrinsic is different in LLVM 2.9.
2015-12-18Fix a leak detected by ASan in the KQuery parser where on destruction ofDan Liew
the ``ParserImpl`` it wouldn't free allocated ``Identifier``s
2015-12-18Fix duplication of ``klee::ArrayHashFn`` inDan Liew
``include/klee/util/ArrayCache.h``.
2015-12-18Move lib/Solver/SolverStats.h -> include/klee/SolverStats.hDan Liew
so that it is possible to ``#include "klee/util/ArrayExprHash.h"``
2015-12-18Remove a bunch of LeakSanitizer suppressions that aren't needed anymoreDan Liew
due to fixes from #315 and #316.
2015-12-18Merge pull request #315 from delcypher/array_leakDan Liew
Try to fix leaking Array objects detected by ASan.
2015-12-18Fix memory leaks of ``Array`` objects detected by ASan.Dan Liew
Some of these leaks were introduced by the factory constructor for Array objects (f049ff3bc04daead8c3bb9f06e89e71e2054c82a) but a few others have been around for far longer. This leak was fixed by introducing a ``ArrayCache`` object which has two purposes * Retains ownership of all created ``Array`` objects and destroys them when the ``ArrayCache`` destructor is called. * Mimic the caching behaviour for symbolic arrays that was introduced by f049ff3bc04daead8c3bb9f06e89e71e2054c82a where arrays with the same name and size get "uniqued". The Executor now maintains a ``arrayCache`` member that it uses and passes by pointer to objects that need to construct ``Array`` objects (i.e. ``ObjectState``). This way when the Executor is destroyed all the ``Array`` objects get freed which seems like the right time to do this. For Kleaver the ``ParserImpl`` has a ``TheArrayCache`` member that is used for building ``Array`` objects. This means that the Parser must live as long as the built expressions will be used otherwise we will have a use after free. I'm not sure this is the right design choice. It might be better to transfer ownership of the ``Array`` objects to the root ``Decl`` returned by the parser.
2015-12-17Clean up the check in the previous commit by using one of KLEE'sDan Liew
helper functions.
2015-12-17Fixed a bug with how non power 2 values were written to memory, added test ↵Timotej Kapus
for it
2015-12-17[Solver]Add support to dump STP qeries usingMartin Nowack
Use "-debug-dump-stp-queries" argument for KLEE/Kleaver to print out each STP query sent to the STP Solver. Queries have the format which `stp` frontend can understand.
2015-12-17Report fatal error in case CexCache Bindings do not matchMartin Nowack
2015-12-17Add dump function for AssignmentMartin Nowack
2015-12-17[Solver]Add simple option to dump queriesMartin Nowack
2015-12-17Refactoring: Moving klee_warning/_error functions to ErrorHandling in ↵Martin Nowack
Support directory
2015-12-17Merge pull request #316 from delcypher/update_list_leakDan Liew
Fix a memory leak in ``UpdateList`` detected by AddressSanitizer.
2015-12-17Fix a memory leak in ``UpdateList`` detected by AddressSanitizer.Dan Liew
The overloaded assignment operator previously only deleted the head ``UpdateNode`` if the ``UpdateList`` had exclusive ownership which left the remaining list of ``UpdateNode``s dangling if those nodes had ``refCount`` of 1. To fix this the logic that was previously in the ``UpdateList`` destructor for deleting nodes that were exclusively referenced by the UpdateList has been moved into ``UpdateList::tryFreeNodes()`` so that it can be called from ``UpdateList::operator=()``. It looks like this bug has been in KLEE since the beginning.
2015-12-17Add LeakSanitizer (component of AddressSanitizer) suppression fileDan Liew
which is required to suppress all the leaks I'm currently seeing in KLEE when running ``make unittests`` and ``make check``. Ideally there should be no leaks but we aren't there yet. Hopefully at some point we won't need to suppress any leaks and then we can have a TravisCI build that builds with ASan. The leak of the expression objects when running the executor is worrying and I will investigate this next.
2015-12-16Propagate AddressSanitizer, LeakSanitizer (part of AddressSanitizer),Dan Liew
MemorySanitzer and ThreadSanitizer environment variables when running lit tests. This makes it easy suppress errors in sanitized versions of KLEE
2015-12-13Ignore some generated files that will be visible if doing an in sourceDan Liew
build. Spotted by @domainexpert
2015-12-13Ignore some autoconf generated files.Dan Liew
2015-12-13Set C++ standard in Clang format settings file to C++03. OtherwiseDan Liew
template braces get reformatted the C++11 way and that breaks compilation.
2015-12-11Reword help description for ``--silent-klee-assume`` command lineDan Liew
flag as suggested by @ccadar
2015-12-11Change SilentKleeAssume.c test slightly so thatDan Liew
``--silent-klee-assume=0`` is no longer passed. This ensures that we also check that ``--silent-klee-assume`` is off by default.
2015-12-11Add command line flag ``--silent-klee-assume``to suppress errors due toValentin Wüstholz
infeasible assumptions.
2015-12-04Remove dead ifdef in STPBuilder header file. There is noDan Liew
``stp/stplog.h`` header file in the current version of STP and no support in the build system for setting this define so this code is completly dead.
2015-12-04Remove dead ``tempVars`` and ``getTempVar()`` method in STPBuilderDan Liew
2015-12-04Merge pull request #310 from msoos/fix-klee-clang-script2MartinNowack
Fixing klee-clang to strip all flags not understood by llvm-link
2015-12-04Fixing klee-clang to strip all flags not understood by llvm-linkMate Soos
2015-12-02Merge pull request #309 from msoos/fixstrong3MartinNowack
Removing -fstack-protector-strong for clang <= 3.4
2015-12-02Removing -fstack-protector-strong for clang <= 3.4Mate Soos
It's not supported and breaks compilation. This affects in particular Debian Jessie and probably all derived distros, too
2015-11-13Added NEWS fileCristian Cadar
2015-11-13Moving to version 1.1.0Cristian Cadar
2015-11-08Merge pull request #269 from MartinNowack/fix_sremMartinNowack
[STPBuilder] Generate SRrem expressions correctly
2015-10-31Merge pull request #296 from delcypher/specify_klee_uclibc_versionDan Liew
Specify klee uclibc version
2015-10-30Make sure TravisCI does a few builds where it uses the developmentDan Liew
branch for klee-uclibc.