[Bug libstdc++/66327] New: -fsanitize=nonnull-attribute errors in stl_algobase.h

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 28 19:20:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66327

            Bug ID: 66327
           Summary: -fsanitize=nonnull-attribute errors in stl_algobase.h
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#include <vector>
#include <array>

int main()
{
   std::vector<unsigned> a;
   std::vector<unsigned> b;
   std::array<unsigned char, 0> aa, bb;
   a == b;
   a < b;
   aa == bb;
   aa < bb;
}

/home/jwakely/gcc/5.1.0/include/c++/5.1.0/bits/stl_algobase.h:825:28: runtime
error: null pointer passed as argument 1, which is declared to never be null
/home/jwakely/gcc/5.1.0/include/c++/5.1.0/bits/stl_algobase.h:825:28: runtime
error: null pointer passed as argument 2, which is declared to never be null
/home/jwakely/gcc/5.1.0/include/c++/5.1.0/bits/stl_algobase.h:825:28: runtime
error: null pointer passed as argument 1, which is declared to never be null
/home/jwakely/gcc/5.1.0/include/c++/5.1.0/bits/stl_algobase.h:825:28: runtime
error: null pointer passed as argument 2, which is declared to never be null
/home/jwakely/gcc/5.1.0/include/c++/5.1.0/bits/stl_algobase.h:931:31: runtime
error: null pointer passed as argument 1, which is declared to never be null
/home/jwakely/gcc/5.1.0/include/c++/5.1.0/bits/stl_algobase.h:931:31: runtime
error: null pointer passed as argument 2, which is declared to never be null



More information about the Gcc-bugs mailing list