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 } 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,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