Re: -fsanitize=nonnull-attribute failing on empty container

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 May 2015 at 19:16, Lars Gullik Bjønnes <larsbj@xxxxxxxxxx> wrote:
> Yes, I could have posted the backtrace as well:
>
> #0  __ubsan::__ubsan_handle_nonnull_arg_abort (Data=0x65cf6a00)
>    at ../../../../../gcc/libsanitizer/ubsan/ubsan_handlers.cc:408
> #1  0x5d74e3dc in equal<unsigned int> (__first2=<optimized out>,
> __last1=<optimized out>,
>    __first1=<optimized out>) at
> /opt/gcc/gcc-5/include/c++/5.1.1/bits/stl_algobase.h:825
> #2  __equal_aux<unsigned int const*, unsigned int const*>
> (__first2=<optimized out>,
>    __last1=<optimized out>, __first1=<optimized out>)
>    at /opt/gcc/gcc-5/include/c++/5.1.1/bits/stl_algobase.h:842
> #3  equal<__gnu_cxx::__normal_iterator<unsigned int const*,
> std::vector<unsigned int> >, __gnu_cxx::_
> _normal_iterator<unsigned int const*, std::vector<unsigned int> > >
> (__first2=..., __last1=...,
>    __first1=...) at /opt/gcc/gcc-5/include/c++/5.1.1/bits/stl_algobase.h:1063
> #4  operator==<unsigned int, std::allocator<unsigned int> > (__y=..., __x=...)
>    at /opt/gcc/gcc-5/include/c++/5.1.1/bits/stl_vector.h:1513
> ...
>
>  template<>
>     struct __equal<true>
>     {
>       template<typename _Tp>
>         static bool
>         equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
>         {
>           return !__builtin_memcmp(__first1, __first2, sizeof(_Tp)
>                                                 * (__last1 - __first1));
>         }
>     };
>
> is seemingly where it ends up.

Yeah, I'll commit a fix shortly, thanks.

And I'm definitely going to make it possible to run the testsuite with
the sanitizers!





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux