Skip to content

Commit abc0cf9

Browse files
vitalybukatstellar
authored andcommitted
[sanitizer] Intercept lstat on Linux
It's availible from GLIBC 2.33 Fixes use-of-uninitialized-value llvm/lib/Support/Unix/Path.inc:467:29 in llvm::sys::fs::remove(llvm::Twine const&, bool) (cherry picked from commit 39ead64)
1 parent b40f07b commit abc0cf9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,9 @@
461461
#define SANITIZER_INTERCEPT_STAT \
462462
(SI_FREEBSD || SI_MAC || SI_ANDROID || SI_NETBSD || SI_SOLARIS || \
463463
SI_STAT_LINUX)
464-
#define SANITIZER_INTERCEPT_LSTAT (SI_NETBSD || SI_FREEBSD)
465-
#define SANITIZER_INTERCEPT___XSTAT \
466-
(!SANITIZER_INTERCEPT_STAT && SI_POSIX) || SI_STAT_LINUX
464+
#define SANITIZER_INTERCEPT_LSTAT (SI_NETBSD || SI_FREEBSD || SI_STAT_LINUX)
465+
#define SANITIZER_INTERCEPT___XSTAT \
466+
((!SANITIZER_INTERCEPT_STAT && SI_POSIX) || SI_STAT_LINUX)
467467
#define SANITIZER_INTERCEPT___XSTAT64 SI_LINUX_NOT_ANDROID
468468
#define SANITIZER_INTERCEPT___LXSTAT SANITIZER_INTERCEPT___XSTAT
469469
#define SANITIZER_INTERCEPT___LXSTAT64 SI_LINUX_NOT_ANDROID

0 commit comments

Comments
 (0)