[PATCH] D48213: [DFSAN] fix gethostname test failure for short hostnames
Peter Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 15 03:36:15 PDT 2018
Lekensteyn created this revision.
Lekensteyn added a project: Sanitizers.
Herald added subscribers: Sanitizers, llvm-commits.
One or two character hostnames should not fail the gethostname test.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D48213
Files:
test/dfsan/custom.cc
Index: test/dfsan/custom.cc
===================================================================
--- test/dfsan/custom.cc
+++ test/dfsan/custom.cc
@@ -424,9 +424,9 @@
void test_gethostname() {
char buf[1024];
- dfsan_set_label(i_label, buf + 2, 2);
+ dfsan_set_label(i_label, buf + 1, 1);
assert(gethostname(buf, sizeof(buf)) == 0);
- ASSERT_READ_ZERO_LABEL(buf + 2, 2);
+ ASSERT_READ_ZERO_LABEL(buf + 1, 1);
}
void test_getrlimit() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48213.151483.patch
Type: text/x-patch
Size: 451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180615/19d3686b/attachment.bin>
More information about the llvm-commits
mailing list