jeudi 22 mars 2018

GLIBCXX_FORCE_NEW=1 causing binary failure with std::basic_string

I am using a binary which is linked to the object built against the older libraries which are still using the cached allocations. As the GLIBCXX_FORCE_NEW is set in the running environment the binary is failing with below error.

(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

How can I come over this problem without changing the older libraries. Setting the GLIBCXX_FORCE_NEW=0 is not helping at all.

Thanks.

Aucun commentaire:

Enregistrer un commentaire