abseil-cpp-20240116.2-2.fc41

List of Defects

Error: CLANG_WARNING: [#def1]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/base/internal/low_level_alloc.cc:164:42: warning[core.NullDereference]: Array access (via field 'next') results in an undefined pointer dereference
#  162|       prev[level] = p;
#  163|     }
#  164|->   return (head->levels == 0) ? nullptr : prev[0]->next[0];
#  165|   }
#  166|   

Error: CLANG_WARNING: [#def2]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/base/internal/low_level_alloc.cc:189:37: warning[core.NullDereference]: Array access (via field 'next') results in an undefined pointer dereference
#  187|     AllocList *found = LLA_SkiplistSearch(head, e, prev);
#  188|     ABSL_RAW_CHECK(e == found, "element not in freelist");
#  189|->   for (int i = 0; i != e->levels && prev[i]->next[i] == e; i++) {
#  190|       prev[i]->next[i] = e->next[i];
#  191|     }

Error: CLANG_WARNING: [#def3]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/container/internal/hash_policy_testing_test.cc:33:16: warning[cplusplus.Move]: Method called on moved-from object 'h2'
#   31|     StatefulTestingHash h2m(std::move(h2));
#   32|     EXPECT_EQ(2, h2m.id());
#   33|->   EXPECT_EQ(0, h2.id());
#   34|     StatefulTestingHash h3;
#   35|     EXPECT_EQ(3, h3.id());

Error: COMPILER_WARNING (CWE-457): [#def4]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/container/internal/raw_hash_set.h:1973:56: warning[-Wmaybe-uninitialized]: ‘D.969464.D.419173.slot_’ may be used uninitialized
# 1973 |       AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
#      |                                                      ~~^~~~~
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/container/internal/raw_hash_set.h: scope_hint: In member function ‘absl::lts_20240116::container_internal::(anonymous namespace)::Table_EraseBeginEndResetsReservedGrowth_Test::TestBody()’
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/container/internal/raw_hash_set.h:2551:34: note: ‘<anonymous>’ declared here
# 2551 |     if (first == begin() && last == end()) {
#      |                             ~~~~~^~~~~~~~
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may have been intended to silence earlier diagnostics
# 1971|         AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
# 1972|         AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
# 1973|->       AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
# 1974|                             a.generation_ptr(), b.generation_ptr());
# 1975|         return a.ctrl_ == b.ctrl_;

Error: CLANG_WARNING: [#def5]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/debugging/stacktrace_test.cc:37:3: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'buffer' is still referred to by the static variable 'sink' upon returning to the caller.  This will be a dangling reference
#   35|     char buffer[1 << 20];
#   36|     Unwind(buffer);
#   37|->   ABSL_BLOCK_TAIL_CALL_OPTIMIZATION();
#   38|   }
#   39|   

Error: COMPILER_WARNING: [#def6]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/flags/flag_test.cc:45:1: warning[-Wodr]: ‘FLAGS_mistyped_int_flag’ violates the C++ One Definition Rule
#   45 | ABSL_DECLARE_FLAG(int64_t, mistyped_int_flag);
#      | ^
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/flags/flag_test_defs.cc:21:1: note: type name ‘absl::lts_20240116::flags_internal::Flag<int>’ should match type name ‘absl::lts_20240116::flags_internal::Flag<long>’
#   21 | ABSL_FLAG(int, mistyped_int_flag, 0, "");
#      | ^
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/flags/flag_test_defs.cc:21:1: note: ‘FLAGS_mistyped_int_flag’ was previously declared here
#   43|   #include "absl/time/time.h"
#   44|   
#   45|-> ABSL_DECLARE_FLAG(int64_t, mistyped_int_flag);
#   46|   ABSL_DECLARE_FLAG(std::vector<std::string>, mistyped_string_flag);
#   47|   

Error: COMPILER_WARNING: [#def7]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/flags/flag_test.cc:46:1: warning[-Wodr]: ‘FLAGS_mistyped_string_flag’ violates the C++ One Definition Rule
#   46 | ABSL_DECLARE_FLAG(std::vector<std::string>, mistyped_string_flag);
#      | ^
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/flags/flag_test_defs.cc:22:1: note: type name ‘absl::lts_20240116::flags_internal::Flag<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >’ should match type name ‘absl::lts_20240116::flags_internal::Flag<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >’
#   22 | ABSL_FLAG(std::string, mistyped_string_flag, "", "");
#      | ^
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/flags/flag_test_defs.cc:22:1: note: ‘FLAGS_mistyped_string_flag’ was previously declared here
#   44|   
#   45|   ABSL_DECLARE_FLAG(int64_t, mistyped_int_flag);
#   46|-> ABSL_DECLARE_FLAG(std::vector<std::string>, mistyped_string_flag);
#   47|   
#   48|   namespace {

Error: CLANG_WARNING: [#def8]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/functional/overload_test.cc:60:8: warning[deadcode.DeadStores]: Value stored to 'overloaded' during its initialization is never read
#   58|   
#   59|   TEST(OverloadTest, SupportsConstantEvaluation) {
#   60|->   auto overloaded = absl::Overload(                 //
#   61|         [](int a) { return a + 1; },                  //
#   62|         [](int a, int b) { return a * b; },           //

Error: CLANG_WARNING: [#def9]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/functional/overload_test.cc:82:8: warning[deadcode.DeadStores]: Value stored to 'overloaded' during its initialization is never read
#   80|   
#   81|   TEST(OverloadTest, AmbiguousWithDefaultsNotInvocable) {
#   82|->   auto overloaded = absl::Overload(            //
#   83|         [](int a, int b = 5) { return a * b; },  //
#   84|         [](int c) { return c; }                  //

Error: CLANG_WARNING: [#def10]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/functional/overload_test.cc:91:8: warning[deadcode.DeadStores]: Value stored to 'overloaded' during its initialization is never read
#   89|   
#   90|   TEST(OverloadTest, AmbiguousDuplicatesNotInvocable) {
#   91|->   auto overloaded = absl::Overload(  //
#   92|         [](int a) { return a; },       //
#   93|         [](int c) { return c; }        //

Error: CLANG_WARNING: [#def11]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/functional/overload_test.cc:99:8: warning[deadcode.DeadStores]: Value stored to 'overloaded' during its initialization is never read
#   97|   
#   98|   TEST(OverloadTest, AmbiguousConversionNotInvocable) {
#   99|->   auto overloaded = absl::Overload(  //
#  100|         [](uint16_t a) { return a; },  //
#  101|         [](uint64_t c) { return c; }   //

Error: CLANG_WARNING: [#def12]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/functional/overload_test.cc:107:8: warning[deadcode.DeadStores]: Value stored to 'overloaded' during its initialization is never read
#  105|   
#  106|   TEST(OverloadTest, DispatchConsidersSfinae) {
#  107|->   auto overloaded = absl::Overload(                    //
#  108|         [](auto a) -> decltype(a + 1) { return a + 1; }  //
#  109|     );

Error: CLANG_WARNING: [#def13]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/charconv.cc:28: included_from: Included from here.
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/numeric/int128.h:924:46: warning[core.BitwiseShift]: Right operand is negative in right shift
#  922|   constexpr uint128 operator>>(uint128 lhs, int amount) {
#  923|   #ifdef ABSL_HAVE_INTRINSIC_INT128
#  924|->   return static_cast<unsigned __int128>(lhs) >> amount;
#  925|   #else
#  926|     // uint64_t shifts of >= 64 are undefined, so we will need some

Error: COMPILER_WARNING (CWE-457): [#def14]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/cord.cc:1495:14: warning[-Wmaybe-uninitialized]: ‘MEM[(struct Storage *)&indents].data_.inlined.inlined_data’ may be used uninitialized
# 1495 |       indent = indents.back();
#      |       ~~~~~~~^~~~~~~~~~~~~~~~
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/cord.cc: scope_hint: In function ‘absl::lts_20240116::ReportError(absl::lts_20240116::cord_internal::CordRep*, absl::lts_20240116::cord_internal::CordRep*)’
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/cord.cc:1455:48: note: ‘indents’ declared here
# 1455 |   absl::InlinedVector<int, kInlinedVectorSize> indents;
#      |                                                ^~~~~~~
# 1493|         rep = stack.back();
# 1494|         stack.pop_back();
# 1495|->       indent = indents.back();
# 1496|         indents.pop_back();
# 1497|       }

Error: CLANG_WARNING: [#def15]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_data_edge_test.cc:15: included_from: Included from here.
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_data_edge.h:40:10: warning[core.NullDereference]: Access to field 'tag' results in a dereference of a null pointer (loaded from variable 'edge')
#   38|     if (edge->tag == EXTERNAL || edge->tag >= FLAT) return true;
#   39|     if (edge->tag == SUBSTRING) edge = edge->substring()->child;
#   40|->   return edge->tag == EXTERNAL || edge->tag >= FLAT;
#   41|   }
#   42|   

Error: CLANG_WARNING: [#def16]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_rep_btree.cc:321:9: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  319|       if (depth != 0) {
#  320|         do {
#  321|->         CordRepBtree* node = stack[--depth];
#  322|           const bool owned = depth < share_depth;
#  323|           switch (result.action) {

Error: CLANG_WARNING: [#def17]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_rep_btree.cc:1205:5: warning[deadcode.DeadStores]: Value stored to 'rep' is never read
# 1203|         return result;
# 1204|       }
# 1205|->     rep = tree;
# 1206|       tree = stack[depth];
# 1207|     }

Error: COMPILER_WARNING: [#def18]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_rep_btree.h:294:57: warning[-Warray-bounds=]: array subscript ‘const struct CordRepBtree[0]’ is partly outside array bounds of ‘unsigned char[32]’
#  294 |   int height() const { return static_cast<int>(storage[0]); }
#      |                                                ~~~~~~~~~^
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_rep_flat.h:122:41: note: object of size 32 allocated by ‘operator new(unsigned long)’
#  122 |     void* const raw_rep = ::operator new(size);
#      |                           ~~~~~~~~~~~~~~^~~~~~
#  292|     // kMaxHeight. `height` is implemented as an `int` as in some places we
#  293|     // use negative (-1) values for 'data edges'.
#  294|->   int height() const { return static_cast<int>(storage[0]); }
#  295|   
#  296|     // Properties: begin, back, end, front/back boundary indexes.

Error: COMPILER_WARNING: [#def19]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_rep_btree.h:294:57: warning[-Warray-bounds=]: array subscript ‘const struct CordRepBtree[0]’ is partly outside array bounds of ‘unsigned char[56]’
#  294 |   int height() const { return static_cast<int>(storage[0]); }
#      |                                                ~~~~~~~~~^
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cord_rep_flat.h:122:41: note: object of size 56 allocated by ‘operator new(unsigned long)’
#  122 |     void* const raw_rep = ::operator new(size);
#      |                           ~~~~~~~~~~~~~~^~~~~~
#  292|     // kMaxHeight. `height` is implemented as an `int` as in some places we
#  293|     // use negative (-1) values for 'data edges'.
#  294|->   int height() const { return static_cast<int>(storage[0]); }
#  295|   
#  296|     // Properties: begin, back, end, front/back boundary indexes.

Error: CLANG_WARNING: [#def20]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cordz_info.cc:180:23: warning[core.CallAndMessage]: Called C++ object pointer is null
#  178|         statistics_.node_counts.substring++;
#  179|         memory_usage.Add(sizeof(CordRepSubstring), rep.refcount);
#  180|->       rep = rep.Child(rep.rep->substring()->child);
#  181|       }
#  182|   

Error: CLANG_WARNING: [#def21]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cordz_info.cc:185:21: warning[core.CallAndMessage]: Called C++ object pointer is null
#  183|       // Consume possible FLAT
#  184|       if (rep.tag() >= FLAT) {
#  185|->       size_t size = rep.rep->flat()->AllocatedSize();
#  186|         CountFlat(size);
#  187|         memory_usage.Add(size, rep.refcount);

Error: CLANG_WARNING: [#def22]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cordz_info.cc:195:21: warning[core.NullDereference]: Access to field 'length' results in a dereference of a null pointer (loaded from field 'rep')
#  193|         statistics_.node_count++;
#  194|         statistics_.node_counts.external++;
#  195|->       size_t size = rep.rep->length + sizeof(CordRepExternalImpl<intptr_t>);
#  196|         memory_usage.Add(size, rep.refcount);
#  197|         return RepRef{nullptr, 0};

Error: CLANG_WARNING: [#def23]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/cordz_info.cc:208:32: warning[core.CallAndMessage]: Called C++ object pointer is null
#  206|       statistics_.node_counts.btree++;
#  207|       memory_usage_.Add(sizeof(CordRepBtree), rep.refcount);
#  208|->     const CordRepBtree* tree = rep.rep->btree();
#  209|       if (tree->height() > 0) {
#  210|         for (CordRep* edge : tree->Edges()) {

Error: CLANG_WARNING: [#def24]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/escaping.cc:153:9: warning[deadcode.DeadStores]: Value stored to 'szdest' is never read
#  151|           cur_dest[1] = kPad64;
#  152|           cur_dest += 2;
#  153|->         szdest -= 2;
#  154|         }
#  155|         break;

Error: CLANG_WARNING: [#def25]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/escaping.cc:173:9: warning[deadcode.DeadStores]: Value stored to 'szdest' is never read
#  171|           cur_dest[0] = kPad64;
#  172|           cur_dest += 1;
#  173|->         szdest -= 1;
#  174|         }
#  175|         break;

Error: CLANG_WARNING: [#def26]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/escaping.cc:192:7: warning[deadcode.DeadStores]: Value stored to 'szdest' is never read
#  190|         cur_dest[3] = base64[in];
#  191|         cur_dest += 4;
#  192|->       szdest -= 4;
#  193|         break;
#  194|       }

Error: CLANG_WARNING: [#def27]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/str_format/float_conversion.cc:1170:19: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>' is a garbage value
# 1168|       // We look at the digit just past the end.
# 1169|       // There must be 'extra_digits' extra valid digits after end.
# 1170|->     if (*out->end > '5') return true;
# 1171|       if (*out->end < '5') return false;
# 1172|       if (has_leftover_value || std::any_of(out->end + 1, out->end + extra_digits,

Error: CLANG_WARNING: [#def28]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/str_format/float_conversion.cc:1392:25: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 1390|           // Have 1.23456, needs 0.00123456
# 1391|           // Move the first digit
# 1392|->         buffer.begin[1] = *buffer.begin;
# 1393|           // Add some zeros
# 1394|           for (; exp < -1; ++exp) *buffer.begin-- = '0';

Error: CLANG_WARNING: [#def29]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/strings/internal/str_format/output.cc:53:11: warning[unix.Errno]: An undefined value may be read from 'errno'
#   51|         v.remove_prefix(result);
#   52|       } else {
#   53|->       if (errno == EINTR) {
#   54|           continue;
#   55|         } else if (errno) {

Error: CLANG_WARNING: [#def30]
abseil-cpp-20240116.2-build/abseil-cpp-20240116.2/absl/time/internal/cctz/src/time_zone_format.cc:193:21: warning[deadcode.DeadStores]: Although the value stored to 'offset' is used in the enclosing expression, the value is never actually read from 'offset'
#  191|     const int seconds = offset % 60;
#  192|     const int minutes = (offset /= 60) % 60;
#  193|->   const int hours = offset /= 60;
#  194|     const char sep = mode[0];
#  195|     const bool ext = (sep != '\0' && mode[1] == '*');

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-212.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameabseil-cpp-20240116.2-2.fc41
store-results-to/tmp/tmpxsp9r7km/abseil-cpp-20240116.2-2.fc41.tar.xz
time-created2024-07-03 12:12:33
time-finished2024-07-03 12:29:08
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpxsp9r7km/abseil-cpp-20240116.2-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpxsp9r7km/abseil-cpp-20240116.2-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9