免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3034 | 回复: 0
打印 上一主题 下一主题

关于std::string在solaris 10下有时析构coredump? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-22 17:07 |只看该作者 |倒序浏览
我实现了一个打印日志的CDebugKit对象,以动态库方式提供。但是在solaris 10经常发生在std::string在析构中__unLink()时core掉,麻烦大家帮忙分析看看


操作系统为:Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

出问题栈信息如下:

ff0a4180 void std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__unLink() (1ca3134, 8041, f3d2c0, 1ca3138, 1ca3138, 0) + 80
ff0a06fc exam::CDebugKit::~CDebugKit #Nvariant 1() (1ca3130, ff000000, 0, ff000000, 1ca3134, 1ca313 + 4c
f996dfdc CEmlDevDisplayTask::~CEmlDevDisplayTask() (1ca3070, 1000, fd1e8bc0, fc1ab400, 2110d78, 0) + 34
f9974a80 __SLIP.DELETER__O (1ca3070, 1, f3dfbac4, 22c7fb8, 22c7fb8, 0) + 30
feffbb68 void iMapTaskMgr::RemoveTask(iMapTask*) (2110cb8, 1ca3070, 0, 1, 1, 17f) + 2c0
feff9cd0 int iMapTaskMgr::svc() (2110cb8, 2110cb8, 1d5f980, 0, 0, 1ca3070) + 448
fe6d4a28 void*ACE_Task_Base::svc_run(void*) (2110cb8, 1, 0, 0, 30, 2110cb + b0
fe6d53cc void*ACE_Thread_Adapter::invoke_i() (214aa88, 51050, 214aa88, fe6d4978, 2110cb8, 0) + bc
fe6d52bc void*ACE_Thread_Adapter::invoke() (214aa88, 0, 51050, 214aa88, 0, 20e7990) + e4
fe5eb744 ace_thread_adapter (214aa88, f3dfc000, 0, 0, fe5eb708, 214aa8 + 3c
fd1bc400 _lwp_start (0, 0, 0, 0, 0, 0)

类申明:
CDebugKit
{
private:
        std::string                m_strModule;                        //模块名
        std::string                m_strSubmodule;                        //子模块名
        std::string                m_strSwitch;
               
    iMapDebugSubModInfo* m_pDebugSubModInfo;
public:
        CDebugKit(const std::string& module,const std::string& subModule = "GLOBAL";
        ~CDebugKit();
   ....
private:
        void GetOutputString(const std::string& strMsg,const std::string& id,std::string& strOut);
}
====================================================================================================================================
析构函数:
CDebugKit::~CDebugKit()
{
}
构造函数:
CDebugKit::CDebugKit(const std::string& module,const std::string& subModule):
        m_strModule(module),
        m_strSubmodule(subModule),
    m_strSwitch(module + "_" + subModule),
    m_pDebugSubModInfo(NULL)
{
    ......
}


void CDebugKit::GetOutputString(const std::string& strMsg,const std::string& id,std::string& strOut)
{
        strOut = id + " " + m_strModule + " " + m_strSubmodule + " : " + strMsg;
}

另外还有一个std::sting::__sun_concat也有时侯也会core掉,栈信息如下

fef13540 std::basic_string<char,std::char_traits<char>,std::allocator<char> >std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__sun_concat(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&const (f580606c, f5806078, 0, 7efefeff, 81010100, 4f) + 1c
fdf13284 void exam::CDebugKit::GetOutputString(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,std::basic_string<char,std::char_traits<char>,std::allocator<char> >& (0, f58066e4, f58060e8, f58060f0, f58060f0, f58060ef) + 7c
fdf12728 void exam::CDebugKit::Info(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >& (0, f58066e4, f58066e3, f5806574, 0, 0) + 68
0037a5b4 bool CTaskManualMender::ExecuteMend(int,int,const RWDateTime&,const RWDateTime&,std::vector<CMendDateTime,std::allocator<CMendDateTime> >& (28b87b8, 491001, 14, 28b87c8, 28b87d0, f5806ea + 11f4
0037938c bool CTaskManualMender::ExecuteMend(std::vector<CMendDateTime,std::allocator<CMendDateTime> >& (28b87b8, f5806ea8, fef58f18, 14, f5806e68, f5806e60) + 44
0037d1f8 bool CManualMender::ManualMendByTask(int,int,const RWDateTime&,const RWDateTime&,std::vector<CMendDateTime,std::allocator<CMendDateTime> >& (2070e58, 491001, 14, f5806e68, f5806e60, f5806ea + 158
0037c5ec bool CManualMender::ManualMendByDevice(int,const RWDateTime&,const RWDateTime&,std::vector<CMendDateTime,std::allocator<CMendDateTime> >& (2070e58, 491001, f5806e68, f5806e60, f5806ea8, 0) + 4cc
0037b63c bool CManualMender::ExecuteMend(int,int,const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,const TaskIdList&,const RWDateTime&,const RWDateTime&,std::vector<CMendDateTime,std::allocator<CMendDateTime> >& (2070e58, 0, 491001, f5806e98, f5806e7c, f5806e6 + 544
0037efa0 bool CManualMenderManager::AddManualMender(DIExecute,int& (287e1e8, f58073cc, f5807414, f58073dc, f58073d8, f58073d + 450
002bba5c void CExecuteDataMendTask::iMapTaskCmdRecv(CmdMSG*) (28b31e8, 20403a0, 0, 20403a0, 0, 0) + 23c
fe776e24 void iMapTask::RecvRequMsg(CmdMSG*) (28b31e8, 20403a0, 1, 7c8d, 0, 0) + 74
fe776ae4 void iMapTask::RecvMsg(CmdMSG*) (28b31e8, 20403a0, 0, 0, 0, f5807884) + c4
fe78ff8c int iMapTaskMgr::svc() (2765a00, 2765a00, 27bfa10, 0, 20403a0, 28b31e + 39c
ff28bc30 void*ACE_Task_Base::svc_run(void*) (2765a00, 1, 0, 0, 56, 2765a00) + b0
ff1b1cbc void*ACE_Thread_Adapter::invoke_i() (27691f0, 1a2d4b0, 27691f0, ff28bb80,
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP