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 /tools/klee-replay | |
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 'tools/klee-replay')
-rw-r--r-- | tools/klee-replay/klee-replay.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/klee-replay/klee-replay.c b/tools/klee-replay/klee-replay.c index 1cbbf6d8..7c605a53 100644 --- a/tools/klee-replay/klee-replay.c +++ b/tools/klee-replay/klee-replay.c @@ -15,6 +15,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdint.h> #include <errno.h> #include <time.h> @@ -327,22 +328,22 @@ void klee_warning_once(char *name) { fprintf(stderr, "WARNING: %s\n", name); } -int klee_assume(int x) { +unsigned klee_assume(uintptr_t x) { if (!x) { fprintf(stderr, "WARNING: klee_assume(0)!\n"); } return 0; } -int klee_is_symbolic(int x) { +unsigned klee_is_symbolic(uintptr_t x) { return 0; } -void klee_prefer_cex(void *buffer, unsigned condition) { +void klee_prefer_cex(void *buffer, uintptr_t condition) { ; } -void klee_make_symbolic(void *addr, unsigned nbytes, const char *name) { +void klee_make_symbolic(void *addr, size_t nbytes, const char *name) { /* XXX remove model version code once new tests gen'd */ if (obj_index >= input->numObjects) { if (strcmp("model_version", name) == 0) { @@ -361,7 +362,7 @@ void klee_make_symbolic(void *addr, unsigned nbytes, const char *name) { } else { if (boo->numBytes != nbytes) { fprintf(stderr, "make_symbolic mismatch, different sizes: " - "%d in input file, %d in code\n", boo->numBytes, nbytes); + "%d in input file, %ld in code\n", boo->numBytes, nbytes); exit(1); } else { memcpy(addr, boo->bytes, nbytes); |