about summary refs log tree commit diff homepage
path: root/runtime
AgeCommit message (Collapse)Author
2016-11-07Implement a CMake based build system for KLEE.Dan Liew
This is based off intial work by @jirislaby in #481. However it has been substantially modified. Notably it includes a separate build sytem to build the runtimes which is inspired by the old build system. The reason for doing this is because CMake is not well suited for building the runtime: * CMake is configured to use the host compiler, not the bitcode compiler. These are not the same thing. * Building the runtime using `add_custom_command()` is flawed because we can't automatically get transitive depencies (i.e. header file dependencies) unless the CMake generator is makefiles. (See `IMPLICIT_DEPENDS` of `add_custom_command()` in CMake). So for now we have a very simple build system for building the runtimes. In the future we can replace this with something more sophisticated if we need it. Support for all features of the old build system are implemented apart from recording the git revision and showing it in the output of `klee --help`. Another notable change is the CMake build system works much better with LLVM installs which don't ship with testing tools. The build system will download the sources for `FileCheck` and `not` tools if the corresponding binaries aren't available and will build them. However `lit` (availabe via `pip install lit`) and GTest must already be installed. Apart from better support for testing a significant advantage of the new CMake build system compared to the existing "Autoconf/Makefile" build system is that it is **not** coupled to LLVM's build system (unlike the existing build system). This means that LLVM's autoconf/Makefiles don't need to be installed somewhere on the system. Currently all tests pass. Support has been implemented in TravisCI and the Dockerfile for building with CMake. The existing "Autoconf/Makefile" build system has been left intact and so both build systems can coexist for a short while. We should remove the old build system as soon as possible though because it creates an unnecessary maintance burden.
2016-08-19Added -save-all-writes to klee_init_env help messageAndrea Mattavelli
2016-05-31Merge pull request #405 from ccadar/timesCristian Cadar
Fixed the stub for times() not to dereference a NULL pointer when cal…
2016-05-27Improved help message for POSIX environment options.Cristian Cadar
2016-05-27Fixed the stub for times() not to dereference a NULL pointer when call with ↵Cristian Cadar
a NULL argument. In respose of issue https://github.com/klee/klee/issues/399
2016-05-24Split creation of symbolic files and stdin in two distinct optionsAndrea Mattavelli
2016-03-22Add soname for Runtest dynamic libraryMartin Nowack
Based on llvm-shlib/Makefile SHARED_VERSION reflects the API version of the library itself
2016-03-05Fix SELinux signatures in runtimeLaszlo Szekeres
The SELinux function signatures have changed between version 2.2 and 2.3. In particular, the type of the "security context" parameter was changed from char * to const char *, with the following patch: SELinuxProject/selinux@9eb9c9327563014ad6a807814e7975424642d5b9. Recent Linux distributions (e.g. Ubuntu 15.10) ship with the updated version of libselinux. This change makes the SELinux runtime compatible with the newer versions of the library by replacing security_context_t with its original char * definition and defining it as const only if the installed library does so. Whether the system uses const char * types is detected with the configure script. Fixes klee/klee#303.
2015-06-03Added an option --readable-posix-inputs which is used to turn on/off the CEX ↵Cristian Cadar
preferences added in the POSIX model. Removed option --prefer-cex which controlled all CEX preferences.
2015-04-25Change install location of KLEE's bytecode runtime librariesDan Liew
to ``${PREFIX}/lib/klee/runtime``. This addresses issue #233
2015-04-25Clean up the installation/building of the runtime libraries.Dan Liew
* We don't need to build the native versions so that is now disabled * We don't need to install (and hence build) the bytecode archive library versions of klee-libc or kleeRuntimeIntrinsic for new versions of LLVM right now (this is kind of messy).
2015-04-02Use C instead of C++ comments in C files to silence compiler warnings.Cristian Cadar
2015-04-01[runtime] Fix include in klee_intMartin Nowack
2015-04-01[runtime] Fix comments to c style for c files and headersMartin Nowack
2014-09-14Replace fprintf with klee_warnings for POSIX libMartin Nowack
2014-01-09Fixed race condition in parallel build where a symbolic linkDan Liew
(for klee-uclibc) would be created before the destination directory existed.
2013-12-21klee-uclibc detection is now a lot cleaner. KLEE now assumesDan Liew
it can find klee-uclibc inside the same folder as the other runtime libraries with the name "klee-uclibc.bca" This is implemented as follows: * When building, a sym-link is created to klee-uclibc's libc.a file in the same directory that the rest of KLEE's runtime libraries are built. This done so that if a developer changes klee-uclibc on their system then the correct version of klee-uclibc is used by KLEE. * When installing, klee-uclibc's libc.a file is installed in the same directory that the rest of KLEE's runtime libraries are installed. In addition the configure script argument --with-uclibc can now operate in two ways. It can either be passed the path to the root of klee-uclibc or it can be passed a path to the libc.a file built by klee-uclibc. This new behaviour has been added to allow users to potential use pre-built versions of klee-uclibc.
2013-11-15Merge branch 'master' of https://github.com/ccadar/kleeCristian Cadar
2013-11-15Removed testing-env file. As for testing-dir that was removed in aCristian Cadar
prior patch, this is part of the CU experiments and doesn't really belong here.
2013-11-14Remove unused testing-dirMartin Nowack
2013-11-14Fix lseek and getdentsMartin Nowack
Wrong data types and casts led to wrong values on 64 bit machines with high values filedescriptor positions. Fixes DirConsistency and DirSeek test case
2013-11-02Fix build of POSIX file descriptor functionsMartin Nowack
Build Large File System functions for 32bit and 64bit correctly
2013-10-29Merge pull request #26 from delcypher/fix_divide_by_zeroPaul
Fixed bug where divide by zero bugs would only be detected once in a program
2013-10-18stubs.c: cleanupFrank Busse
2013-10-18stubs.c: fix use of undeclared identifier PATH_MAXFrank Busse
2013-10-11Compile separate version of fd files for 3.2 as well.Cristian Cadar
2013-09-25Merge pull request #25 from paulmar/masterCristian Cadar
Added some of the common *at functions & others to the model. Obey --max-forks in switch statements.
2013-09-21Merge pull request #17 from MartinNowack/LLVM33Cristian Cadar
Make KLEE compile with LLVM 2.3.
2013-09-18Merge pull request #23 from MartinNowack/fix_putcharCristian Cadar
Fix implementation for putchar
2013-09-18Compile separate version of fd files only for LLVM 3.3 or higherMartin Nowack
2013-09-02Implemented runtime check for overshift (controllable with --check-overshiftDan Liew
command line argument). Overshift is where a Shl, AShr or LShr has a shift width greater than the bit width of the first operand. This is undefined behaviour in LLVM so we report this as an error.
2013-09-02Fixed multiple definitions of POSIX file functionsMartin Nowack
Function like stat() were defined for 32bit and 64bit version. Added compile time based selection of appropriate version using GNUC macros __x86_64__ and __ppc64__.
2013-08-29Added some of the common *at functions to the modelPaul Marinescu
2013-08-28Disable redefinition of functionsMartin Nowack
2013-08-27Fix implementation for putcharMartin Nowack
According to manual: putchar() return the character written as an unsigned char cast to an int or EOF on error. Use return value of write to return the correct value for putchar.
2013-08-27Port to LLVM 3.3Martin Nowack
Major changes are: - Switching to llvm-link to build archive files - Use GetMallocUsage instead of GetTotalMemoryUsage (be aware of bug in LLVM 3.3 http://llvm.org/bugs/show_bug.cgi?id=16847) - intrinsic library functions like memcpy/mov/set use weak linkage to be replaced by e.g. uclibc functions - rewrote linking with library - enhanced MemoryLimit test case to check if mallocs were successful
2013-07-23BFS searcher.Lei Zhang
2012-10-24Patch by Dan Liew: " Added "sys/resource.h" include to POSIX stubCristian Cadar
methods. This fixes build problems (at least on my machine glibc 2.16.0-2) The __priority_which_t and __rlimit_resource_t data types which functions set_priority(), setrlimit() and setrlimit64() need are not defined in any of the headers the runtime/POSIX/stubs.c includes. It appears in the past the "sys/resource.h" was included by "sys/wait.h" but in the recent version of glibc I am using it is not. So to fix this I've added the include." git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@166554 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-11Patch by Ben Gras fixing a few minor issues: adds missing includes,Cristian Cadar
fixes the ntohs prototype in klee-libc, and removes some unused code. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@146352 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-11This is a workaround for the infinite loop reported at Cristian Cadar
http://keeda.stanford.edu/pipermail/klee-dev/2011-August/000723.html KLEE needs to use --fno-builtin when compiling its version of memset. However, this patch also adds the workaround suggested by Paul in the thread above, since support for --fno-builtin was added to llvm-gcc only after LLVM 2.9 was released. More details about this issue can be found here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110411/119376.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110711/124131.html Thanks to Paul and arrowdodger for their explanations and patches. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@146350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-28Applied Stefan Bucur's patch fromCristian Cadar
http://llvm.org/bugs/show_bug.cgi?id=6690. The patch adds specialized versions of klee_get_value for different types, fixing the previous klee_get_value function that sometimes truncated 64bit parameters to 32bit. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@107006 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-02Compile klee-libc with -D__NO_INLINE__, to prevent glibc from using inlineDaniel Dunbar
definitions of putchar and atoi. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@102868 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01Fixes for building runtime on linux x86-64.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01A few type fixes for libc functions, for 64-bit.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01Rename intrinsic library to libkleeRuntimeInstrinsic, for consistency.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77797 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01Kill off klee_malloc_n, we don't want to support this.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72693 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Fix for platforms which #define putcharDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Make klee_init_env print some usage instructions with --help.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72338 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Changed bout to ktest. Kept "BOUT\n" as the header of test files, for ↵Cristian Cadar
backward compatibility. Also changed KLEE_RUNTEST to KTEST_FILE. Updated tutorial-1. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72312 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22Add "name" argument to klee_make_symbolic, and kill off klee_make_symbolic_name.Daniel Dunbar
- For compatibility we still accept 2 argument form of klee_make_symbolic, but this will go away eventually. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72265 91177308-0d34-0410-b5e6-96231b3b80d8