https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68073
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |trippels at gcc dot gnu.org Resolution|--- |INVALID --- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- This is due to the new small string optimization in libstdc++. It doesn't use the heap anymore for this case. Your code calls the string destructor directly: 202 template<typename T, typename... Types> 203 struct variant_helper<T, Types...> 204 { 205 VARIANT_INLINE static void destroy(const std::size_t id, void * data) 206 { 207 if (id == sizeof...(Types)) 208 { 209 reinterpret_cast<T*>(data)->~T(); 210 } #1 0x401a5c in mapnik::util::variant_helper<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>::destroy(unsigned long, void*) mapnik/include/mapnik/util/variant.hpp:209 So it will try to free an address that was never allocated.