GLIBCXX_FORCE_NEW = 1导致二进制失败,使用std :: basic_string <char,std :: char_traits <char =“”>,std :: allocator <char>&gt; :: basic_string错误

时间:2018-03-22 22:34:26

标签: c++ c++11 abi

我正在使用二进制文件,该二进制文件链接到针对仍在使用缓存分配的旧库构建的对象。由于GLIBCXX_FORCE_NEW在运行环境中设置,因此二进制文件失败并出现以下错误。

(gdb) bt
#0  0x00007f80a3f39495 in raise () from /lib64/libc.so.6
#1  0x00007f80a3f3ac75 in abort () from /lib64/libc.so.6
#2  0x00007f80a528a0d5 in __gnu_cxx::__verbose_terminate_handler() () 
from /opt/lib/libstdc++.so.6
#3  0x00007f80a5288166 in ?? () from /opt/lib/libstdc++.so.6
#4  0x00007f80a5288193 in std::terminate() () from 
/opt/lib/libstdc++.so.6
#5  0x00007f80a52883e6 in __cxa_throw () from /opt/lib/libstdc++.so.6
#6  0x00007f80a52e3262 in std::__throw_logic_error(char const*) () from 
/opt/lib/libstdc++.so.6
#7  0x00007f80a52ef6f1 in char* std::string::_S_construct<char const*>
(char const*, char const*, std::allocator<char> const&, 
std::forward_iterator_tag) ()
from /opt/lib/libstdc++.so.6
#8  0x00007f80a52efac8 in std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >::basic_string(char 
const*, std::allocator<char> const&) ()
from /opt/lib/libstdc++.so.6

如何在不更改旧库的情况下解决此问题。设置GLIBCXX_FORCE_NEW = 0根本没有帮助。

感谢。

0 个答案:

没有答案
相关问题