std::map 析构 SIGBUS

slowfastflow 2016-07-26 09:29:54
有一个 static std::map<int, const std::string> map;

在退出析构的时候产生了 SIGBUS:

#00 /lib/libstdc++.so.6 (std::string::_Rep::_M_dispose(std::allocator<char> const&)+56)
#01 /lib/libstdc++.so.6 (std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()+20)

stack info:

(std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()+24)
[heap]
[heap]
(std::_Rb_tree<int, std::pair<int const, std::string const>, std::_Select1st<std::pair<int const, std::string const> >, std::less<int>, std::allocator<std::pair<int const, std::string const> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, std::string const> >*)+26)
[heap]
[heap]
(std::_Rb_tree<int, std::pair<int const, std::string const>, std::_Select1st<std::pair<int const, std::string const> >, std::less<int>, std::allocator<std::pair<int const, std::string const> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, std::string const> >*)+16)
[heap]
[heap]
(std::_Rb_tree<int, std::pair<int const, std::string const>, std::_Select1st<std::pair<int const, std::string const> >, std::less<int>, std::allocator<std::pair<int const, std::string const> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, std::string const> >*)+16)
[heap]


请问这个怎么产生的原因,怎么重现?
...全文
235 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
slowfastflow 2016-08-29
  • 打赏
  • 举报
回复
引用 2 楼 u012137924 的回复:
http://blog.csdn.net/bigwhite20xx/article/details/1957436
看过这个帖子,这个没能重现。 与实际的更是相差甚远。估计哪里出现了越界或者泄露,没找到点。
山鹰1985 2016-08-03
  • 打赏
  • 举报
回复
引用 楼主 N_BenBird 的回复:
请问这个怎么产生的原因,怎么重现?
http://也谈'SIGBUS和SIGSEGV'

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧