Infinite hang with CodeChecker on clang without analyser #2670
Labels
analyzer 📈
Related to the analyze commands (analysis driver)
bug 🐛
usability 👍
Usability-related features
Describe the bug
If the
clang
binary used fromPATH
is built without Clang Static Analyzer, the fetching of checkers hangs infinitely.CodeChecker version
Irrelevant, but exists with 6.11.
To Reproduce
Steps to reproduce the behaviour:
cmake ... -DCLANG_ENABLE_STATIC_ANALYZER=OFF
Build/bin
intoPATH
checkers
,analyze
.Expected behaviour
Fetch that there are no ClangSA checkers in the list, but do not hang.
Desktop (please complete the following information)
Additional context
The issue is due to Clang dumping checker list by calling
clang++ -cc1 -analyzer-checker-help
. If there is a static analyzer, this dumps the checker list and early returns — but if there is no ClangSA built, the call is "equivalent" to callingclang++ -cc1
which will wait for preprocessed text on the standard input.In case the standard input is not the tty stdin, but a file, e.g. calling:
echo "" | clang -cc1 -analyzer-checker-help
The issue might need to be fixed within Clang, in addition, because it is bad behaviour there that it starts waiting for stdin...
The text was updated successfully, but these errors were encountered: