diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2023-02-23 21:51:45 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-03-17 22:38:16 +0000 |
commit | dd492f8763f13312c17eb67af33e3e90217a30e1 (patch) | |
tree | d1d1bf7ffdf3f890a5d5c3c5b6b7214bf60da845 /tools/ktest-randgen | |
parent | 71dc423262a91c012d708afc8b2e3cc3abdf49c3 (diff) | |
download | klee-dd492f8763f13312c17eb67af33e3e90217a30e1.tar.gz |
[MemSan] Mark memory objects modified by syscalls as initialised
Diffstat (limited to 'tools/ktest-randgen')
-rw-r--r-- | tools/ktest-randgen/ktest-randgen.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/ktest-randgen/ktest-randgen.cpp b/tools/ktest-randgen/ktest-randgen.cpp index 04cf53e6..9b7260eb 100644 --- a/tools/ktest-randgen/ktest-randgen.cpp +++ b/tools/ktest-randgen/ktest-randgen.cpp @@ -117,6 +117,11 @@ void create_stat(size_t size, struct stat *s) { free(filename); error_exit("%s:%d: Error writing %s\n", __FILE__, __LINE__, filename); } +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) + memset(s, 0, sizeof(struct stat)); +#endif +#endif fstat(fd, s); |