-fsanitize=nonnull-attribute failing on empty container

Lars Gullik Bjønnes larsbj@gullik.org
Mon Jun 8 18:22:00 GMT 2015


I wonder if this is another in the same vein:

#0  __ubsan::__ubsan_handle_nonnull_arg_abort (Data=0x555555edbfe0)
   at ../../../../gcc/libsanitizer/ubsan/ubsan_handlers.cc:408
#1  0x000055555593e397 in void std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone
.isra.75] ()

I don't have a proper test case for it yet, I get it via some
boost::regex stuff.

Will look harder at it.

This is the sanitizer message:

host-gcc-5.1.1-2ed068d-x86_64-linux-1/include/c++/5.1.1/bits/char_traits.h:275:73:
runtime error: null pointer passed as argument 2, which is declared to
never be null

I'll continue investigation.

-- 
        Lgb



More information about the Gcc-help mailing list