Dear all, We are using gcc 5.4 to develop our projects. We have run into the following condition when we have used regex in our code(m_thumbnailNameRegex.assign("([0-9]{8}_[0-9]{6})");), it is very strange that during the process of regex in frame 23, it went into process of functional in frame 22. and how does it come that "repeated_field.h:887" of protobuf in frame 7, calls "new" in frame 6, this finally leads to crash <--------------------------------------------------------------------------- #0 0x0000007f850ae540 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x0000007f850afa10 in __GI_abort () at abort.c:89 #2 0x0000007f850e5d1c in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f85195e30 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x0000007f850ebae8 in malloc_printerr (action=<optimized out>, str=0x7f851963c0 "malloc(): memory corruption", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5007 #4 0x0000007f850eda88 in _int_malloc (av=av@entry=0x7f60000020, bytes=bytes@entry=104) at malloc.c:3475 #5 0x0000007f850ef74c in __GI___libc_malloc (bytes=bytes@entry=104) at malloc.c:2914 #6 0x0000007f85b85e84 in operator new (sz=104) at /home/user/Downloads/cross_compile_gcc/gcc-linara-5.4.0/libstdc++-v3/libsupc++/new_op.cc:50 #7 0x0000007f856d3f04 in google::protobuf::internal::RepeatedPtrFieldBase::Get<google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::TypeHandler> (index=<optimized out>, this=<optimized out>) at ../../../../prebuilt/agl_msm8996/protobuf/protobuf/include/google/protobuf/repeated_field.h:887 #8 google::protobuf::RepeatedPtrField<zros::dvr_transport::dvr::RecordFile>::G---Type <return> to continue, or q <return> to quit--- et (index=<optimized out>, this=<optimized out>) at ../../../../prebuilt/agl_msm8996/protobuf/protobuf/include/google/protobuf/repeated_field.h:1113 #9 zros::dvr_transport::dvr::RecordFiles::records (index=<optimized out>, this=<optimized out>) at ../../../../../.obj_dir_agl_msm8996/protobuf_cpp_out/zros/dvr_transport/dvr.pb.h:899 #10 zadas_dvr_ui_cfg::SetTablesTotalThumbnailInfo ( this=0x7f85c86278 <(anonymous namespace)::c_locale_impl>, dvrRecords=...) at zadas_dvr_ui_cfg.cpp:304 #11 0x0000007f856d4304 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose (this=0x7f602bf930) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/basic_string.h:179 #12 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string (this=0x7f602bf930, __in_chrg=<optimized out>) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/basic_string.h:544 #13 tagDvrThumbnailInfo::~tagDvrThumbnailInfo (this=0x7f602bf908, __in_chrg=<optimized out>) at zadas_dvr_def.h:115 #14 std::_Destroy<tagDvrThumbnailInfo> (__pointer=<optimized out>) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/stl_construct.h:93 ---Type <return> to continue, or q <return> to quit--- #15 std::_Destroy_aux<false>::__destroy<tagDvrThumbnailInfo*> ( __last=<optimized out>, __first=0x7f602bf908) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/stl_construct.h:103 #16 std::_Destroy<tagDvrThumbnailInfo*> (__last=<optimized out>, __first=<optimized out>) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/stl_construct.h:126 #17 std::_Destroy<tagDvrThumbnailInfo*, tagDvrThumbnailInfo> ( __last=0x7f70ffe370, __first=<optimized out>) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/stl_construct.h:151 #18 std::vector<tagDvrThumbnailInfo, std::allocator<tagDvrThumbnailInfo> >::~vector (this=0x1, __in_chrg=<optimized out>) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/stl_vector.h:424 #19 zadas_dvr_ui_cfg::SetTablesTotalThumbnailInfo (this= 0x421988 <zadas_ui::inst_init()+96>, dvrRecords=...) at zadas_dvr_ui_cfg.cpp:288 #20 0x0000007f856c5c54 in std::swap<std::_Any_data> (__b=..., __a=...) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/move.h:185 #21 std::function<bool (char)>::swap(std::function<bool (char)>&) (__x=..., ---Type <return> to continue, or q <return> to quit--- this=<optimized out>) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/functional:2160 #22 std::function<bool (char)>::function(std::function<bool (char)>&&) ( __x=<optimized out>, this=0x478) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/functional:2035 #23 std::__detail::_State<std::__cxx11::regex_traits<char> >::_State(std::__detail::_State<std::__cxx11::regex_traits<char> >&&) (this=0x458) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/regex_automaton.h:111 #24 __gnu_cxx::new_allocator<std::__detail::_State<std::__cxx11::regex_traits<char> > >::construct<std::__detail::_State<std::__cxx11::regex_traits<char> >, std::__detail::_State<std::__cxx11::regex_traits<char> > >(std::__detail::_State<std::__cxx11::regex_traits<char> >*, std::__detail::_State<std::__cxx11::regex_traits<char> >&&) (__p=0x458, this=0x7f602bf990) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/ext/new_allocator.h:120 #25 std::allocator_traits<std::allocator<std::__detail::_State<std::__cxx11::regex_traits<char> > > >::_S_construct<std::__detail::_State<std::__cxx11::regex_traits<char> >, std::__detail::_State<std::__cxx11::regex_traits<char> > >(std::allocator<std::__detail::_State<std::__cxx11::regex_traits<char> > >&, std::__detail::_State<std::__cxx11::regex_traits<char> >*, std::__detail::_State<std::---Type <return> to continue, or q <return> to quit--- __cxx11::regex_traits<char> >&&) (__p=0x458, __a=...) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/alloc_traits.h:256 #26 std::allocator_traits<std::allocator<std::__detail::_State<std::__cxx11::regex_traits<char> > > >::construct<std::__detail::_State<std::__cxx11::regex_traits<char> >, std::__detail::_State<std::__cxx11::regex_traits<char> > >(std::allocator<std::__detail::_State<std::__cxx11::regex_traits<char> > >&, std::__detail::_State<std::__cxx11::regex_traits<char> >*, std::__detail::_State<std::__cxx11::regex_traits<char> >&&) (__p=0x458, __a=...) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/alloc_traits.h:402 #27 std::vector<std::__detail::_State<std::__cxx11::regex_traits<char> >, std::allocator<std::__detail::_State<std::__cxx11::regex_traits<char> > > >::emplace_back<std::__detail::_State<std::__cxx11::regex_traits<char> > >(std::__detail::_State<std::__cxx11::regex_traits<char> >&&) (this=0x7f602bf990) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/vector.tcc:96 #28 std::vector<std::__detail::_State<std::__cxx11::regex_traits<char> >, std::allocator<std::__detail::_State<std::__cxx11::regex_traits<char> > > >::push_back(std::__detail::_State<std::__cxx11::regex_traits<char> >&&) ( __x=<optimized out>, this=0x7f602bf990) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/stl_vector.h:932 ---Type <return> to continue, or q <return> to quit--- #29 std::__detail::_NFA<std::__cxx11::regex_traits<char> >::_M_insert_state ( __s=..., this=0x7f602bf958) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/regex_automaton.h:263 #30 std::__detail::_StateSeq<std::__cxx11::regex_traits<char> >::_M_clone ( this=0x7f602bf1b0) at ../../../../../platform/linux/agl_common/include/c++/5.3.0/bits/regex_automaton.tcc:201 #31 0x00000000004256a4 in zadas_app_gui::createGuiLayer<zadas_dvr_pic_gui_layer> (this=0x7f602c2770) at ../ui_base/zadas_app_gui.h:108 #32 zadas_dvr_pic_gui::zadas_dvr_pic_gui (parent=0x7f602c26e0, vp=<optimized out>, this=0x7f602c2770) at ../dvr_ui/zadas_dvr_pic_gui.h:14 ---------------------------------------------------------> It would be very appreciate if you have clue on this problem, thankds! By the way, I recompile stdc++ library from source with modification to delete exception catch in stdc++ as Jonathan Wakely suggested in "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55917".