You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There's a compatibility bug between ninja builder output and CodeCheckers, which leads to CodeCheckers crash.
CodeChecker version
[INFO 2024-08-22 13:05] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind | Version
---------------------------------------------------------------
Base package version | 6.23.1
Package build date | 2023-12-14T14:38
Git commit ID (hash) | 2a8fa6e711a4ff591280a79fe8798dee2507d984
Git tag information | 6.23.1
---------------------------------------------------------------
[INFO 2024-08-22 13:05] - CodeChecker web version:
------------------------------------------------------------------------------
Kind | Version
------------------------------------------------------------------------------
Base package version | 6.23.1
Package build date | 2023-12-14T14:38
Git commit ID (hash) | 2a8fa6e711a4ff591280a79fe8798dee2507d984
Git tag information | 6.23.1
Server supported Thrift API version | 6.54
Client Thrift API version | 6.54
------------------------------------------------------------------------------
To Reproduce
Steps to reproduce the behaviour:
Unpack source code. Reproduced with https://github.com/mysql/mysql-server/archive/refs/tags/mysql-cluster-8.0.39.tar.gz -o mysql.tgz
Run command 'cmake -GNinja path/to/cmake/file' to generate ninja build file.
Run ninja to generate compilation database. ninja -t compdb > ./compile_commands.json
Run CodeChecker analyze ./compile_commands.json -o ./result_tidy .... See the error. Interestingly, generating via cmake for this project works correctly.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/codechecker_common/cli.py", line 209, in main
sys.exit(args.func(args))
File "/usr/local/lib/python3.10/dist-packages/codechecker_analyzer/cmd/analyze.py", line 1056, in main
actions, skipped_cmp_cmd_count = log_parser.parse_unique_log(
File "/usr/local/lib/python3.10/dist-packages/codechecker_analyzer/buildlog/log_parser.py", line 1299, in parse_unique_log
action = parse_options(entry,
File "/usr/local/lib/python3.10/dist-packages/codechecker_analyzer/buildlog/log_parser.py", line 970, in parse_options
determine_compiler(gcc_command,
File "/usr/local/lib/python3.10/dist-packages/codechecker_analyzer/buildlog/log_parser.py", line 662, in determine_compiler
if gcc_command[0].endswith('ccache'):
IndexError: list index out of range
As I understand, log_parser.py doesn't handle correctly the case when command item exist in json, but contains empty string, which leads to empty gcc_command and IndexError in the log_parser.py:662.
Expected behaviour
CodeChecker proceeds without crash.
Desktop (please complete the following information)
Describe the bug
There's a compatibility bug between
ninja
builder output andCodeCheckers
, which leads to CodeCheckers crash.CodeChecker version
To Reproduce
Steps to reproduce the behaviour:
https://github.com/mysql/mysql-server/archive/refs/tags/mysql-cluster-8.0.39.tar.gz -o mysql.tgz
ninja
build file.CodeChecker analyze ./compile_commands.json -o ./result_tidy ...
. See the error. Interestingly, generating viacmake
for this project works correctly.problematic json example:
As I understand,
log_parser.py
doesn't handle correctly the case whencommand
item exist in json, but contains empty string, which leads to emptygcc_command
andIndexError
in thelog_parser.py:662
.Expected behaviour
CodeChecker proceeds without crash.
Desktop (please complete the following information)
The text was updated successfully, but these errors were encountered: