[compiler-rt] r260876 - Fixed non-NULL terminating array bug in SanitizerCommon.StartSubprocessTest that caused them to fail sometimes and act flaky.

Zia Ansari via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 14 21:11:51 PST 2016


Author: zansari
Date: Sun Feb 14 23:11:51 2016
New Revision: 260876

URL: http://llvm.org/viewvc/llvm-project?rev=260876&view=rev
Log:
Fixed non-NULL terminating array bug in SanitizerCommon.StartSubprocessTest that caused them to fail sometimes and act flaky.

Differential Revision: http://reviews.llvm.org/D17228


Modified:
    compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc?rev=260876&r1=260875&r2=260876&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc Sun Feb 14 23:11:51 2016
@@ -271,7 +271,7 @@ TEST(SanitizerCommon, StartSubprocessTes
 #else
   const char *shell = "/bin/sh";
 #endif
-  const char *argv[] = {shell, "-c", "echo -n 'hello'"};
+  const char *argv[] = {shell, "-c", "echo -n 'hello'", (char *)NULL};
   int pid = StartSubprocess(shell, argv,
                             /* stdin */ kInvalidFd, /* stdout */ pipe_fds[1]);
   ASSERT_GT(pid, 0);




More information about the llvm-commits mailing list