diff options
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_linux.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc | 8 | 
2 files changed, 9 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index 3ca48ae7076..8b981fb025f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -400,7 +400,7 @@ uptr internal_readlink(const char *path, char *buf, uptr bufsize) {    return internal_syscall(SYSCALL(readlinkat), AT_FDCWD, (uptr)path, (uptr)buf,                            bufsize);  #else -  return internal_syscall(SYSCALL(readlink), path, buf, bufsize); +  return internal_syscall(SYSCALL(readlink), (uptr)path, (uptr)buf, bufsize);  #endif  } diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc index b7454fac87c..2350de943b3 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc @@ -438,4 +438,12 @@ TEST(SanitizerCommon, ReservedAddressRangeUnmap) {    EXPECT_DEATH(address_range.Unmap(base_addr + (PageSize * 2), PageSize), ".*");  } +// Windows has no working ReadBinaryName. +#if !SANITIZER_WINDOWS +TEST(SanitizerCommon, ReadBinaryNameCached) { +  char buf[256]; +  EXPECT_NE((uptr)0, ReadBinaryNameCached(buf, sizeof(buf))); +} +#endif +  }  // namespace __sanitizer  | 

