about summary refs log tree commit diff homepage
path: root/tools
AgeCommit message (Collapse)Author
2019-03-05ktest-tool: add --extract optionFrank Busse
2019-03-05Renamed "Starting options" to "Startup options" and added a missing space in ↵Cristian Cadar
a help message.
2018-12-19ktest-tool: move from optparse to argparse, add ouput/example sections to helpFrank Busse
2018-12-19Various fixes for ktest-toolFrank Busse
* switch to Python 3 * add file encoding * some PEP8 reformatting * fix TOCTOU for open * replace trimZeros() with rstrip * remove unused pos/args variables * remove --write-ints (print by default) * remove progname section (unused) * added/modified output rows - "data:" now shows the Python representation (for use in scripts) - "hex :" shows the hex representation - "text:" shows ASCII, all out-of-range/non-printable characters are replaced by a dot - "int :"/"uint:" print (unsigned) 8/16/32/64 bit integers * reduce width for object counter to needed minimum instead of 4 * refactor printing into function
2018-12-19Added default values to option commentsMartinNowack
Co-Authored-By: ccadar <c.cadar@imperial.ac.uk>
2018-12-19Renamed --environ to --env-fileCristian Cadar
2018-12-19Renamed --stop-after-n-tests to --max-testsCristian Cadar
2018-12-19Added a replaying option categoryCristian Cadar
2018-12-19Added checks option category, moved --optimize to starting category, renamed ↵Cristian Cadar
original --run-in option to --running-dir
2018-12-19Added linking option categoryCristian Cadar
2018-12-19Added starting option categoryCristian Cadar
2018-12-19Added test case option categoryCristian Cadar
2018-11-23Implemented memalign with alignmentLukas Wölfer
2018-10-30Base time API upon std::chronoFrank Busse
This should not change the behaviour of KLEE and mimics the old API. - functions moved from util into time namespace - uses time points and time spans instead of double - CLI arguments now have the form "3h5min8us" Changed command line parameters: - batch-time (double to string) - istats-write-interval (double to string) - max-instruction-time (double to string) - max-solver-time (double to string) - max-time (double to string) - min-query-time-to-log (double to string) - seed-time (double to string) - stats-write-interval (double to string) - uncovered-update-interval (double to string) - added: log-timed-out-queries (replaces negative max-solver-time)
2018-10-26Added gen-bout tool to generate ktest file (file.bout) using specified ↵Andrew Santosa
concrete arguments and files. * Sample use cases: * Using an interesting input as a seed, such as a crashing input. * Analyzing the path condition of a crashing input. * Also added the test: test/Runtime/POSIX/GenBout.c
2018-10-26llvm5: avoid ++ on function->arg_begin()Jiri Slaby
Starting with llvm 5, arguments of a function are not an iterator, but an array. So they cannot be incremented in-place. Add a local auto variable and increment that. Otherwise we see: ../tools/klee/main.cpp:661:23: error: expression is not assignable Value *oldArgv = &*(++mainFn->arg_begin()); ^ ~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-10-23refactor klee_open_output_file to return std::unique_ptrJulian Büning
and introduce klee_open_compressed_output_file with similar behavior along some other minor improvements
2018-10-16Renamed klee/CommandLine.h to klee/SolverCmdLine.h, since this file is meant ↵Cristian Cadar
to have only solver options.
2018-10-08cleanup headers, whitespaces, and typesFrank Busse
2018-10-08add support for klee-replay on OSXFrank Busse
* also adds klee-replay as dependency for systemtests
2018-09-18llvm4: handle different header namesJiri Slaby
LLVM 4 renamed and splitted some headers. Take this into account in includes. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-14llvm: make KLEE compile against LLVM 3.9Jiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-10Unify the error message if that function has not been found.Martin Nowack
2018-09-10POSIX: Add invocation of klee_init_env into wrapper before calling mainMartin Nowack
To enable the POSIX support, the former implementation instrumented the main function and inserted a call to `klee_init_env` at the beginning. This has multiple disadvantages: * debugging information was not correctly propagated leaving the call to `klee_init_env` without debug information * the main function always required `int arg, char**` as part of the function definition of `main` Based on the new linking infrastructure, we can now add an additional wrapper `__klee_posix_wraper(int, char**)` that gets always called when POSIX support is enabled. It executes `klee_init_env` and after that calls the `main` function. Enabling POSIX support only requires the renaming of the user provided `main` into `__klee_posix_wrapped_main` in addition to linking.
2018-08-29klee-stats: add TResolve(%) to --print-allFrank Busse
2018-08-03Replace remaining *Inst::Create() calls with llvm::BuilderMartin Nowack
Replace the remaining occurrences of `Inst::Create()` with `llvm::Builder` to manage metadata automatically and to fold instructions. C++11 it and clang-format
2018-07-12llvm38: SmallString is always up-to-dateJiri Slaby
No need to flush it, see llvm-mirror/llvm@d4177b2 Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-07-04Reorder linking and optimizationsMartin Nowack
Link intrinsic library before executing optimizations. This makes sure that any optimization run by KLEE on the module is executed for the intrinsic library as well. Support .ll files as input for KLEE as well.
2018-06-29fix out of range access in KleeHandler::getKTestFilesInDirFrank Busse
2018-05-24llvm: make KLEE compile against LLVM 3.7Richard Trembecký
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-05-08remove unused file: tools/klee/Debug.cppDaniel Schemmel
2018-05-05Fix handling of errno if external functions are invokedMartin Nowack
If an external function in KLEE is invoked, it might update errno. Previously, the errno specific variable in a state was only updated if it was part of the executed instructions. That opened up a timeframe that increased the likelihood of errno being overwritten by another method call. This patch fixes two issues: * the errno of the KLEE process state is updated before the external function call allowing to detect changes to it later on * after the external call, the memory object of errno is directly updated with its new value, reducing the likelihood to be overwritten by another call Additional features: * Add support for `errno()` for Darwin as well. * Simplified errno handling in POSIX layer
2018-04-28exitOnError no output buf fixZekun Shen
2018-03-01Store CexCache stats and then update klee-stats to use themDomenico Fabio Marino
Signed-off-by: Domenico Fabio Marino <nospamdomi@hotmail.it>
2017-11-30Implemented bounded merging functionalityLukas Wölfer
2017-10-04Remove Autoconf/Makefile build system and adjust the TravisCIDan Liew
configuration, TravisCI scripts and Dockerfile build appropriately. There are a bunch of clean ups this enables but this commit doesn't attempt them. We can do that in future commits.
2017-08-27Remove unnecessary null pointer checksOscar Deits
Fixes klee/klee#717 delete on null pointer is always safe.
2017-08-04Removed merging searchersLukas Wölfer
2017-08-01Fixed test case counter: Previously the number of test cases generated by ↵Andrea Mattavelli
KLEE was always incremented, even if a symbolic solution was not found.
2017-07-26This reverts incorrect patch ↵Cristian Cadar
https://github.com/klee/klee/commit/db29a0bba74b672cdf4b8fef4d94ffa6ab845e6d __fprintf_chk has a different prototype than fprintf
2017-07-23Remove support for LLVM < 3.4Martin Nowack
Request LLVM 3.4 as minimal requirement for KLEE
2017-07-18Merge pull request #672 from jirislaby/llvm40_static_castsAndrea Mattavelli
llvm: get rid of static_casts from iterators
2017-06-16move module loading into external functionJörg Thalheim
- having an explicit function which is defined for multiple llvm versions separately increases readability. - also: error handling was simplified - Personal motivation: being able to use this functionality in unit tests fixes #561 related to #656
2017-06-15llvm: get rid of static_casts from iteratorsJiri Slaby
In commit b7a6aec4eeb4 (convert iterators using static_cast), I switched all implicit casts to static_cast. It turned out that llvm 4.0 banned casting via static_cast. See e.g. 1e2bc42eb988 in the llvm repo what they do. So similarly to the above commit, change all the casts of iterators to "&*" which is what they do in LLVM. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-12llvm: don't use clEnumValEnd for LLVM 4.0Jiri Slaby
It became unnecessary when defining options and mainly undefined. So introduce KLEE_LLVM_CL_VAL_END as suggested by @delcypher. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-07llvm: rename ExitOnError to OptExitOnErrorJiri Slaby
ExitOnError collides with llvm::ExitOnError from LLVM 4: tools/klee/main.cpp:430:23: error: reference to 'ExitOnError' is ambiguous if (errorMessage && ExitOnError) { ^ /usr/include/llvm/Support/Error.h:938:7: note: candidate found by name lookup is 'llvm::ExitOnError' class ExitOnError { ^ klee/tools/klee/main.cpp:141:3: note: candidate found by name lookup is '(anonymous namespace)::ExitOnError' ExitOnError("exit-on-error", ^ 1 error generated. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-01Refactor file opening code out of `main.cpp` and intoDan Liew
`klee_open_output_file()` function so that it can be used by the Z3Solver.
2017-05-24llvm: make KLEE compile against LLVM 3.5 and 3.6Richard Trembecký
Based on work by @ccadeptic23 and @delcypher. Formatting fixed by @snf. Fix compiler warning by @martijnthe. Further fixes by @mchalupa. Refactored, so that changes can be reviewed -- no massive changes in whitespace and in the surrounding code. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-03-23Replace `llvm:errs()` with `klee_error()` as suggested by @andreamattavelliDan Liew
2017-03-23[WIP] Fix bug where stats would not be updated on early exit caused byDan Liew
finding a bug with the `-exit-on-error` option enabled.