compile_commands.json compiler path misreads \\ path separator

Aperta
#4,408 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 8 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
cmake, cpp, python
Ambito
build-system, cli

Direzione di ricerca

The bug is in how CodeChecker.exe analyze reads the compiler path from a CMake-generated compile_commands.json on Windows, where backslashes appear doubled. Reproduce with the command in the issue on a small compile_commands.json that has escaped backslashes, then find where the binary path is read and normalized. Done means the analyzer finds X:\x64-release\llvm19\bin\clang++.exe on Windows and the logged path matches it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good to go :rocket: platform-Windows 🖥
$ codechecker analyze ./compile_commands.json --enable sensitive --output ./codechecker
[ERROR 2024-12-13 09:29] - Binary X:x64-releasellvm19binclang++.exe not found
...

Correct path is X:\x64-release\llvm19\bin\clang++.exe. In compile_commands.json the path shows as X:\\x64-release\\llvm19\\bin\\clang++.exe. It is generated by CMake 3.30.3.

$ CodeChecker.exe version
[INFO 2024-12-13 09:39] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind                 | Version
---------------------------------------------------------------
Base package version | 6.24.4
Package build date   | 2024-10-28T15:46
Git commit ID (hash) | 454d978191ed42c8202a2244dc092dfb6fd8c83a
Git tag information  | 6.24.4
---------------------------------------------------------------

[INFO 2024-12-13 09:39] - CodeChecker web version:
------------------------------------------------------------------------------
Kind                                | Version
------------------------------------------------------------------------------
Base package version                | 6.24.4
Package build date                  | 2024-10-28T15:46
Git commit ID (hash)                | 454d978191ed42c8202a2244dc092dfb6fd8c83a
Git tag information                 | 6.24.4
Server supported Thrift API version | 6.58
Client Thrift API version           | 6.58
------------------------------------------------------------------------------
Lingua principale
Python
Stelle
2.6k
Fork
494
Merge medio
6g 13h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Ericsson/codechecker

Tutte le issue di Ericsson/codechecker

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.