forked from OSchip/llvm-project
Revert "Revert "[sanitizers] Restore internal_readlink for x32""
This reverts revision 354601 and disables ReadBinaryNameCached check on Windows since Windows has no working ReadBinaryName. Differential Revision: https://reviews.llvm.org/D58788 llvm-svn: 355129
This commit is contained in:
parent
b79f1f2e2a
commit
fadb22f4e2
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue