about summary refs log tree commit diff homepage
path: root/tools/klee-replay
diff options
context:
space:
mode:
Diffstat (limited to 'tools/klee-replay')
-rw-r--r--tools/klee-replay/file-creator.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/klee-replay/file-creator.c b/tools/klee-replay/file-creator.c
index 497cf1c3..e103a39f 100644
--- a/tools/klee-replay/file-creator.c
+++ b/tools/klee-replay/file-creator.c
@@ -463,16 +463,31 @@ static void check_file(int index, exe_disk_file_t *dfile) {
   switch (index) {
   case __STDIN:
     strcpy(name, "stdin");
+#if defined(__has_feature)
+#if __has_feature(memory_sanitizer)
+    memset(&s, 0, sizeof(struct stat));
+#endif
+#endif
     res = fstat(0, &s);
     break;
   case __STDOUT:
     strcpy(name, "stdout");
+#if defined(__has_feature)
+#if __has_feature(memory_sanitizer)
+    memset(&s, 0, sizeof(struct stat));
+#endif
+#endif
     res = fstat(1, &s);
     break;
   default:
     name[0] = 'A' + index;
     name[1] = '\0';
     snprintf(fullname, sizeof(fullname), "%s/%s", replay_dir, name);
+#if defined(__has_feature)
+#if __has_feature(memory_sanitizer)
+    memset(&s, 0, sizeof(struct stat));
+#endif
+#endif
     res = stat(fullname, &s);
 
     break;