STL related seg fault in C++ std::string? -
does point when can below seg fault occur, below: - heap corruption - memory leak - flaw in stl implementation of strings
0xf0f1d672 in std::__default_alloc_template<true, 0>::allocate(unsigned int) () /usr/lib/libstdc++.so.5
to give context, stack trace below:
#0 0xf0f1d672 in std::__default_alloc_template<true, 0>::allocate(unsigned int) () /usr/lib/libstdc++.so.5 #1 0xf10bdae1 in std::__simple_alloc<std::_rb_tree_node<std::pair<std::string const, calculator*> >, std::__default_alloc_template<true, 0> >::allocate(unsigned int) () /export/work/install/lib/plugin.so
from stack trace appears you're creating dynamically loaded .so
plugin. if plugin interface uses heap allocation, must make sure same instance of runtime library used on both sides of plugin api boundary.
Comments
Post a Comment