我的一个程序,其中一个类有一个static const std::vector<std::string>
的static
成员,在程序结束时__run_exit_handlers
里面出现该成员的析构错误。
gdb 错误信息如下:
#0 0x00007ffff6a426c3 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x000000000058e63d in std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (__pointer=0x99f1f0) at /usr/include/c++/5/bits/stl_construct.h:93
#2 0x000000000058dfcd in std::_Destroy_aux<false>::__destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (__first=0x99f1f0, __last=0x99f370)
at /usr/include/c++/5/bits/stl_construct.h:103
#3 0x000000000058d890 in std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (__first=0x99f1f0, __last=0x99f370)
at /usr/include/c++/5/bits/stl_construct.h:126
#4 0x000000000058cfd3 in std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (__first=0x99f1f0, __last=0x99f370) at /usr/include/c++/5/bits/stl_construct.h:151
#5 0x000000000058bf15 in std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~vector (this=0x8e6730 <expr_parser::Token::type_descriptions[abi:cxx11]>, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/stl_vector.h:424
#6 0x00007ffff5c34ff8 in __run_exit_handlers (status=0, listp=0x7ffff5fbf5f8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#7 0x00007ffff5c35045 in __GI_exit (status=<optimized out>) at exit.c:104
#8 0x00007ffff5c1b837 in __libc_start_main (main=0x577548 <main()>, argc=1, argv=0x7fffffffdd88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffdd78) at ../csu/libc-start.c:325
#9 0x00000000005773e9 in _start ()
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.