Re: r368354 - Mark clang-scan-deps test as requiring thread support
Thanks! On Mon, Aug 12, 2019 at 5:37 PM Alex L wrote: > Hi Reid, > > I have fixed this issue in r368640, clang-scan-deps will no longer spawn > threads if threading if disabled. > > Cheers, > Alex > > > On Thu, 8 Aug 2019 at 15:13, Alex L wrote: > >> Thanks for fixing this! >> >> 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. >> >> >> >> On Thu, 8 Aug 2019 at 15:07, Reid Kleckner wrote: >> >>> 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. >>> >>> 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. >>> >>> On Thu, Aug 8, 2019 at 2:45 PM Reid Kleckner via cfe-commits < >>> cfe-commits@lists.llvm.org> wrote: >>> Author: rnk Date: Thu Aug 8 14:45:59 2019 New Revision: 368354 URL: http://llvm.org/viewvc/llvm-project?rev=368354=rev Log: Mark clang-scan-deps test as requiring thread support Otherwise the test calls a pure virtual method and crashes. Perhaps this could be improved. Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=368354=368353=368354=diff == --- cfe/trunk/test/ClangScanDeps/regular_cdb.cpp (original) +++ cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Thu Aug 8 14:45:59 2019 @@ -1,3 +1,4 @@ +// REQUIRES: thread_support // RUN: rm -rf %t.dir // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >>> ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r368354 - Mark clang-scan-deps test as requiring thread support
Hi Reid, I have fixed this issue in r368640, clang-scan-deps will no longer spawn threads if threading if disabled. Cheers, Alex On Thu, 8 Aug 2019 at 15:13, Alex L wrote: > Thanks for fixing this! > > 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. > > > > On Thu, 8 Aug 2019 at 15:07, Reid Kleckner wrote: > >> 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. >> >> 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. >> >> On Thu, Aug 8, 2019 at 2:45 PM Reid Kleckner via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> Author: rnk >>> Date: Thu Aug 8 14:45:59 2019 >>> New Revision: 368354 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=368354=rev >>> Log: >>> Mark clang-scan-deps test as requiring thread support >>> >>> Otherwise the test calls a pure virtual method and crashes. Perhaps this >>> could be improved. >>> >>> Modified: >>> cfe/trunk/test/ClangScanDeps/regular_cdb.cpp >>> >>> Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=368354=368353=368354=diff >>> >>> == >>> --- cfe/trunk/test/ClangScanDeps/regular_cdb.cpp (original) >>> +++ cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Thu Aug 8 14:45:59 2019 >>> @@ -1,3 +1,4 @@ >>> +// REQUIRES: thread_support >>> // RUN: rm -rf %t.dir >>> // RUN: rm -rf %t.cdb >>> // RUN: mkdir -p %t.dir >>> >>> >>> ___ >>> cfe-commits mailing list >>> cfe-commits@lists.llvm.org >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >>> >> ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r368354 - Mark clang-scan-deps test as requiring thread support
Thanks for fixing this! 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. On Thu, 8 Aug 2019 at 15:07, Reid Kleckner wrote: > 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. > > 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. > > On Thu, Aug 8, 2019 at 2:45 PM Reid Kleckner via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rnk >> Date: Thu Aug 8 14:45:59 2019 >> New Revision: 368354 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=368354=rev >> Log: >> Mark clang-scan-deps test as requiring thread support >> >> Otherwise the test calls a pure virtual method and crashes. Perhaps this >> could be improved. >> >> Modified: >> cfe/trunk/test/ClangScanDeps/regular_cdb.cpp >> >> Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=368354=368353=368354=diff >> >> == >> --- cfe/trunk/test/ClangScanDeps/regular_cdb.cpp (original) >> +++ cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Thu Aug 8 14:45:59 2019 >> @@ -1,3 +1,4 @@ >> +// REQUIRES: thread_support >> // RUN: rm -rf %t.dir >> // RUN: rm -rf %t.cdb >> // RUN: mkdir -p %t.dir >> >> >> ___ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r368354 - Mark clang-scan-deps test as requiring thread support
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. 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. On Thu, Aug 8, 2019 at 2:45 PM Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Thu Aug 8 14:45:59 2019 > New Revision: 368354 > > URL: http://llvm.org/viewvc/llvm-project?rev=368354=rev > Log: > Mark clang-scan-deps test as requiring thread support > > Otherwise the test calls a pure virtual method and crashes. Perhaps this > could be improved. > > Modified: > cfe/trunk/test/ClangScanDeps/regular_cdb.cpp > > Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=368354=368353=368354=diff > > == > --- cfe/trunk/test/ClangScanDeps/regular_cdb.cpp (original) > +++ cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Thu Aug 8 14:45:59 2019 > @@ -1,3 +1,4 @@ > +// REQUIRES: thread_support > // RUN: rm -rf %t.dir > // RUN: rm -rf %t.cdb > // RUN: mkdir -p %t.dir > > > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r368354 - Mark clang-scan-deps test as requiring thread support
Author: rnk Date: Thu Aug 8 14:45:59 2019 New Revision: 368354 URL: http://llvm.org/viewvc/llvm-project?rev=368354=rev Log: Mark clang-scan-deps test as requiring thread support Otherwise the test calls a pure virtual method and crashes. Perhaps this could be improved. Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=368354=368353=368354=diff == --- cfe/trunk/test/ClangScanDeps/regular_cdb.cpp (original) +++ cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Thu Aug 8 14:45:59 2019 @@ -1,3 +1,4 @@ +// REQUIRES: thread_support // RUN: rm -rf %t.dir // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits