From 3a98f4dca7ada4c50ebca646f2cdd7385cd778af Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 25 Sep 2020 01:28:23 -0700 Subject: [PATCH] [msan] Fix gethostent tests gethostent should follow sethostent. --- compiler-rt/lib/msan/tests/msan_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/msan/tests/msan_test.cpp b/compiler-rt/lib/msan/tests/msan_test.cpp index 6306b3d..318a355 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; -- 2.7.4