<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 14, 2016 at 9:11 PM, Zia Ansari via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: zansari<br>
Date: Sun Feb 14 23:11:51 2016<br>
New Revision: 260876<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260876&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=260876&view=rev</a><br>
Log:<br>
Fixed non-NULL terminating array bug in SanitizerCommon.StartSubprocessTest that caused them to fail sometimes and act flaky.<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D17228" rel="noreferrer" target="_blank">http://reviews.llvm.org/D17228</a><br>
<br>
<br>
Modified:<br>
    compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc<br>
<br>
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc<br>
URL: <a href="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" rel="noreferrer" target="_blank">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</a><br>
==============================================================================<br>
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc (original)<br>
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc Sun Feb 14 23:11:51 2016<br>
@@ -271,7 +271,7 @@ TEST(SanitizerCommon, StartSubprocessTes<br>
 #else<br>
   const char *shell = "/bin/sh";<br>
 #endif<br>
-  const char *argv[] = {shell, "-c", "echo -n 'hello'"};<br>
+  const char *argv[] = {shell, "-c", "echo -n 'hello'", (char *)NULL};<br></blockquote><div><br></div><div>Is the cast required here and/or could you use nullptr?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   int pid = StartSubprocess(shell, argv,<br>
                             /* stdin */ kInvalidFd, /* stdout */ pipe_fds[1]);<br>
   ASSERT_GT(pid, 0);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>