[PATCH] D58788: Revert "Revert "[sanitizers] Restore internal_readlink for x32""
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 28 11:33:24 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL355129: Revert "Revert "[sanitizers] Restore internal_readlink for x32"" (authored by hjl, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D58788?vs=188751&id=188767#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58788/new/
https://reviews.llvm.org/D58788
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
Index: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_common_test.cc
@@ -438,4 +438,12 @@
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
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
@@ -400,7 +400,7 @@
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
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58788.188767.patch
Type: text/x-patch
Size: 1199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190228/f9577e51/attachment.bin>
More information about the llvm-commits
mailing list