[PATCH] D17135: [Compiler-rt][MSan][MIPS] Resolve gethostbyname_r_erange for MIPS
Mohit Bhakkad via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 03:14:24 PST 2016
mohit.bhakkad created this revision.
mohit.bhakkad added reviewers: eugenis, kcc, samsonov.
mohit.bhakkad added subscribers: sagar, jaydeep, llvm-commits.
mohit.bhakkad set the repository for this revision to rL LLVM.
In case of MIPS, on failure gethostbyname_r sets the errno, but doesn't return it.
Tested this with x86, and should not affect any other arch too.
Repository:
rL LLVM
http://reviews.llvm.org/D17135
Files:
lib/msan/tests/msan_test.cc
Index: lib/msan/tests/msan_test.cc
===================================================================
--- lib/msan/tests/msan_test.cc
+++ lib/msan/tests/msan_test.cc
@@ -1117,8 +1117,8 @@
struct hostent he;
struct hostent *result;
int err;
- int res = gethostbyname_r("localhost", &he, buf, sizeof(buf), &result, &err);
- ASSERT_EQ(ERANGE, res);
+ gethostbyname_r("localhost", &he, buf, sizeof(buf), &result, &err);
+ ASSERT_EQ(ERANGE, errno);
EXPECT_NOT_POISONED(err);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17135.47619.patch
Type: text/x-patch
Size: 492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/b30477a3/attachment.bin>
More information about the llvm-commits
mailing list