diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2014-09-15 10:43:36 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2014-09-15 10:43:36 +0100 |
commit | aa000e933bda48ac67901b2a729dda7d5f9ca215 (patch) | |
tree | 84c8cf3e2519ea732aefe6ef1e0d774caae50c7d /runtime/POSIX/fd.c | |
parent | 543bb5d7fef5d039d3a6f2a65a0a16a76068f864 (diff) | |
parent | a04f2277f90dc2aac3a3277c9dd7c6d3378059e4 (diff) | |
download | klee-aa000e933bda48ac67901b2a729dda7d5f9ca215.tar.gz |
Merge pull request #157 from MartinNowack/fix_posix_printout
Fix a possible deadlock.
Diffstat (limited to 'runtime/POSIX/fd.c')
-rw-r--r-- | runtime/POSIX/fd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/POSIX/fd.c b/runtime/POSIX/fd.c index 1c75cd76..24b248e3 100644 --- a/runtime/POSIX/fd.c +++ b/runtime/POSIX/fd.c @@ -157,7 +157,7 @@ int __fd_open(const char *pathname, int flags, mode_t mode) { if ((flags & O_TRUNC) && (flags & O_RDONLY)) { /* The result of using O_TRUNC with O_RDONLY is undefined, so we return error */ - fprintf(stderr, "Undefined call to open(): O_TRUNC | O_RDONLY\n"); + klee_warning("Undefined call to open(): O_TRUNC | O_RDONLY\n"); errno = EACCES; return -1; } @@ -165,7 +165,7 @@ int __fd_open(const char *pathname, int flags, mode_t mode) { if ((flags & O_EXCL) && !(flags & O_CREAT)) { /* The result of using O_EXCL without O_CREAT is undefined, so we return error */ - fprintf(stderr, "Undefined call to open(): O_EXCL w/o O_RDONLY\n"); + klee_warning("Undefined call to open(): O_EXCL w/o O_RDONLY\n"); errno = EACCES; return -1; } @@ -461,7 +461,7 @@ ssize_t write(int fd, const void *buf, size_t count) { memcpy(f->dfile->contents + f->off, buf, actual_count); if (count != actual_count) - fprintf(stderr, "WARNING: write() ignores bytes.\n"); + klee_warning("write() ignores bytes.\n"); if (f->dfile == __exe_fs.sym_stdout) __exe_fs.stdout_writes += actual_count; |