This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]