Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-121): [#def1]
libxs-1.0.0/samples/shuffle/shuffle.c:14: included_from: Included from here.
libxs-1.0.0/samples/shuffle/shuffle.c: scope_hint: In function ‘mhd_element_hash’
libxs-1.0.0/libxs/libxs_mem.h:34:15: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
libxs-1.0.0/libxs/libxs_mem.h:22:5: note: in expansion of macro ‘LIBXS_MEMCPY_RHS’
libxs-1.0.0/libxs/libxs_mem.h:36:3: note: in expansion of macro ‘LIBXS_MEM_LOOP’
libxs-1.0.0/samples/shuffle/shuffle.c:560:3: note: in expansion of macro ‘LIBXS_MEMCPY’
libxs-1.0.0/libxs/libxs_mem.h:36:3: note: in expansion of macro ‘LIBXS_MEM_LOOP’
libxs-1.0.0/samples/shuffle/shuffle.c:560:3: note: in expansion of macro ‘LIBXS_MEMCPY’
libxs-1.0.0/libxs/libxs_mem.h:22:5: note: in expansion of macro ‘LIBXS_MEMCPY_RHS’
libxs-1.0.0/libxs/libxs_mem.h:36:3: note: in expansion of macro ‘LIBXS_MEM_LOOP’
libxs-1.0.0/samples/shuffle/shuffle.c:560:3: note: in expansion of macro ‘LIBXS_MEMCPY’
libxs-1.0.0/libxs/libxs_mem.h:22:5: note: in expansion of macro ‘LIBXS_MEMCPY_RHS’
libxs-1.0.0/libxs/libxs_mem.h:36:3: note: in expansion of macro ‘LIBXS_MEM_LOOP’
libxs-1.0.0/samples/shuffle/shuffle.c:560:3: note: in expansion of macro ‘LIBXS_MEMCPY’
libxs-1.0.0/libxs/libxs_mem.h:34:15: note: write of 1 byte to beyond the end of ‘v’
libxs-1.0.0/libxs/libxs_mem.h:22:5: note: in expansion of macro ‘LIBXS_MEMCPY_RHS’
libxs-1.0.0/libxs/libxs_mem.h:36:3: note: in expansion of macro ‘LIBXS_MEM_LOOP’
libxs-1.0.0/samples/shuffle/shuffle.c:560:3: note: in expansion of macro ‘LIBXS_MEMCPY’
#   32|   
#   33|   #define LIBXS_MEMCPY_RHS(TYPE, DST, SRC, IDX) \
#   34|->   ((DST)[IDX] = ((const TYPE*)(SRC))[IDX])
#   35|   #define LIBXS_MEMCPY(DST, SRC, SIZE) \
#   36|     LIBXS_MEM_LOOP(DST, SRC, SIZE, LIBXS_MEMCPY_RHS, LIBXS_MEM_NTS)

Error: GCC_ANALYZER_WARNING (CWE-126): [#def2]
libxs-1.0.0/samples/gemm/gemm_groups.c: scope_hint: In function ‘main’
libxs-1.0.0/samples/gemm/gemm_groups.c:164:5: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
libxs-1.0.0/samples/gemm/gemm_groups.c:164:5: note: read of 8 bytes from after the end of the region
#  162|         }
#  163|       }
#  164|->     libxs_matdiff(&check_diff, LIBXS_DATATYPE(double),
#  165|         m_array[0], n_array[0], NULL/*ref*/,
#  166|         c_ptrs[0], NULL/*ldref*/, ldc_array);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def3]
libxs-1.0.0/samples/gemm/gemm_groups.c:164:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*c_ptrs’
#  162|         }
#  163|       }
#  164|->     libxs_matdiff(&check_diff, LIBXS_DATATYPE(double),
#  165|         m_array[0], n_array[0], NULL/*ref*/,
#  166|         c_ptrs[0], NULL/*ldref*/, ldc_array);

Error: CPPCHECK_WARNING (CWE-369): [#def4]
libxs-1.0.0/samples/memory/memcmp.c:34: error[zerodiv]: Division by zero.
#   32|     const int elsize = (0 >= insize ? INSIZE : insize);
#   33|     const int stride = (0 >= incrmt ? LIBXS_MAX(MAXSIZE, elsize) : LIBXS_MAX(incrmt, elsize));
#   34|->   const size_t size = (0 >= nelems ? (((size_t)2 << 30/*2 GB*/) / stride) : ((size_t)nelems));
#   35|     const size_t nrpt = LIBXS_MAX(niters, 1), nbytes = size * stride, shuffle = libxs_coprime2(size);
#   36|     const char *const env_strided = getenv("STRIDED"), *const env_check = getenv("CHECK");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
libxs-1.0.0/samples/ozaki/ozaki.h:9: included_from: Included from here.
libxs-1.0.0/samples/ozaki/ozaki1_int8.c:9: included_from: Included from here.
libxs-1.0.0/samples/ozaki/gemm.h: scope_hint: In function ‘dgemm_mhd_write’
libxs-1.0.0/samples/ozaki/gemm.h:196:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘scalar’
libxs-1.0.0/libxs/libxs.h:12: included_from: Included from here.
libxs-1.0.0/libxs/libxs_math.h:12: included_from: Included from here.
libxs-1.0.0/samples/ozaki/gemm.h:9: included_from: Included from here.
libxs-1.0.0/libxs/libxs_macros.h:100:34: note: in definition of macro ‘LIBXS_CONCATENATE2’
libxs-1.0.0/libxs/libxs_macros.h:874:35: note: in expansion of macro ‘LIBXS_CONCATENATE’
libxs-1.0.0/libxs/libxs_macros.h:100:34: note: in expansion of macro ‘LIBXS_TYPECHAR_double’
libxs-1.0.0/libxs/libxs_macros.h:103:33: note: in expansion of macro ‘LIBXS_CONCATENATE2’
libxs-1.0.0/libxs/libxs_macros.h:868:30: note: in expansion of macro ‘LIBXS_CONCATENATE’
libxs-1.0.0/libxs/libxs_macros.h:874:53: note: in expansion of macro ‘LIBXS_TYPECHAR’
libxs-1.0.0/samples/ozaki/ozaki.h:164:28: note: in expansion of macro ‘LIBXS_TPREFIX’
libxs-1.0.0/samples/ozaki/ozaki.h:1209:22: note: in expansion of macro ‘gemm_dump_matrices’
libxs-1.0.0/libxs/libxs_macros.h:965: included_from: Included from here.
libxs-1.0.0/libxs/libxs_sync.h:267:11: note: in expansion of macro ‘LIBXS_ASSERT_MSG’
libxs-1.0.0/samples/ozaki/ozaki.h:1225:3: note: in expansion of macro ‘LIBXS_ATOMIC_ACQUIRE’
libxs-1.0.0/samples/ozaki/ozaki.h:1227:18: note: in expansion of macro ‘LIBXS_SNPRINTF’
libxs-1.0.0/samples/ozaki/ozaki.h:1239:18: note: in expansion of macro ‘LIBXS_SNPRINTF’
libxs-1.0.0/samples/ozaki/ozaki.h:1252:20: note: in expansion of macro ‘LIBXS_SNPRINTF’
libxs-1.0.0/libxs/libxs_macros.h:100:34: note: in definition of macro ‘LIBXS_CONCATENATE2’
libxs-1.0.0/libxs/libxs_macros.h:874:35: note: in expansion of macro ‘LIBXS_CONCATENATE’
libxs-1.0.0/libxs/libxs_macros.h:100:34: note: in expansion of macro ‘LIBXS_TYPECHAR_double’
libxs-1.0.0/libxs/libxs_macros.h:103:33: note: in expansion of macro ‘LIBXS_CONCATENATE2’
libxs-1.0.0/libxs/libxs_macros.h:868:30: note: in expansion of macro ‘LIBXS_CONCATENATE’
libxs-1.0.0/libxs/libxs_macros.h:874:53: note: in expansion of macro ‘LIBXS_TYPECHAR’
libxs-1.0.0/samples/ozaki/gemm.h:73:24: note: in expansion of macro ‘LIBXS_TPREFIX’
libxs-1.0.0/samples/ozaki/ozaki.h:1258:28: note: in expansion of macro ‘gemm_mhd_write’
libxs-1.0.0/libxs/libxs_macros.h:100:34: note: in definition of macro ‘LIBXS_CONCATENATE2’
libxs-1.0.0/libxs/libxs_macros.h:874:35: note: in expansion of macro ‘LIBXS_CONCATENATE’
libxs-1.0.0/libxs/libxs_macros.h:100:34: note: in expansion of macro ‘LIBXS_TYPECHAR_double’
libxs-1.0.0/libxs/libxs_macros.h:103:33: note: in expansion of macro ‘LIBXS_CONCATENATE2’
libxs-1.0.0/libxs/libxs_macros.h:868:30: note: in expansion of macro ‘LIBXS_CONCATENATE’
libxs-1.0.0/libxs/libxs_macros.h:874:53: note: in expansion of macro ‘LIBXS_TYPECHAR’
libxs-1.0.0/samples/ozaki/gemm.h:73:24: note: in expansion of macro ‘LIBXS_TPREFIX’
libxs-1.0.0/samples/ozaki/gemm.h:172:22: note: in expansion of macro ‘gemm_mhd_write’
#  194|     *(char*)ext = trans;
#  195|     memcpy(ext + sizeof(char), &ld, sizeof(GEMM_INT_TYPE));
#  196|->   memcpy(ext + sizeof(char) + sizeof(GEMM_INT_TYPE), scalar, ncomp * sizeof(GEMM_REAL_TYPE));
#  197|     if (NULL != settings) {
#  198|       p = ext + ext_size;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libxs-1.0.0/samples/predict/predict_soi.c: scope_hint: In function ‘load_noaa_slp’
libxs-1.0.0/samples/predict/predict_soi.c:177:10: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
#  175|       fclose(file);
#  176|     }
#  177|->   return result;
#  178|   }
#  179|   

Error: COMPILER_WARNING: [#def7]
libxs-1.0.0/samples/registry/registry.c: scope_hint: In function ‘main’
libxs-1.0.0/samples/registry/registry.c:196:16: warning[-Wdeprecated-openmp]: ‘master’ construct deprecated since OpenMP 5.1, use ‘masked’
#  194|   #     pragma omp parallel num_threads(nthreads) private(i)
#  195|         {
#  196|-> #       pragma omp master
#  197|           start = libxs_timer_tick();
#  198|   #       pragma omp barrier

Error: COMPILER_WARNING: [#def8]
libxs-1.0.0/samples/registry/registry.c:206:16: warning[-Wdeprecated-openmp]: ‘master’ construct deprecated since OpenMP 5.1, use ‘masked’
#  204|             if (NULL == v) result = EXIT_FAILURE;
#  205|           }
#  206|-> #       pragma omp master
#  207|           total_cycles += libxs_timer_ncycles(start, libxs_timer_tick());
#  208|         }

Error: GCC_ANALYZER_WARNING (CWE-131): [#def9]
libxs-1.0.0/samples/rosetta/rosetta.c: scope_hint: In function ‘sort_test’
libxs-1.0.0/samples/rosetta/rosetta.c:521:31: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  519|     perm = (int*)malloc(nrows * sizeof(int));
#  520|     if (NULL != perm) {
#  521|->     double* colmaj = (double*)malloc(nbytes);
#  522|       int i, is_identity = 1;
#  523|       if (NULL != colmaj) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def10]
libxs-1.0.0/samples/rosetta/rosetta.c:534:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
#  532|       }
#  533|       for (i = 0; i < nrows; ++i) {
#  534|->       if (perm[i] != i) { is_identity = 0; break; }
#  535|       }
#  536|       printf("  Data is %s ordered for row smoothness.\n",

Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
libxs-1.0.0/samples/shuffle/shuffle.c: scope_hint: In function ‘msort_inv’
libxs-1.0.0/samples/shuffle/shuffle.c:532:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘scratch’
#  530|       ++ir;
#  531|     }
#  532|->   memcpy(data, scratch, elemsize * count);
#  533|     return inv;
#  534|   }

Error: COMPILER_WARNING: [#def12]
libxs-1.0.0/samples/sync/sync.c: scope_hint: In function ‘work’
libxs-1.0.0/samples/sync/sync.c:156:33: warning[-Wunused-but-set-variable=]: variable ‘s’ set but not used
#  156 |     volatile libxs_timer_tick_t s = 0;
#      |                                 ^
#  154|     libxs_timer_tick_t tick = start;
#  155|     do {
#  156|->     volatile libxs_timer_tick_t s = 0;
#  157|       libxs_timer_tick_t i;
#  158|       for (i = 0; i < ((end - tick) / 4); ++i) s += i;

Error: GCC_ANALYZER_WARNING (CWE-479): [#def13]
libxs-1.0.0/src/libxs_main.c:133:3: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘fprintf’ from within signal handler
libxs-1.0.0/src/libxs_main.c: scope_hint: In function ‘internal_libxs_dump’
libxs-1.0.0/src/libxs_main.h:14: included_from: Included from here.
libxs-1.0.0/src/libxs_main.c:9: included_from: Included from here.
libxs-1.0.0/src/libxs_main.c:490:30: note: in expansion of macro ‘LIBXS_ATOMIC_ADD_FETCH’
libxs-1.0.0/libxs/libxs_macros.h:965: included_from: Included from here.
libxs-1.0.0/libxs/libxs.h:12: included_from: Included from here.
libxs-1.0.0/libxs/libxs_timer.h:12: included_from: Included from here.
libxs-1.0.0/src/libxs_main.h:12: included_from: Included from here.
libxs-1.0.0/src/libxs_main.c:491:5: note: in expansion of macro ‘LIBXS_ASSERT’
libxs-1.0.0/src/libxs_main.c:315:27: note: in expansion of macro ‘LIBXS_MAX’
libxs-1.0.0/src/libxs_main.c:203:3: note: in expansion of macro ‘LIBXS_ASSERT_MSG’
libxs-1.0.0/src/libxs_main.c: scope_hint: In function ‘internal_libxs_dump’
#  131|     }
#  132|   #else
#  133|->   fprintf(ostream, "%s\n", internal_libxs_build_state);
#  134|   #endif
#  135|   }

Scan Properties

analyzer-version-clippy1.96.0
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.96.0
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-238.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelibxs-1.0.0-1.20260625235357766098.main.0.g2132ebbc6
diffbase-store-results-to/tmp/tmp06fge7cd/libxs-1.0.0-1.20260625235357766098.main.0.g2132ebbc6.tar.xz
diffbase-time-created2026-06-27 10:08:46
diffbase-time-finished2026-06-27 10:12:26
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmp06fge7cd/libxs-1.0.0-1.20260625235357766098.main.0.g2132ebbc6.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp06fge7cd/libxs-1.0.0-1.20260625235357766098.main.0.g2132ebbc6.src.rpm'
diffbase-tool-versioncsmock-3.8.7.HEAD-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-238.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibxs-1.0.0-1.20260627070700735330.pr21.1.g4b06e3013
store-results-to/tmp/tmp3s2_5438/libxs-1.0.0-1.20260627070700735330.pr21.1.g4b06e3013.tar.xz
time-created2026-06-27 10:12:35
time-finished2026-06-27 10:14:26
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmp3s2_5438/libxs-1.0.0-1.20260627070700735330.pr21.1.g4b06e3013.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp3s2_5438/libxs-1.0.0-1.20260627070700735330.pr21.1.g4b06e3013.src.rpm'
tool-versioncsmock-3.8.7.HEAD-1.el9