Age | Commit message (Collapse) | Author |
|
Do not instrument shift operations with constant shift operations that
are smaller than the type size.
|
|
Use llvm::Builder instead of Inst::Create* to create instruction. This
handles metadata automatically and does instruction folding if possible.
Updated to C++11 and clang-formatted.
|
|
DivChecker can be executed multiple times due to the new linking
process.
Avoid instrumenting div instructions multiple times by annotating
checked instructions with marker. Only unmarked div instructions will be
instrumented.
|
|
Do not instrument divisions which do have a constant non-zero value.
|
|
Use llvm::Builder instead of raw `*Inst::create()` functions.
Builder automatically manages metadata (e.g. debug, TBAA, ..) such that
we don't have to take care of this automatically.
Updated code to C++11 and clang-formated it.
|
|
Simplify the handling of metadata attached to LLVM IR that is specific
to KLEE.
|
|
|
|
and introduce klee_open_compressed_output_file with similar behavior
along some other minor improvements
|
|
|
|
|
|
|
|
|
|
* use `using` instead of typdef
* use `collection.empty()` instead of size
* use `auto` if clear
* use `emplace_back` where useful
* use `nullptr` instead of NULL
* use `override` if applicable
* use `explicit` for constructor to avoid implicit conversion
|
|
Don't pollute the project include directory with optimization specific
headers.
|
|
Remove unneeded headers from include files
|
|
Conditions are checked inside of `optimizeExpr()`
anyway. This simplifies the code a lot.
|
|
|
|
simplifies code a lot.
|
|
avoid ambiguity of valueOnly parameter
|
|
|
|
|
|
|
|
|
|
to have only solver options.
|
|
Currently KLEE only handles the first segfault in external calls
as it doesn't unblock SIGSEGV afterwards. This patch unblocks the
signal and enables handling of multiple failing calls.
|
|
|
|
|
|
|
|
AddressSpace::checkPointerInObject() that is called in both the forward and the backward searches. This makes the code more modular and removes a large part of duplicated code and should also address the non-deterministic coverage in the resolve() function which affects Codecov reports.
|
|
|
|
change)
|
|
Starting with LLVM 4, we have getStructTypeOrNull(), so use it.
operator* in post-4 will have a different semantics.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
So handle the type specially whenever needed.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
LLVM 4 removes the old time interface and starts using the C++11's
chrono. So switch to that in klee for LLVM 4 too.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
LLVM 4 renamed and splitted some headers. Take this into account in
includes.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
|
|
Validate if the user-selected entry function exists. Do not assume it is
`main`.
|
|
|
|
Replace the remaining occurrences of `Inst::Create()` with
`llvm::Builder` to manage metadata automatically and to fold
instructions.
C++11 it and clang-format
|
|
|
|
|
|
* handle BlockAddress (which is not a valid function pointer)
* there is no instruction with opcode 0
* add test for functionality
|
|
With version 3.5, LLVM introduced a subtle semantic change in the API of
`Value`. With that change, `use_begin()` is renamed to `user_begin()`.
Additionally, a new method `use_begin()` with a different meaning was
introduced. Now, `use_begin()` actually iterates over `Use`s, whereas
before, dereferencing it would give a `User *`. For further details,
please refer to https://reviews.llvm.org/rL203364.
Due to the reintroduction of `use_begin()`, existing code may still
compile, although the semantics have changed. In the code changed with
this patch, all `dyn_cast`s for `Use` fail and the else branch is
always taken.
|
|
addresses comment made by @adrianherrera in #385
|
|
LLVM commit eac309550f25 removed implicit iterator conversions. So we
have to get the iterators explicitly now.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
After LLVM commit 25569fdcdab0, archive iterator returns
object::Archive::Child instead of child_iterator, adapt to that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
LLVM commit d912be98f8eb changed the prototype of linkModules to accept
std::unique_ptr. Adapt to that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|