id summary reporter owner description type status milestone component version severity resolution keywords cc 12577 Null reference in pair.hpp triggers runtime warning with -fsanitize=undefined antoinep92@… Ion Gaztañaga "I tagged 1.62 which is where I discovered the issue, but master at github seems affected as well. Consider this minimal file: {{{ #include int main() { return 0; } }}} When built with gcc 6.2 and undefined sanitizers, `g++ -fsanitize=address`, the resulting executable triggers the following warning at runtime during static initialization: {{{ /usr/include/boost/container/detail/pair.hpp:85:30: runtime error: reference binding to null pointer of type 'const struct piecewise_construct_t' }}} This doesn't happen with clang 3.9, so it *might* be a bug in gcc, but when looking at the boost code, I'd say gcc is right. Indeed, in `container/detail/pair.hpp` (line 85 in 1.62 and master), the static global variable `boost::container::piecewise_construct` is defined, of type `const std::piecewise_construct_t &`, and value `*boost::container::std_piecewise_construct_holder<0>::dummy`, defined in the same file, but (as far as I can tell), uninitialized. I'm not well positioned to assess the bug severity: either the null/uninitialized reference is never used, and the gcc warning can be ignored (although it's annoying); or there are situations the reference's address is dereferenced, and this can lead to crashes." Bugs closed To Be Determined container Boost 1.62.0 Problem fixed