diff options
Diffstat (limited to 'runtime/POSIX/fd_init.c')
-rw-r--r-- | runtime/POSIX/fd_init.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/POSIX/fd_init.c b/runtime/POSIX/fd_init.c index adb1d9f6..b93148ec 100644 --- a/runtime/POSIX/fd_init.c +++ b/runtime/POSIX/fd_init.c @@ -96,14 +96,13 @@ static void __create_new_dfile(exe_disk_file_t *dfile, unsigned size, } /* n_files: number of symbolic input files, excluding stdin - file_length: size in bytes of each symbolic file, including stdin - sym_stdout_flag: 1 if stdout should be symbolic, 0 otherwise + file_length: size in bytes of each symbolic file, including stdin/stdout save_all_writes_flag: 1 if all writes are executed as expected, 0 if writes past the initial file size are discarded (file offset is always incremented) max_failures: maximum number of system call failures */ void klee_init_fds(unsigned n_files, unsigned file_length, - unsigned stdin_length, int sym_stdout_flag, + unsigned stdin_length, unsigned stdout_length, int save_all_writes_flag, unsigned max_failures) { unsigned k; char name[7] = "?_data"; @@ -150,11 +149,11 @@ void klee_init_fds(unsigned n_files, unsigned file_length, } /* setting symbolic stdout */ - if (sym_stdout_flag) { + if (stdout_length) { __exe_fs.sym_stdout = malloc(sizeof(*__exe_fs.sym_stdout)); if (!__exe_fs.sym_stdout) klee_report_error(__FILE__, __LINE__, "out of memory in klee_init_env", "user.err"); - __create_new_dfile(__exe_fs.sym_stdout, 1024, "stdout", &s); + __create_new_dfile(__exe_fs.sym_stdout, stdout_length, "stdout", &s); __exe_env.fds[1].dfile = __exe_fs.sym_stdout; __exe_fs.stdout_writes = 0; } |