Bug 87262 - Static Code Analysis Findings
Summary: Static Code Analysis Findings
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-09 15:43 UTC by Bubba Jones
Modified: 2018-09-10 11:05 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bubba Jones 2018-09-09 15:43:40 UTC
Dead Code - At Line: 377 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/basic_string.h
Memory Leak - At Line: 607 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/basic_string.tcc
Memory Leak - At Line: 1282 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/hashtable.h
Memory Leak - At Line: 1312 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/hashtable.h
Memory Leak - At Line: 1426 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/hashtable.h
Memory Leak - At Line: 496 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/hashtable_policy.h
Memory Leak - At Line: 522 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/hashtable_policy.h
Missing Check against Null - At Line: 139 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/locale_classes.tcc
Type Mismatch: Signed to Unsigned - At Line: 77 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/move.h
Poor Style: Redundant Initialization - At Line: 175 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/move.h
Use After Free - At Line: 743 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/shared_ptr_base.h
Type Mismatch: Signed to Unsigned - At Line: 1143 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_deque.h
Type Mismatch: Signed to Unsigned - At Line: 739 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_iterator.h
Memory Leak - At Line: 1553 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_list.h
Memory Leak - At Line: 1561 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_list.h
Type Mismatch: Signed to Unsigned - At Line: 874 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_list.h
Dead Code - At Line: 1586 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_list.h
Type Mismatch: Signed to Unsigned - At Line: 849 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_map.h
Type Mismatch: Signed to Unsigned - At Line: 645 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_set.h
Memory Leak - At Line: 659 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_tree.h
Memory Leak - At Line: 659 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_tree.h
Memory Leak - At Line: 997 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_tree.h
Memory Leak - At Line: 1147 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_vector.h
Memory Leak - At Line: 1147 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_vector.h
Type Mismatch: Signed to Unsigned - At Line: 1143 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_vector.h
Type Mismatch: Signed to Unsigned - At Line: 168 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_vector.h
Type Mismatch: Signed to Unsigned - At Line: 879 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/stl_vector.h
Memory Leak - At Line: 381 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/vector.tcc
Memory Leak - At Line: 381 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/vector.tcc
Memory Leak - At Line: 425 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/vector.tcc
Memory Leak - At Line: 514 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/vector.tcc
Memory Leak - At Line: 514 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/vector.tcc
Memory Leak - At Line: 565 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/vector.tcc
Dead Code - At Line: 69 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bits/vector.tcc
Dead Code - At Line: 1025 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bitset
Dead Code - At Line: 806 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/bitset
Dead Code - At Line: 102 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/ext/new_allocator.h
Format String - At Line: 95 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/ext/string_conversions.h
Portability Flaw - At Line: 89 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/ext/string_conversions.h
Uninitialized Variable - At Line: 77 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/ext/string_conversions.h
Path Manipulation - At Line: 540 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/fstream
Dead Code - At Line: 1938 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/functional
Dead Code - At Line: 1942 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/functional
Type Mismatch: Signed to Unsigned - At Line: 75 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/initializer_list
Dead Code - At Line: 435 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/ostream
Type Mismatch: Signed to Unsigned - At Line: 743 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/tuple
Out-of-Bounds Read: Off-by-One - At Line: 270 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/tuple
Code Correctness: Function Not Invoked - At Line: 251 of File: opt/buildtools-network/gcc-4.8.2/include/c++/4.8.2/x86_64-unknown-linux-gnu/bits/gthr-default.h
Comment 1 Marc Glisse 2018-09-09 15:48:36 UTC
4.8.2 belongs in a museum. If you want to perform some static analysis on trunk, you may find someone to look at the output, but with an old version I think you are wasting your time...
Comment 2 Jonathan Wakely 2018-09-10 11:05:44 UTC
I looked at a few of these and they're complete nonsense.

This is not a redundant initialization in std::swap:

      _Tp __tmp = _GLIBCXX_MOVE(__a);
      __a = _GLIBCXX_MOVE(__b);
      __b = _GLIBCXX_MOVE(__tmp);

And the memory leaks are not leaks.