diff options
-rw-r--r-- | dir.c | 2 | ||||
-rw-r--r-- | fsade.c | 10 | ||||
-rw-r--r-- | stat.c | 2 |
3 files changed, 10 insertions, 4 deletions
@@ -229,8 +229,8 @@ int bfs_readdir(struct bfs_dir *dir, struct bfs_dirent *de) { char *buf = (char *)(dir + 1); if (dir->pos >= dir->size) { - // Make sure msan knows the buffer is initialized #if BFS_HAS_FEATURE(memory_sanitizer, false) + // Make sure msan knows the buffer is initialized memset(buf, 0, BUF_SIZE); #endif @@ -171,6 +171,12 @@ static int bfs_check_acl_type(acl_t acl, acl_type_t type) { #if __FreeBSD__ int trivial; + +#if BFS_HAS_FEATURE(memory_sanitizer, false) + // msan seems to be missing an interceptor for acl_is_trivial_np() + trivial = 0; +#endif + if (acl_is_trivial_np(acl, &trivial) < 0) { return -1; } else if (trivial) { @@ -178,9 +184,9 @@ static int bfs_check_acl_type(acl_t acl, acl_type_t type) { } else { return 1; } -#endif - +#else // !__FreeBSD__ return bfs_check_posix1e_acl(acl, true); +#endif } int bfs_check_acl(const struct BFTW *ftwbuf) { @@ -172,9 +172,9 @@ static int bfs_stat_impl(int at_fd, const char *at_path, int at_flags, enum bfs_ * Wrapper for the statx() system call, which had no glibc wrapper prior to 2.28. */ static int bfs_statx(int at_fd, const char *at_path, int at_flags, unsigned int mask, struct statx *buf) { +#if BFS_HAS_FEATURE(memory_sanitizer, false) // -fsanitize=memory doesn't know about statx(), so tell it the memory // got initialized -#if BFS_HAS_FEATURE(memory_sanitizer, false) memset(buf, 0, sizeof(*buf)); #endif |