diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2010-06-28 15:07:59 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2010-06-28 15:07:59 +0000 |
commit | e3414c0e8cc91a35cdcae09c0af8162b8f7c2f94 (patch) | |
tree | 112586608310b81d1179c003fd8a73734e2577c9 /runtime/POSIX | |
parent | ff0d675fc2861e34e1f0767af6b8b73e1a854889 (diff) | |
download | klee-e3414c0e8cc91a35cdcae09c0af8162b8f7c2f94.tar.gz |
Applied Stefan Bucur's patch from
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
Diffstat (limited to 'runtime/POSIX')
-rw-r--r-- | runtime/POSIX/fd.c | 6 | ||||
-rw-r--r-- | runtime/POSIX/klee_init_env.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/runtime/POSIX/fd.c b/runtime/POSIX/fd.c index d94604fa..b9a848d0 100644 --- a/runtime/POSIX/fd.c +++ b/runtime/POSIX/fd.c @@ -1251,13 +1251,13 @@ char *getcwd(char *buf, size_t size) { static void *__concretize_ptr(const void *p) { /* XXX 32-bit assumption */ - char *pc = (char*) klee_get_value((unsigned) (long) p); + char *pc = (char*) klee_get_valuel((long) p); klee_assume(pc == p); return pc; } static size_t __concretize_size(size_t s) { - size_t sc = klee_get_value(s); + size_t sc = klee_get_valuel((long)s); klee_assume(sc == s); return sc; } @@ -1276,7 +1276,7 @@ static const char *__concretize_string(const char *s) { *sc++ = '/'; } } else { - char cc = (char) klee_get_value(c); + char cc = (char) klee_get_valuel((long)c); klee_assume(cc == c); *sc++ = cc; if (!cc) break; diff --git a/runtime/POSIX/klee_init_env.c b/runtime/POSIX/klee_init_env.c index 5c1cc4fb..2a6b6f68 100644 --- a/runtime/POSIX/klee_init_env.c +++ b/runtime/POSIX/klee_init_env.c @@ -8,7 +8,9 @@ //===----------------------------------------------------------------------===// #include "klee/klee.h" +#ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE +#endif #include "fd.h" #include <stdlib.h> |