[PATCH] D58413: [sanitizers] Restore internal_readlink for x32
H.J Lu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 17:58:28 PST 2019
hjl.tools updated this revision to Diff 187481.
hjl.tools edited the summary of this revision.
hjl.tools added a reviewer: dvyukov.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58413/new/
https://reviews.llvm.org/D58413
Files:
lib/sanitizer_common/sanitizer_linux.cc
lib/sanitizer_common/tests/sanitizer_common_test.cc
Index: lib/sanitizer_common/tests/sanitizer_common_test.cc
===================================================================
--- lib/sanitizer_common/tests/sanitizer_common_test.cc
+++ lib/sanitizer_common/tests/sanitizer_common_test.cc
@@ -438,4 +438,9 @@
EXPECT_DEATH(address_range.Unmap(base_addr + (PageSize * 2), PageSize), ".*");
}
+TEST(SanitizerCommon, ReadBinaryNameCached) {
+ char buf[256];
+ EXPECT_NE((uptr)0, ReadBinaryNameCached(buf, sizeof(buf)));
+}
+
} // namespace __sanitizer
Index: lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_linux.cc
+++ 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: D58413.187481.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190220/9a9c2637/attachment.bin>
More information about the llvm-commits
mailing list