Age | Commit message (Collapse) | Author |
|
This change makes it possible to more reliably write unit tests which check
that an expression is equivalent to an expected pretty printed string.
|
|
(alphabetical) order.
|
|
|
|
|
|
that is the samw width of the "expr" expression.
It probably is the same width (it defintely is in SMT-LIB but I'm not
sure about STP) but it is probably better to be explicit.
|
|
|
|
overshifts to zero. Test case is included.
|
|
to zero. Test case is included.
|
|
overshifts to zero. Test case is included.
|
|
to zero. Test case is included.
|
|
zero. A test case was added for this.
In addition the use to vc_bvExtract() was removed for shifting left by an
expression because we don't want/need bitmasked behaviour anymore.
|
|
a bug in the previous commit where 32-bit width was assumed.
|
|
The other shift operators still need to be changed
|
|
of modules left because this information is no longer correct
(we no longer shrink the vector).
|
|
then clean up is performed.
|
|
because "RemovedSymbols" implies that the symbols have already been
removed which is misleading because we don't remove until the end.
|
|
|
|
Iterators get invalidated after elements of std::vector/set are
deleted. Avoid this by remembering which elements need to be
deleted and do it after iterating over the data structure.
|
|
KLEE intrinsics as undefined symbols
|
|
that clients can access HandlerInfo nicely.
|
|
bitcode archive linker.
|
|
LLVM >= 3.3 by effectively reimplementing the linking algorithm
used in LLVM <= 3.2.
The LLVM specific bitcode archive format has been removed
from LLVM >= 3.3 . Now archives are normal system archives that can
contain LLVM bitcode modules as well as regular binary object files.
The previous commit implemented an approach where ALL the bitcode
modules get linked in which can be terribly slow when klee-uclibc gets
linked (~600 LLVM modules).
Here are the options that I considered to address this:
* Use LD with LLVM gold plug-in and call as an external program.
I Don't really want to add another dependency to KLEE. It already
has enough!
* Use the upcomming LLVM linker (lld). Not really an option
because at the time of writing there is no support for linking
archives of bitcode modules.
* Don't use archives at all and just work with modules (i.e.
replace uses of llvm-ar with llvm-link and tinker with the
flags a little). This isn't so great because the resulting
LLVM bitcode module we execute is bigger than it should be.
* Reimpelent bitcode archive linking ourselves in a slightly
better way.
I've gone for the last option
This implementation unfortunately loads all bitcode modules into memory
first so we can query the module symbols tables. I would prefer to read
the archive's index and link in modules on demand but unfortunately
although the new Object::Archive interface in LLVM allows iteration over
symbols it doesn't provide a way of knowing if that symbol is
defined/undefined.
This implementation is far from perfect!
|
|
With LLVM 3.3 the linker does not support reading of
archive files directly. This brings the support back
(based on llvm-mn).
Furthermore, linking single bc files or archives with
bc and object files mixed is supported as well.
|
|
In case linking of external libraries failed, user would
only be informed if KLEE is compiled with assertions enabled.
This fix lets KLEE always fail.
|
|
Existence of main() function is checked with assertion.
This check fails if KLEE is compiled in Release mode.
|
|
Feature klee internal functions
|
|
|
|
emphasising that the function cannot be returned from early.
|
|
file as well.
|
|
is more helpful because often the next message is "Now ignoring error
at this location". Which is slightly confusing when no location
is shown.
|
|
is actually available.
In addition if doing a DEBUG build then the command line flag
-debug-only=klee_missing_debug
shows the instructions missing debug information
and
-debug-only=klee_obtained_debug
show the instructions with debug information.
|
|
debug information is attached directly to most instructions so
the simpler algorithm added in 5ecfd6e2fd5becc10be355b3a20d014e76e40518
can be used.
Since support for LLVM version < 2.9 has been removed the old algorithm
should be removed.
This has been tested with LLVM 2.9 and LLVM 3.3
|
|
* Just iterate over the instructions which use the function to be inlined
* Handle each callsite (e.g. CallInst and InvokeInst)
|
|
|
|
KLEE provides runtime library functions to do detection of bugs (e.g. overflow).
This runtime functions are not the location of the bugs but it is
the next non-runtime library function from the stack.
Use the caller inside that function to indicate where the bug is.
|
|
LLVM versions
With newer LLVM versions (starting with LLVM 2.7) debug information are directly associated
as meta data with each instruction.
Therefore, debug information can be acquired directly from each instruction.
|
|
|
|
|
|
|
|
Fixes memleak
|
|
|
|
Format of assembler address strings are different
with newer LLVM version (They don't have a prefix anymore).
This fix takes care of newer LLVM versions (>=3.3) as well.
|
|
Fixed bug where divide by zero bugs would only be detected once in a program
|
|
SUPPORT_METASMT ... #endif macros
|
|
not supported; a test case modified to not fail because of this.
|
|
|
|
|
|
Bugfix: Remove llvm.trap declaration after cleaning all uses.
|
|
|
|
Replace current implementation of linkWithLibrary()
|