numactl-2.0.18-1.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
numactl-2.0.18-build/numactl-2.0.18/affinity.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
numactl-2.0.18-build/numactl-2.0.18/libnuma.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
numactl-2.0.18-build/numactl-2.0.18/libnuma.c: scope_hint: In function ‘numa_find_first’
numactl-2.0.18-build/numactl-2.0.18/libnuma.c:137:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mask’
numactl-2.0.18-build/numactl-2.0.18/libnuma.c:27: included_from: Included from here.
# 135| {
# 136| int i;
# 137|-> for (i = 0; i < mask->size; i++)
# 138| if (numa_bitmask_isbitset(mask, i))
# 139| return i;
Error: CPPCHECK_WARNING (CWE-401): [#def4]
numactl-2.0.18-build/numactl-2.0.18/libnuma.c:430: error[memleakOnRealloc]: Common realloc mistake: 'mask' nulled but not freed upon failure
# 428| do {
# 429| nodemask_sz <<= 1;
# 430|-> mask = realloc(mask, nodemask_sz / 8);
# 431| if (!mask)
# 432| return;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
numactl-2.0.18-build/numactl-2.0.18/libnuma.c: scope_hint: In function ‘numa_has_home_node’
numactl-2.0.18-build/numactl-2.0.18/libnuma.c:699:16: warning[-Wanalyzer-malloc-leak]: leak of ‘numa_get_mems_allowed()’
# 697| numa_num_possible_nodes(void)
# 698| {
# 699|-> return nodemask_sz;
# 700| }
# 701|
Error: CLANG_WARNING: [#def6]
numactl-2.0.18-build/numactl-2.0.18/libnuma.c:2268:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'tmp'
# 2266|
# 2267| out:
# 2268|-> return has_home_node;
# 2269| }
# 2270|
Error: CPPCHECK_WARNING: [#def7]
numactl-2.0.18-build/numactl-2.0.18/memhog.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def8]
numactl-2.0.18-build/numactl-2.0.18/migratepages.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def9]
numactl-2.0.18-build/numactl-2.0.18/migspeed.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def10]
numactl-2.0.18-build/numactl-2.0.18/numactl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def11]
numactl-2.0.18-build/numactl-2.0.18/numactl.c:725:2: warning[deadcode.DeadStores]: Value stored to 'ac' is never read
# 723|
# 724| av += optind;
# 725|-> ac -= optind;
# 726|
# 727| if (shmfd >= 0) {
Error: CPPCHECK_WARNING: [#def12]
numactl-2.0.18-build/numactl-2.0.18/numademo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-758): [#def13]
numactl-2.0.18-build/numactl-2.0.18/numademo.c:138: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 136| for (i = 0; i < nmemb; i++) {
# 137| union node *n = &nodes[i];
# 138|-> n->next = n->nexti >= nmemb ? NULL : &nodes[n->nexti];
# 139| }
# 140| return (void **)nodes;
Error: CPPCHECK_WARNING: [#def14]
numactl-2.0.18-build/numactl-2.0.18/numastat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-457): [#def15]
numactl-2.0.18-build/numactl-2.0.18/numastat.c: scope_hint: In function ‘show_info_from_system_file’
numactl-2.0.18-build/numactl-2.0.18/numastat.c:911:64: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘tok[<unknown>]’
numactl-2.0.18-build/numactl-2.0.18/numastat.c: scope_hint: In function ‘show_info_from_system_file’
numactl-2.0.18-build/numactl-2.0.18/numastat.c: scope_hint: In function ‘show_info_from_system_file’
numactl-2.0.18-build/numactl-2.0.18/numastat.c: scope_hint: In function ‘show_info_from_system_file’
# 909| printf("Token %s not in hash table.\n", tok[0 + tok_offset]);
# 910| } else {
# 911|-> double value = (double)atol(tok[1 + tok_offset]);
# 912| if (!compatibility_mode) {
# 913| double multiplier = 1.0;
Error: CLANG_WARNING: [#def16]
numactl-2.0.18-build/numactl-2.0.18/numastat.c:1381:21: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1379| fclose(fs);
# 1380| }
# 1381|-> if (strstr(buf, pattern)) {
# 1382| if (pid != getpid()) {
# 1383| add_pid_to_list(pid);
Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
numactl-2.0.18-build/numactl-2.0.18/shm.c: scope_hint: In function ‘sysvkey’
numactl-2.0.18-build/numactl-2.0.18/shm.c:91:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘creat(name, shmmode)’
# 89| name, shmmode);
# 90| fd = creat(name, shmmode);
# 91|-> if (fd < 0)
# 92| nerror("cannot create key for shm %s\n", name);
# 93| key = ftok(name, shmid);
Error: CPPCHECK_WARNING: [#def18]
numactl-2.0.18-build/numactl-2.0.18/stream_lib.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def19]
numactl-2.0.18-build/numactl-2.0.18/stream_lib.c:215:19: warning[deadcode.DeadStores]: Although the value stored to 't1' is used in the enclosing expression, the value is never actually read from 't1'
# 213| t1 = mysecond();
# 214| while (((t2 = mysecond()) - t1) < 1.0E-6);
# 215|-> timesfound[i] = t1 = t2;
# 216| }
# 217|
Error: GCC_ANALYZER_WARNING: [#def20]
numactl-2.0.18-build/numactl-2.0.18/sysfs.c: scope_hint: In function ‘sysfs_read’
numactl-2.0.18-build/numactl-2.0.18/sysfs.c:24:13: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open(name, 0)’
# 22| return NULL;
# 23| fd = open(name, O_RDONLY);
# 24|-> n = read(fd, buf, SYSFS_BLOCK - 1);
# 25| close(fd);
# 26| if (n <= 0) {
Scan Properties
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 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-122.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | numactl-2.0.18-1.fc41 |
store-results-to | /tmp/tmplpetg5h9/numactl-2.0.18-1.fc41.tar.xz |
time-created | 2024-07-03 16:30:10 |
time-finished | 2024-07-03 16:31:18 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmplpetg5h9/numactl-2.0.18-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmplpetg5h9/numactl-2.0.18-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |