[compiler-rt] 3a98f4d - [msan] Fix gethostent tests
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 02:40:01 PDT 2020
Author: Vitaly Buka
Date: 2020-09-25T02:34:49-07:00
New Revision: 3a98f4dca7ada4c50ebca646f2cdd7385cd778af
URL: https://github.com/llvm/llvm-project/commit/3a98f4dca7ada4c50ebca646f2cdd7385cd778af
DIFF: https://github.com/llvm/llvm-project/commit/3a98f4dca7ada4c50ebca646f2cdd7385cd778af.diff
LOG: [msan] Fix gethostent tests
gethostent should follow sethostent.
Added:
Modified:
compiler-rt/lib/msan/tests/msan_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/msan/tests/msan_test.cpp b/compiler-rt/lib/msan/tests/msan_test.cpp
index 6306b3dbfb82..318a355312a5 100644
--- a/compiler-rt/lib/msan/tests/msan_test.cpp
+++ b/compiler-rt/lib/msan/tests/msan_test.cpp
@@ -1114,6 +1114,7 @@ TEST_P(MemorySanitizerIpTest, recvmsg) {
} while (0)
TEST(MemorySanitizer, gethostent) {
+ sethostent(0);
struct hostent *he = gethostent();
ASSERT_NE((void *)NULL, he);
EXPECT_HOSTENT_NOT_POISONED(he);
@@ -1177,6 +1178,7 @@ TEST(MemorySanitizer, gethostbyaddr) {
#if !defined(__NetBSD__)
TEST(MemorySanitizer, gethostent_r) {
+ sethostent(0);
char buf[2000];
struct hostent he;
struct hostent *result;
More information about the llvm-commits
mailing list