llvm-20.1.3-1.fc43

List of Findings

Error: CLANG_WARNING: [#def1]
llvm-project-20.1.3.src/bolt/runtime/hugify.cpp:11: included_from: Included from here.
llvm-project-20.1.3.src/bolt/runtime/common.h:196:5: warning: unused function 'strnCmp' [-Wunused-function]
#  196 | int strnCmp(const char *Str1, const char *Str2, size_t Num) {
#      |     ^~~~~~~
#  194|   
#  195|   /// Compare two strings, at most Num bytes.
#  196|-> int strnCmp(const char *Str1, const char *Str2, size_t Num) {
#  197|     while (Num && *Str1 && (*Str1 == *Str2)) {
#  198|       Num--;

Error: CLANG_WARNING: [#def2]
llvm-project-20.1.3.src/bolt/runtime/common.h:214:7: warning: unused function 'strStr' [-Wunused-function]
#  214 | void *strStr(const char *const Haystack, const char *const Needle) {
#      |       ^~~~~~
#  212|   }
#  213|   
#  214|-> void *strStr(const char *const Haystack, const char *const Needle) {
#  215|     int j = 0;
#  216|   

Error: CLANG_WARNING: [#def3]
llvm-project-20.1.3.src/bolt/runtime/common.h:230:6: warning: unused function 'reportNumber' [-Wunused-function]
#  230 | void reportNumber(const char *Msg, uint64_t Num, uint32_t Base) {
#      |      ^~~~~~~~~~~~
#  228|   }
#  229|   
#  230|-> void reportNumber(const char *Msg, uint64_t Num, uint32_t Base) {
#  231|     char Buf[BufSize];
#  232|     char *Ptr = Buf;

Error: CLANG_WARNING: [#def4]
llvm-project-20.1.3.src/bolt/runtime/common.h:239:6: warning: unused function 'report' [-Wunused-function]
#  239 | void report(const char *Msg) { __write(2, Msg, strLen(Msg)); }
#      |      ^~~~~~
#  237|   }
#  238|   
#  239|-> void report(const char *Msg) { __write(2, Msg, strLen(Msg)); }
#  240|   
#  241|   unsigned long hexToLong(const char *Str, char Terminator = '\0') {

Error: CLANG_WARNING: [#def5]
llvm-project-20.1.3.src/bolt/runtime/common.h:241:15: warning: unused function 'hexToLong' [-Wunused-function]
#  241 | unsigned long hexToLong(const char *Str, char Terminator = '\0') {
#      |               ^~~~~~~~~
#  239|   void report(const char *Msg) { __write(2, Msg, strLen(Msg)); }
#  240|   
#  241|-> unsigned long hexToLong(const char *Str, char Terminator = '\0') {
#  242|     unsigned long Res = 0;
#  243|     while (*Str != Terminator) {

Error: CLANG_WARNING: [#def6]
llvm-project-20.1.3.src/bolt/runtime/common.h:262:13: warning: unused function 'scanUInt32' [-Wunused-function]
#  262 | static bool scanUInt32(const char *&Buf, const char *End, uint32_t &Ret) {
#      |             ^~~~~~~~~~
#  260|   /// overflow. The function \returns whether a valid uint32_t value is found.
#  261|   /// \p buf will be updated to the next character right after the digits.
#  262|-> static bool scanUInt32(const char *&Buf, const char *End, uint32_t &Ret) {
#  263|     uint64_t Result = 0;
#  264|     const char *OldBuf = Buf;

Error: CLANG_WARNING: [#def7]
llvm-project-20.1.3.src/bolt/runtime/common.h:281:6: warning: unused function 'assert' [-Wunused-function]
#  281 | void assert(bool Assertion, const char *Msg) {
#      |      ^~~~~~
#  279|   }
#  280|   
#  281|-> void assert(bool Assertion, const char *Msg) {
#  282|     if (Assertion)
#  283|       return;

Error: CLANG_WARNING: [#def8]
llvm-project-20.1.3.src/bolt/runtime/hugify.cpp:39:7: warning: unused variable 'Ret' [-Wunused-variable]
#   39 |   int Ret = __uname(&UtsName);
#      |       ^~~
#   37|     // major, minor, release
#   38|     struct UtsNameTy UtsName;
#   39|->   int Ret = __uname(&UtsName);
#   40|     const char *Buf = UtsName.release;
#   41|     const char *End = Buf + strLen(Buf);

Error: CLANG_WARNING: [#def9]
llvm-project-20.1.3.src/bolt/runtime/instr.cpp:248:6: warning: unused function 'operator delete' [-Wunused-function]
#  248 | void operator delete(void *Ptr, BumpPtrAllocator &A) { A.deallocate(Ptr); }
#      |      ^~~~~~~~
#  246|   // Only called during exception unwinding (useless). We must manually dealloc.
#  247|   // C++ language weirdness
#  248|-> void operator delete(void *Ptr, BumpPtrAllocator &A) { A.deallocate(Ptr); }
#  249|   
#  250|   namespace {

Error: CLANG_WARNING: [#def10]
llvm-project-20.1.3.src/bolt/runtime/instr.cpp:810:6: warning: unused function 'printStats' [-Wunused-function]
#  810 | void printStats(const ProfileWriterContext &Ctx) {
#      |      ^~~~~~~~~~
#  808|   #if !defined(__APPLE__)
#  809|   /// Debug by printing overall metadata global numbers to check it is sane
#  810|-> void printStats(const ProfileWriterContext &Ctx) {
#  811|     char StatMsg[BufSize];
#  812|     char *StatPtr = StatMsg;

Error: CLANG_WARNING: [#def11]
llvm-project-20.1.3.src/bolt/runtime/instr.cpp:1653:14: warning: variable 'PID' set but not used [-Wunused-but-set-variable]
# 1653 |     if (long PID = __fork())
#      |              ^
# 1651|         __setpgid(0, 0);
# 1652|   
# 1653|->     if (long PID = __fork())
# 1654|         return;
# 1655|       watchProcess();

Error: CLANG_WARNING: [#def12]
llvm-project-20.1.3.src/bolt/runtime/hugify.cpp:11: included_from: Included from here.
llvm-project-20.1.3.src/bolt/runtime/common.h:157: included_from: Included from here.
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:48:10: warning: unused function 'getTextBaseAddress' [-Wunused-function]
#   48 | uint64_t getTextBaseAddress() {
#      |          ^~~~~~~~~~~~~~~~~~
#   46|   // in turn can be used to search for indirect call description. Needed because
#   47|   // indirect call descriptions are read-only non-relocatable data.
#   48|-> uint64_t getTextBaseAddress() {
#   49|     uint64_t DynAddr;
#   50|     uint64_t StaticAddr;

Error: CLANG_WARNING: [#def13]
llvm-project-20.1.3.src/bolt/runtime/instr.cpp:43: included_from: Included from here.
llvm-project-20.1.3.src/bolt/runtime/common.h:157: included_from: Included from here.
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:60:10: warning: unused function '__read' [-Wunused-function]
#   60 | uint64_t __read(uint64_t fd, const void *buf, uint64_t count) {
#      |          ^~~~~~
#   58|   #define STRINGIFY(x) _STRINGIFY(x)
#   59|   
#   60|-> uint64_t __read(uint64_t fd, const void *buf, uint64_t count) {
#   61|     uint64_t ret;
#   62|   #if defined(__APPLE__)

Error: CLANG_WARNING: [#def14]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:141:10: warning: unused function '__getpid' [-Wunused-function]
#  141 | uint64_t __getpid() {
#      |          ^~~~~~~~
#  139|   }
#  140|   
#  141|-> uint64_t __getpid() {
#  142|     uint64_t ret;
#  143|   #if defined(__APPLE__)

Error: CLANG_WARNING: [#def15]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:189:6: warning: unused function '__getdents64' [-Wunused-function]
#  189 | long __getdents64(unsigned int fd, dirent64 *dirp, size_t count) {
#      |      ^~~~~~~~~~~~
#  187|   }
#  188|   
#  189|-> long __getdents64(unsigned int fd, dirent64 *dirp, size_t count) {
#  190|     long ret;
#  191|     __asm__ __volatile__("movq $217, %%rax\n"

Error: CLANG_WARNING: [#def16]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:199:10: warning: unused function '__readlink' [-Wunused-function]
#  199 | uint64_t __readlink(const char *pathname, char *buf, size_t bufsize) {
#      |          ^~~~~~~~~~
#  197|   }
#  198|   
#  199|-> uint64_t __readlink(const char *pathname, char *buf, size_t bufsize) {
#  200|     uint64_t ret;
#  201|     __asm__ __volatile__("movq $89, %%rax\n"

Error: CLANG_WARNING: [#def17]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:209:10: warning: unused function '__lseek' [-Wunused-function]
#  209 | uint64_t __lseek(uint64_t fd, uint64_t pos, uint64_t whence) {
#      |          ^~~~~~~
#  207|   }
#  208|   
#  209|-> uint64_t __lseek(uint64_t fd, uint64_t pos, uint64_t whence) {
#  210|     uint64_t ret;
#  211|     __asm__ __volatile__("movq $8, %%rax\n"

Error: CLANG_WARNING: [#def18]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:219:5: warning: unused function '__ftruncate' [-Wunused-function]
#  219 | int __ftruncate(uint64_t fd, uint64_t length) {
#      |     ^~~~~~~~~~~
#  217|   }
#  218|   
#  219|-> int __ftruncate(uint64_t fd, uint64_t length) {
#  220|     int ret;
#  221|     __asm__ __volatile__("movq $77, %%rax\n"

Error: CLANG_WARNING: [#def19]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:229:5: warning: unused function '__close' [-Wunused-function]
#  229 | int __close(uint64_t fd) {
#      |     ^~~~~~~
#  227|   }
#  228|   
#  229|-> int __close(uint64_t fd) {
#  230|     uint64_t ret;
#  231|     __asm__ __volatile__("movq $3, %%rax\n"

Error: CLANG_WARNING: [#def20]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:239:5: warning: unused function '__madvise' [-Wunused-function]
#  239 | int __madvise(void *addr, size_t length, int advice) {
#      |     ^~~~~~~~~
#  237|   }
#  238|   
#  239|-> int __madvise(void *addr, size_t length, int advice) {
#  240|     int ret;
#  241|     __asm__ __volatile__("movq $28, %%rax\n"

Error: CLANG_WARNING: [#def21]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:249:5: warning: unused function '__uname' [-Wunused-function]
#  249 | int __uname(struct UtsNameTy *Buf) {
#      |     ^~~~~~~
#  247|   }
#  248|   
#  249|-> int __uname(struct UtsNameTy *Buf) {
#  250|     int Ret;
#  251|     __asm__ __volatile__("movq $63, %%rax\n"

Error: CLANG_WARNING: [#def22]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:259:10: warning: unused function '__nanosleep' [-Wunused-function]
#  259 | uint64_t __nanosleep(const timespec *req, timespec *rem) {
#      |          ^~~~~~~~~~~
#  257|   }
#  258|   
#  259|-> uint64_t __nanosleep(const timespec *req, timespec *rem) {
#  260|     uint64_t ret;
#  261|     __asm__ __volatile__("movq $35, %%rax\n"

Error: CLANG_WARNING: [#def23]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:269:9: warning: unused function '__fork' [-Wunused-function]
#  269 | int64_t __fork() {
#      |         ^~~~~~
#  267|   }
#  268|   
#  269|-> int64_t __fork() {
#  270|     uint64_t ret;
#  271|     __asm__ __volatile__("movq $57, %%rax\n"

Error: CLANG_WARNING: [#def24]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:279:5: warning: unused function '__mprotect' [-Wunused-function]
#  279 | int __mprotect(void *addr, size_t len, int prot) {
#      |     ^~~~~~~~~~
#  277|   }
#  278|   
#  279|-> int __mprotect(void *addr, size_t len, int prot) {
#  280|     int ret;
#  281|     __asm__ __volatile__("movq $10, %%rax\n"

Error: CLANG_WARNING: [#def25]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:289:10: warning: unused function '__getppid' [-Wunused-function]
#  289 | uint64_t __getppid() {
#      |          ^~~~~~~~~
#  287|   }
#  288|   
#  289|-> uint64_t __getppid() {
#  290|     uint64_t ret;
#  291|     __asm__ __volatile__("movq $110, %%rax\n"

Error: CLANG_WARNING: [#def26]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:299:5: warning: unused function '__setpgid' [-Wunused-function]
#  299 | int __setpgid(uint64_t pid, uint64_t pgid) {
#      |     ^~~~~~~~~
#  297|   }
#  298|   
#  299|-> int __setpgid(uint64_t pid, uint64_t pgid) {
#  300|     int ret;
#  301|     __asm__ __volatile__("movq $109, %%rax\n"

Error: CLANG_WARNING: [#def27]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:309:10: warning: unused function '__getpgid' [-Wunused-function]
#  309 | uint64_t __getpgid(uint64_t pid) {
#      |          ^~~~~~~~~
#  307|   }
#  308|   
#  309|-> uint64_t __getpgid(uint64_t pid) {
#  310|     uint64_t ret;
#  311|     __asm__ __volatile__("movq $121, %%rax\n"

Error: CLANG_WARNING: [#def28]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:319:5: warning: unused function '__kill' [-Wunused-function]
#  319 | int __kill(uint64_t pid, int sig) {
#      |     ^~~~~~
#  317|   }
#  318|   
#  319|-> int __kill(uint64_t pid, int sig) {
#  320|     int ret;
#  321|     __asm__ __volatile__("movq $62, %%rax\n"

Error: CLANG_WARNING: [#def29]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:329:5: warning: unused function '__fsync' [-Wunused-function]
#  329 | int __fsync(int fd) {
#      |     ^~~~~~~
#  327|   }
#  328|   
#  329|-> int __fsync(int fd) {
#  330|     int ret;
#  331|     __asm__ __volatile__("movq $74, %%rax\n"

Error: CLANG_WARNING: [#def30]
llvm-project-20.1.3.src/bolt/runtime/sys_x86_64.h:342:5: warning: unused function '__prctl' [-Wunused-function]
#  342 | int __prctl(int Option, unsigned long Arg2, unsigned long Arg3,
#      |     ^~~~~~~
#  340|   // sys_prctl  int option  unsigned    unsigned    unsigned    unsigned
#  341|   //                        long arg2   long arg3   long arg4   long arg5
#  342|-> int __prctl(int Option, unsigned long Arg2, unsigned long Arg3,
#  343|               unsigned long Arg4, unsigned long Arg5) {
#  344|     int Ret;

Error: UNICONTROL_WARNING (CWE-94): [#def31]
llvm-project-20.1.3.src/clang-tools-extra/docs/clang-tidy/checks/misc/misleading-bidirectional.rst:17: warning: bidirectional control characters: ['\u202e', '\u2066', '\u2069', '\u2066']
#   15|       int main() {
#   16|           bool isAdmin = false;
#   17|->         /*‮ } ⁦if (isAdmin)⁩ ⁦ begin admins only */
#   18|               std::cout << "You are an admin.\n";
#   19|           /* end admins only ‮ { ⁦*/

Error: UNICONTROL_WARNING (CWE-94): [#def32]
llvm-project-20.1.3.src/clang-tools-extra/docs/clang-tidy/checks/misc/misleading-bidirectional.rst:19: warning: bidirectional control characters: ['\u202e', '\u2066']
#   17|           /*‮ } ⁦if (isAdmin)⁩ ⁦ begin admins only */
#   18|               std::cout << "You are an admin.\n";
#   19|->         /* end admins only ‮ { ⁦*/
#   20|           return 0;
#   21|       }

Error: CPPCHECK_WARNING (CWE-476): [#def33]
llvm-project-20.1.3.src/lldb/unittests/tools/lldb-server/inferior/thread_inferior.cpp:32: warning[nullPointer]: Possible null pointer dereference: p
#   30|     // Cause a break.
#   31|     volatile char *p = nullptr;
#   32|->   *p = 'a';
#   33|   
#   34|     delay.store(false);

Error: CPPCHECK_WARNING (CWE-457): [#def34]
llvm-project-20.1.3.src/llvm/include/llvm/Support/MathExtras.h:146: warning[uninitvar]: Uninitialized variable: out
#  144|     for (unsigned i = 0; i < sizeof(Val); ++i)
#  145|       out[(sizeof(Val) - i) - 1] = BitReverseTable256[in[i]];
#  146|->   std::memcpy(&Val, out, sizeof(Val));
#  147|     return Val;
#  148|   }

Error: CPPCHECK_WARNING (CWE-457): [#def35]
llvm-project-20.1.3.src/llvm/include/llvm/Support/MathExtras.h:612: error[legacyUninitvar]: Uninitialized variable: Dummy
#  610|   SaturatingAdd(T X, T Y, bool *ResultOverflowed = nullptr) {
#  611|     bool Dummy;
#  612|->   bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy;
#  613|     // Hacker's Delight, p. 29
#  614|     T Z = X + Y;

Error: CPPCHECK_WARNING (CWE-457): [#def36]
llvm-project-20.1.3.src/llvm/include/llvm/Support/MathExtras.h:641: error[legacyUninitvar]: Uninitialized variable: Dummy
#  639|   SaturatingMultiply(T X, T Y, bool *ResultOverflowed = nullptr) {
#  640|     bool Dummy;
#  641|->   bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy;
#  642|   
#  643|     // Hacker's Delight, p. 30 has a different algorithm, but we don't use that

Error: CPPCHECK_WARNING (CWE-457): [#def37]
llvm-project-20.1.3.src/llvm/include/llvm/Support/MathExtras.h:687: error[legacyUninitvar]: Uninitialized variable: Dummy
#  685|   SaturatingMultiplyAdd(T X, T Y, T A, bool *ResultOverflowed = nullptr) {
#  686|     bool Dummy;
#  687|->   bool &Overflowed = ResultOverflowed ? *ResultOverflowed : Dummy;
#  688|   
#  689|     T Product = SaturatingMultiply(X, Y, &Overflowed);

Error: CPPCHECK_WARNING (CWE-758): [#def38]
llvm-project-20.1.3.src/llvm/lib/Demangle/MicrosoftDemangle.cpp:261: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
#  259|     const char F = MangledName.front();
#  260|     MangledName.remove_prefix(1);
#  261|->   switch (F) {
#  262|     case 'A':
#  263|       return std::make_pair(Q_None, PointerAffinity::Reference);

Error: CPPCHECK_WARNING (CWE-457): [#def39]
llvm-project-20.1.3.src/llvm/lib/Demangle/MicrosoftDemangle.cpp:1403: warning[uninitvar]: Uninitialized variable: StringBytes
# 1401|   
# 1402|       unsigned CharBytes =
# 1403|->         guessCharByteSize(StringBytes, BytesDecoded, StringByteSize);
# 1404|       assert(StringByteSize % CharBytes == 0);
# 1405|       switch (CharBytes) {

Error: CPPCHECK_WARNING (CWE-758): [#def40]
llvm-project-20.1.3.src/llvm/lib/Demangle/MicrosoftDemangle.cpp:1781: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
# 1779|     const char F = MangledName.front();
# 1780|     MangledName.remove_prefix(1);
# 1781|->   switch (F) {
# 1782|     case '0':
# 1783|       return StorageClass::PrivateStatic;

Error: CPPCHECK_WARNING (CWE-758): [#def41]
llvm-project-20.1.3.src/llvm/lib/Demangle/MicrosoftDemangle.cpp:2251: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
# 2249|       IsVariadic = true;
# 2250|       return NA;
# 2251|->   }
# 2252|   
# 2253|     DEMANGLE_UNREACHABLE;

Error: CLANG_WARNING: [#def42]
llvm-project-20.1.3.src/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp:53:20: warning: unused variable 'AddFnName' [-Wunused-variable]
#   53 | static const char *AddFnName = "__unw_add_find_dynamic_unwind_sections";
#      |                    ^~~~~~~~~
#   51|   namespace llvm::orc {
#   52|   
#   53|-> static const char *AddFnName = "__unw_add_find_dynamic_unwind_sections";
#   54|   [[maybe_unused]] static const char *RemoveFnName = "__unw_remove_find_dynamic_unwind_sections";
#   55|   static std::unique_ptr<UnwindInfoManager> Instance;

Error: CLANG_WARNING: [#def43]
llvm-project-20.1.3.src/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp:59:11: warning: variable 'Err' set but not used [-Wunused-but-set-variable]
#   59 |   if (int Err = RemoveFindDynamicUnwindSections((void *)&findSections)) {
#      |           ^
#   57|   
#   58|   UnwindInfoManager::~UnwindInfoManager() {
#   59|->   if (int Err = RemoveFindDynamicUnwindSections((void *)&findSections)) {
#   60|       LLVM_DEBUG({
#   61|         dbgs() << "Failed call to " << RemoveFnName << ": error = " << Err

Error: CPPCHECK_WARNING (CWE-457): [#def44]
llvm-project-20.1.3.src/llvm/lib/Support/BLAKE3/blake3.c:191: warning[uninitvar]: Uninitialized variable: chunks_array
#  189|     }
#  190|   
#  191|->   blake3_hash_many(chunks_array, chunks_array_len,
#  192|                      BLAKE3_CHUNK_LEN / BLAKE3_BLOCK_LEN, key, chunk_counter,
#  193|                      true, flags, CHUNK_START, CHUNK_END, out);

Error: CPPCHECK_WARNING (CWE-457): [#def45]
llvm-project-20.1.3.src/llvm/lib/Support/BLAKE3/blake3.c:234: warning[uninitvar]: Uninitialized variable: parents_array
#  232|     }
#  233|   
#  234|->   blake3_hash_many(parents_array, parents_array_len, 1, key,
#  235|                      0, // Parents always use counter 0.
#  236|                      false, flags | PARENT,

Error: CLANG_WARNING: [#def46]
llvm-project-20.1.3.src/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:4705:12: warning: unused variable 'Success' [-Wunused-variable]
# 4705 |       bool Success = maybeHandleSimpleNomemIntrinsic(I, /*trailingFlags=*/1);
#      |            ^~~~~~~
# 4703|         // Earlier variants do not have a trailing flag and are already handled
# 4704|         // by maybeHandleSimpleNomemIntrinsic(I, 0) via handleUnknownIntrinsic.
# 4705|->       bool Success = maybeHandleSimpleNomemIntrinsic(I, /*trailingFlags=*/1);
# 4706|         assert(Success);
# 4707|         break;

Error: UNICONTROL_WARNING (CWE-94): [#def47]
llvm-project-20.1.3.src/llvm/redhat-linux-build/tools/clang/tools/extra/docs/man/extraclangtools.1:13607: warning: bidirectional control characters: ['\u202e', '\u2066', '\u2069', '\u2066']
#13605|   int main() {
#13606|       bool isAdmin = false;
#13607|->     /*‮ } ⁦if (isAdmin)⁩ ⁦ begin admins only */
#13608|           std::cout << \(dqYou are an admin.\en\(dq;
#13609|       /* end admins only ‮ { ⁦*/

Error: UNICONTROL_WARNING (CWE-94): [#def48]
llvm-project-20.1.3.src/llvm/redhat-linux-build/tools/clang/tools/extra/docs/man/extraclangtools.1:13609: warning: bidirectional control characters: ['\u202e', '\u2066']
#13607|       /*‮ } ⁦if (isAdmin)⁩ ⁦ begin admins only */
#13608|           std::cout << \(dqYou are an admin.\en\(dq;
#13609|->     /* end admins only ‮ { ⁦*/
#13610|       return 0;
#13611|   }

Error: CPPCHECK_WARNING (CWE-682): [#def49]
llvm-project-20.1.3.src/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h:347: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  345|       offset = desc->offset;
#  346|       sizes = rank == 0 ? nullptr : desc->sizes;
#  347|->     strides = sizes + rank;
#  348|     }
#  349|   

Error: CPPCHECK_WARNING (CWE-664): [#def50]
llvm-project-20.1.3.src/mlir/include/mlir/ExecutionEngine/SparseTensor/COO.h:118: error[invalidContainer]: Using pointer to member variable 'coordinates' that may be invalid.
#  116|       // with the doubling rule should only incur an amortized linear overhead).
#  117|       const uint64_t *const newBase = coordinates.data();
#  118|->     if (newBase != base) {
#  119|         for (uint64_t i = 0, n = elements.size(); i < n; ++i)
#  120|           elements[i].coords = newBase + (elements[i].coords - base);

Error: CLANG_WARNING: [#def51]
llvm-project-20.1.3.src/mlir/lib/IR/BuiltinDialect.cpp:14: included_from: Included from here.
llvm-project-20.1.3.src/mlir/include/mlir/IR/BuiltinDialect.h:17: included_from: Included from here.
llvm-project-20.1.3.src/mlir/include/mlir/IR/Dialect.h:17: included_from: Included from here.
llvm-project-20.1.3.src/mlir/include/mlir/IR/OperationSupport.h:1000:27: warning: object backing the pointer this->propertiesDeleter will be destroyed at the end of the full-expression [-Wdangling-assignment-gsl]
# 1000 |       propertiesDeleter = [](OpaqueProperties prop) {
#      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1001 |         delete prop.as<const T *>();
#      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1002 |       };
#      |       ~
#  205 |   auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
#      |                      ^
#  998|         T *p = new T{};
#  999|         properties = p;
# 1000|->       propertiesDeleter = [](OpaqueProperties prop) {
# 1001|           delete prop.as<const T *>();
# 1002|         };

Error: CLANG_WARNING: [#def52]
llvm-project-20.1.3.src/mlir/lib/IR/BuiltinDialect.cpp:14: included_from: Included from here.
llvm-project-20.1.3.src/mlir/include/mlir/IR/BuiltinDialect.h:17: included_from: Included from here.
llvm-project-20.1.3.src/mlir/include/mlir/IR/Dialect.h:17: included_from: Included from here.
llvm-project-20.1.3.src/mlir/include/mlir/IR/OperationSupport.h:1003:26: warning: object backing the pointer this->propertiesSetter will be destroyed at the end of the full-expression [-Wdangling-assignment-gsl]
# 1003 |       propertiesSetter = [](OpaqueProperties new_prop,
#      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1004 |                             const OpaqueProperties prop) {
#      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1005 |         *new_prop.as<T *>() = *prop.as<const T *>();
#      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1006 |       };
#      |       ~
# 1001|           delete prop.as<const T *>();
# 1002|         };
# 1003|->       propertiesSetter = [](OpaqueProperties new_prop,
# 1004|                               const OpaqueProperties prop) {
# 1005|           *new_prop.as<T *>() = *prop.as<const T *>();

Error: CPPCHECK_WARNING (CWE-476): [#def53]
llvm-project-20.1.3.src/polly/lib/External/isl/imath/gmp_compat.c:365: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#  363|     /* Copy string to temporary storage so we can modify it below */
#  364|     str = malloc(strlen(s) + 1);
#  365|->   strcpy(str, s);
#  366|   
#  367|     /* Properly format the string as an int by terminating at the / */

Error: CPPCHECK_WARNING (CWE-476): [#def54]
llvm-project-20.1.3.src/polly/lib/External/isl/imath/gmp_compat.c:368: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: str
#  366|   
#  367|     /* Properly format the string as an int by terminating at the / */
#  368|->   slash = strchr(str, '/');
#  369|     if (slash) *slash = '\0';
#  370|   

Error: CPPCHECK_WARNING (CWE-401): [#def55]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_arg.c:983: error[memleakOnRealloc]: Common realloc mistake: 'list' nulled but not freed upon failure
#  981|   	char **list = *(char ***)(((char *) opt) + decl->offset);
#  982|   
#  983|-> 	list = realloc(list, (*n + 1) * sizeof(char *));
#  984|   	if (!list)
#  985|   		return -1;

Error: CPPCHECK_WARNING (CWE-562): [#def56]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_ast.c:1800: error[returnDanglingLifetime]: Returning pointer to local variable 'more' that will be invalid when returning.
# 1798|   		return NULL;
# 1799|   	if (!more)
# 1800|-> 		return node;
# 1801|   
# 1802|   	switch (node->type) {

Error: CPPCHECK_WARNING (CWE-457): [#def57]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_ast_codegen.c:2579: error[ctuuninitvar]: Using argument n that points at uninitialized variable n
# 2577|   {
# 2578|   	struct isl_find_unroll_data data =
# 2579|-> 			{ build, domain, depth, expansion, NULL, n, -1 };
# 2580|   	isl_basic_set *hull;
# 2581|   

Error: CPPCHECK_WARNING (CWE-476): [#def58]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_int_sioimath.c:214: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  212|   	buf = malloc(len);
#  213|   	mp_int_to_string(big, 10, buf, len);
#  214|-> 	fprintf(out, "%*s", width, buf);
#  215|   	free(buf);
#  216|   }

Error: CPPCHECK_WARNING (CWE-476): [#def59]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_int_sioimath.h:541: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  539|   	if (isl_sioimath_is_small(val)) {
#  540|   		result = malloc(12);
#  541|-> 		snprintf(result, 12, "%" PRIi32, isl_sioimath_get_small(val));
#  542|   		return result;
#  543|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def60]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_list_templ.c:682: error[ctunullpointer]: Null pointer dereference: list
#  680|   		goto error;
#  681|   	p = isl_printer_print_str(p, "(");
#  682|-> 	for (i = 0; i < list->n; ++i) {
#  683|   		if (i)
#  684|   			p = isl_printer_print_str(p, ",");

Error: CPPCHECK_WARNING (CWE-476): [#def61]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_local_space.c:1106: error[ctunullpointer]: Null pointer dereference: ls
# 1104|   	__isl_take isl_local_space *ls, int div)
# 1105|   {
# 1106|-> 	isl_ctx *ctx = ls->div->ctx;
# 1107|   	unsigned total = ls->div->n_col - 2;
# 1108|   

Error: CPPCHECK_WARNING (CWE-476): [#def62]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_local_space.c:1106: warning[nullPointer]: Possible null pointer dereference: ls
# 1104|   	__isl_take isl_local_space *ls, int div)
# 1105|   {
# 1106|-> 	isl_ctx *ctx = ls->div->ctx;
# 1107|   	unsigned total = ls->div->n_col - 2;
# 1108|   

Error: CPPCHECK_WARNING (CWE-476): [#def63]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_local_space.c:1107: warning[nullPointer]: Possible null pointer dereference: ls
# 1105|   {
# 1106|   	isl_ctx *ctx = ls->div->ctx;
# 1107|-> 	unsigned total = ls->div->n_col - 2;
# 1108|   
# 1109|   	isl_seq_gcd(ls->div->row[div] + 2, total, &ctx->normalize_gcd);

Error: CPPCHECK_WARNING (CWE-476): [#def64]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_local_space.c:1109: warning[nullPointer]: Possible null pointer dereference: ls
# 1107|   	unsigned total = ls->div->n_col - 2;
# 1108|   
# 1109|-> 	isl_seq_gcd(ls->div->row[div] + 2, total, &ctx->normalize_gcd);
# 1110|   	isl_int_gcd(ctx->normalize_gcd,
# 1111|   		    ctx->normalize_gcd, ls->div->row[div][0]);

Error: CPPCHECK_WARNING (CWE-476): [#def65]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_local_space.c:1110: warning[nullPointer]: Possible null pointer dereference: ls
# 1108|   
# 1109|   	isl_seq_gcd(ls->div->row[div] + 2, total, &ctx->normalize_gcd);
# 1110|-> 	isl_int_gcd(ctx->normalize_gcd,
# 1111|   		    ctx->normalize_gcd, ls->div->row[div][0]);
# 1112|   	if (isl_int_is_one(ctx->normalize_gcd))

Error: CPPCHECK_WARNING (CWE-457): [#def66]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_range.c:428: warning[uninitvar]: Uninitialized variable: data->poly
#  426|   	isl_bool is_cst;
#  427|   	isl_ctx *ctx;
#  428|-> 	isl_qpolynomial *save_poly = data->poly;
#  429|   	int save_monotonicity = data->monotonicity;
#  430|   	isl_size d;

Error: CPPCHECK_WARNING (CWE-476): [#def67]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_schedule_node.c:2495: error[ctunullpointer]: Null pointer dereference: pos
# 2493|   	if (!tree || !pos)
# 2494|   		goto error;
# 2495|-> 	if (pos->tree == tree) {
# 2496|   		isl_schedule_tree_free(tree);
# 2497|   		return pos;

Error: CPPCHECK_WARNING (CWE-457): [#def68]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_schedule_read.c:446: error[legacyUninitvar]: Uninitialized variable: tree
#  444|   	}
#  445|   
#  446|-> 	return tree;
#  447|   error:
#  448|   	isl_id_free(mark);

Error: CPPCHECK_WARNING (CWE-476): [#def69]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_tab_pip.c:229: error[ctunullpointer]: Null pointer dereference: dom
#  227|   		goto error;
#  228|   
#  229|-> 	partial = isl_alloc_type(dom->ctx, struct isl_partial_sol);
#  230|   	if (!partial)
#  231|   		goto error;

Error: CPPCHECK_WARNING (CWE-457): [#def70]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_test.c:8024: warning[uninitvar]: Uninitialized variable: equal
# 8022|   	isl_vertex_free(vertex);
# 8023|   
# 8024|-> 	if (equal < 0)
# 8025|   		return isl_stat_error;
# 8026|   

Error: CPPCHECK_WARNING (CWE-457): [#def71]
llvm-project-20.1.3.src/polly/lib/External/isl/isl_union_multi.c:70: error[ctuuninitvar]: Using argument user that points at uninitialized variable single
#   68|   	void *user)
#   69|   {
#   70|-> 	S(UNION,foreach_group_data) data = { fn, user };
#   71|   
#   72|   	if (!u)

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-176.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namellvm-20.1.3-1.fc43
store-results-to/tmp/tmp69xyo3ee/llvm-20.1.3-1.fc43.tar.xz
time-created2025-04-25 18:56:29
time-finished2025-04-26 00:04:26
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp69xyo3ee/llvm-20.1.3-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp69xyo3ee/llvm-20.1.3-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9