Error: GCC_ANALYZER_WARNING (CWE-688): [#def1] git-2.45.2-build/git-2.45.2/builtin/interpret-trailers.c: scope_hint: In function ‘create_in_place_tempfile’ git-2.45.2-build/git-2.45.2/builtin/interpret-trailers.c:104:13: warning[-Wanalyzer-null-argument]: use of NULL ‘file’ where non-null expected /usr/include/features.h:511: included_from: Included from here. /usr/include/unistd.h:25: included_from: Included from here. git-2.45.2-build/git-2.45.2/git-compat-util.h:233: included_from: Included from here. git-2.45.2-build/git-2.45.2/builtin.h:4: included_from: Included from here. git-2.45.2-build/git-2.45.2/builtin/interpret-trailers.c:8: included_from: Included from here. /usr/include/sys/stat.h:227:12: note: argument 1 of ‘stat’ must be non-null # 102| FILE *outfile; # 103| # 104|-> if (stat(file, &st)) # 105| die_errno(_("could not stat %s"), file); # 106| if (!S_ISREG(st.st_mode)) Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] git-2.45.2-build/git-2.45.2/hash-ll.h:273:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ git-2.45.2-build/git-2.45.2/commit.c: scope_hint: In function ‘commit_tree_extended’ # 271| { # 272| memcpy(dst->hash, src->hash, GIT_MAX_RAWSZ); # 273|-> dst->algo = src->algo; # 274| } # 275| Error: GCC_ANALYZER_WARNING (CWE-1341): [#def3] git-2.45.2-build/git-2.45.2/loose.c: scope_hint: In function ‘write_one_object’ git-2.45.2-build/git-2.45.2/loose.c:199:9: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘open(path.buf, 1089, 438)’ git-2.45.2-build/git-2.45.2/loose.c:1: included_from: Included from here. git-2.45.2-build/git-2.45.2/loose.c:198:9: note: in expansion of macro ‘error_errno’ git-2.45.2-build/git-2.45.2/loose.c:7: included_from: Included from here. git-2.45.2-build/git-2.45.2/loose.c:198:9: note: in expansion of macro ‘error_errno’ # 197| errout: # 198| error_errno(_("failed to write loose object index %s\n"), path.buf); # 199|-> close(fd); # 200| rollback_lock_file(&lock); # 201| strbuf_release(&buf); Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] git-2.45.2-build/git-2.45.2/refs/reftable-backend.c:1: included_from: Included from here. git-2.45.2-build/git-2.45.2/refs/reftable-backend.c: scope_hint: In function ‘queue_transaction_update’ git-2.45.2-build/git-2.45.2/refs/reftable-backend.c:704:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg’ git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’ git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’ git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’ git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’ # 702| return ret; # 703| # 704|-> ALLOC_GROW(arg->updates, arg->updates_nr + 1, # 705| arg->updates_alloc); # 706| arg->updates[arg->updates_nr].update = update; Error: CLANG_WARNING: [#def5] git-2.45.2-build/git-2.45.2/refs/reftable-backend.c:1469:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read # 1467| goto done; # 1468| if (ret > 0 || strcmp(old_log.refname, arg->oldname)) { # 1469|-> ret = 0; # 1470| break; # 1471| } Error: CLANG_WARNING: [#def6] git-2.45.2-build/git-2.45.2/reftable/reader.c:267:29: warning[core.NullDereference]: Access to field 'block_size' results in a dereference of a null pointer (loaded from variable 'r') # 265| uint64_t next_off, uint8_t want_typ) # 266| { # 267|-> int32_t guess_block_size = r->block_size ? r->block_size : # 268| DEFAULT_BLOCK_SIZE; # 269| struct reftable_block block = { NULL }; Error: CLANG_WARNING: [#def7] git-2.45.2-build/git-2.45.2/trailer.c:328:8: warning[unix.Malloc]: Use of memory after it is freed # 326| list_for_each_dir(pos, head, backwards) { # 327| in_tok = list_entry(pos, struct trailer_item, list); # 328|-> if (!same_token(in_tok, arg_tok)) # 329| continue; # 330| on_tok = middle ? in_tok : start_tok;
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-230.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | git-2.44.0-1.fc40 |
diffbase-store-results-to | /tmp/tmph65d5ivp/git-2.44.0-1.fc40.tar.xz |
diffbase-time-created | 2024-07-03 12:44:35 |
diffbase-time-finished | 2024-07-03 12:53:02 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmph65d5ivp/git-2.44.0-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmph65d5ivp/git-2.44.0-1.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-230.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | git-2.45.2-1.fc41 |
store-results-to | /tmp/tmpr9qf5v57/git-2.45.2-1.fc41.tar.xz |
time-created | 2024-07-03 12:53:30 |
time-finished | 2024-07-03 13:01:40 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpr9qf5v57/git-2.45.2-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpr9qf5v57/git-2.45.2-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |