2011-01-28 432 views
0
Program terminated with signal 11, Segmentation fault. 
#0 0x0000003663c70485 in malloc_consolidate() from /lib64/libc.so.6 
(gdb) bt 
#0 0x0000003663c70485 in malloc_consolidate() from /lib64/libc.so.6 
#1 0x0000003663c72a6c in _int_malloc() from /lib64/libc.so.6 
#2 0x0000003663c74cde in malloc() from /lib64/libc.so.6 
#3 0x0000003d364af4aa in operator new(unsigned long)() 
    **/linux2.6-glibc2.3-x86_64/lib64/libstdc++.so.6 
#4 0x0000003d364900ee in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&)() 
    from **/linux2.6-glibc2.3-x86_64/lib64/libstdc++.so.6 

的代码是:stringstream的运营商<<崩溃(malloc_consolidate)

... 
     if (logger->isEnabledFor(Level::ALL)) {\ 
      std::ostringstream oss; \ 
      oss << message; \ 
      logger->forcedLog(Level::ALL, oss.str(), __FILE__, __LINE__); \ 
     } \ 
... 

它说,ostringstream的操作< <不是重入的功能。是对的吗?

感谢

+2

'message`是什么? – Naveen 2011-01-28 07:22:11

回答

0

这应该是因为字符串流::运算< <是不可重入功能。