From ea6e216751979131b269ed31873edbe7e8b752a3 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 22 May 2009 16:27:06 +0000 Subject: Add "name" argument to klee_make_symbolic, and kill off klee_make_symbolic_name. - 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 --- runtime/POSIX/fd_init.c | 16 ++++++++-------- runtime/POSIX/klee_init_env.c | 2 +- runtime/POSIX/misc.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'runtime/POSIX') diff --git a/runtime/POSIX/fd_init.c b/runtime/POSIX/fd_init.c index 61e49893..d976b0b4 100644 --- a/runtime/POSIX/fd_init.c +++ b/runtime/POSIX/fd_init.c @@ -56,9 +56,9 @@ static void __create_new_dfile(exe_disk_file_t *dfile, unsigned size, dfile->size = size; dfile->contents = malloc(dfile->size); - klee_make_symbolic_name(dfile->contents, dfile->size, name); + klee_make_symbolic(dfile->contents, dfile->size, name); - klee_make_symbolic_name(s, sizeof(*s), sname); + klee_make_symbolic(s, sizeof(*s), sname); /* For broken tests */ if (!klee_is_symbolic(s->st_ino) && @@ -96,7 +96,7 @@ static void __create_new_dfile(exe_disk_file_t *dfile, unsigned size, static unsigned __sym_uint32(const char *name) { unsigned x; - klee_make_symbolic_name(&x, sizeof x, name); + klee_make_symbolic(&x, sizeof x, name); return x; } @@ -139,11 +139,11 @@ void klee_init_fds(unsigned n_files, unsigned file_length, __exe_fs.ftruncate_fail = malloc(sizeof(*__exe_fs.ftruncate_fail)); __exe_fs.getcwd_fail = malloc(sizeof(*__exe_fs.getcwd_fail)); - klee_make_symbolic_name(__exe_fs.read_fail, sizeof(*__exe_fs.read_fail), "read_fail"); - klee_make_symbolic_name(__exe_fs.write_fail, sizeof(*__exe_fs.write_fail), "write_fail"); - klee_make_symbolic_name(__exe_fs.close_fail, sizeof(*__exe_fs.close_fail), "close_fail"); - klee_make_symbolic_name(__exe_fs.ftruncate_fail, sizeof(*__exe_fs.ftruncate_fail), "ftruncate_fail"); - klee_make_symbolic_name(__exe_fs.getcwd_fail, sizeof(*__exe_fs.getcwd_fail), "getcwd_fail"); + klee_make_symbolic(__exe_fs.read_fail, sizeof(*__exe_fs.read_fail), "read_fail"); + klee_make_symbolic(__exe_fs.write_fail, sizeof(*__exe_fs.write_fail), "write_fail"); + klee_make_symbolic(__exe_fs.close_fail, sizeof(*__exe_fs.close_fail), "close_fail"); + klee_make_symbolic(__exe_fs.ftruncate_fail, sizeof(*__exe_fs.ftruncate_fail), "ftruncate_fail"); + klee_make_symbolic(__exe_fs.getcwd_fail, sizeof(*__exe_fs.getcwd_fail), "getcwd_fail"); } /* setting symbolic stdout */ diff --git a/runtime/POSIX/klee_init_env.c b/runtime/POSIX/klee_init_env.c index 83e9fde6..f5609973 100644 --- a/runtime/POSIX/klee_init_env.c +++ b/runtime/POSIX/klee_init_env.c @@ -62,7 +62,7 @@ static char *__get_sym_str(int numChars, char *name) { int i; char *s = malloc(numChars+1); klee_mark_global(s); - klee_make_symbolic_name(s, numChars+1, name); + klee_make_symbolic(s, numChars+1, name); for (i=0; i