Skip to content

Fix Clang checker discovery hang without analyzer - #5183

Open
SamirRafiei wants to merge 1 commit into
Ericsson:masterfrom
SamirRafiei:fix-2670-clang-without-analyzer
Open

SamirRafiei wants to merge 1 commit into
Ericsson:masterfrom
SamirRafiei:fix-2670-clang-without-analyzer

Conversation

@SamirRafiei

Copy link
Copy Markdown

Fixes #2670

Clang checker discovery could hang indefinitely when Clang was built without Static Analyzer support because the subprocess inherited an open stdin.

This change redirects stdin to DEVNULL for Clang informational commands, so the process receives EOF immediately instead of waiting for input.

A regression test was added to reproduce the hang before the fix and verify that checker discovery returns without blocking afterward.

Validation:

  • New regression test passes
  • Existing ClangSA checker-handling tests pass
  • git diff --check passes
  • pycodestyle passes

@SamirRafiei
SamirRafiei requested a review from bruntib as a code owner November 8, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite hang with CodeChecker on clang without analyser

1 participant