50c2df93a6
The recursive_init_error class is defined in a header, with an inline constructor, but the definition of the vtable and destructor are not exported from the shared library. With -fkeep-inline-functions the constructor gets emitted in user code, and requires the (non-exported) vtable. This fails to link. As far as I can tell, the recursive_init_error class definition was moved into <cxxabi.h> so it could be documented with Doxygen, not for any technical reason. But now it's there (and documented), somebody could be relying on it, by catching that type and possibly performing derived-to-base conversions to the std::exception base class. So the conservative fix is to leave the class definition in the header but make the constructor non-inline. This still allows the type to be caught and still defines its base class. User code can no longer construct objects of that type, but that's not something we need to support. PR libstdc++/51333 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define constructor inline. * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define constructor. * testsuite/18_support/51333.cc: New test. From-SVN: r273878 |
||
---|---|---|
.. | ||
aligned_alloc | ||
bad_alloc | ||
bad_cast | ||
bad_exception | ||
bad_typeid | ||
byte | ||
exception | ||
exception_ptr | ||
headers | ||
initializer_list | ||
launder | ||
max_align_t/requirements | ||
nested_exception | ||
numeric_limits | ||
quick_exit | ||
type_info | ||
uncaught_exception | ||
uncaught_exceptions | ||
50594.cc | ||
51333.cc | ||
cxa_vec.cc | ||
destroying_delete.cc | ||
free_eh_pool.cc | ||
new_aligned.cc | ||
new_delete_placement.cc | ||
new_handler.cc | ||
new_nothrow.cc | ||
pthread_guard.cc | ||
set_terminate.cc | ||
set_unexpected.cc | ||
terminate_handler.cc | ||
unexpected_handler.cc |