<div dir="ltr">Thanks!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 12, 2019 at 5:37 PM Alex L <<a href="mailto:arphaman@gmail.com">arphaman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Reid,<div><br></div><div>I have fixed this issue in r368640, clang-scan-deps will no longer spawn threads if threading if disabled.</div><div><br></div><div>Cheers,</div><div>Alex</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 8 Aug 2019 at 15:13, Alex L <<a href="mailto:arphaman@gmail.com" target="_blank">arphaman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Thanks for fixing this!<div><br></div><div>I think changing clang-scan-deps to ignore -j when `LLVM_ENABLE_THREADS` is probably a better solution. I'll work on a patch that does that.</div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 8 Aug 2019 at 15:07, Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The specific issue here is that clang-scan-deps uses threads, which seems to work just fine. But, it calls some code that sets up PrettyStackTrace RAII objects, which normally use TLS. And when LLVM_ENABLE_THREADS is off, LLVM_THREAD_LOCAL expands to nothing, so the TLS variables are simply global, and the RAII objects assert that things haven't been constructed and destructed in the correct order.<div><br></div><div>So, going forward you will probably need to remember to add REQUIRES: thread_support to individual tests, or change clang-scan-deps to ignore the -j parameter when threads have been disabled.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 8, 2019 at 2:45 PM Reid Kleckner via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: rnk<br>
Date: Thu Aug 8 14:45:59 2019<br>
New Revision: 368354<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=368354&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=368354&view=rev</a><br>
Log:<br>
Mark clang-scan-deps test as requiring thread support<br>
<br>
Otherwise the test calls a pure virtual method and crashes. Perhaps this<br>
could be improved.<br>
<br>
Modified:<br>
cfe/trunk/test/ClangScanDeps/regular_cdb.cpp<br>
<br>
Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=368354&r1=368353&r2=368354&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=368354&r1=368353&r2=368354&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/ClangScanDeps/regular_cdb.cpp (original)<br>
+++ cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Thu Aug 8 14:45:59 2019<br>
@@ -1,3 +1,4 @@<br>
+// REQUIRES: thread_support<br>
// RUN: rm -rf %t.dir<br>
// RUN: rm -rf %t.cdb<br>
// RUN: mkdir -p %t.dir<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>