Eric Tsai via llvm-dev
2021-Oct-05 23:02 UTC
[llvm-dev] [RFC] Making .eh_frame more linker-friendly
Hi, I recently encountered a situation related to this. I think the issue is more severe than Rui Ueyama has found. The test case is in Plumhall_lvs15a-LVS051/src/lvs15a/conform/t279.dir. The main module has std::ios_base::clear(std::_Iosb<int>::_Iostate, bool) and the linked library iostream.o(libstdc++11.a) has function with same name too. These two functions have minor difference due to optimization at different build time. So, the .text, .eh_frame and .gcc_except_table are not the same. Although there is only one copy of function std::ios_base::clear(std::_Iosb<int>::_Iostate, bool), the one in iostream.o has been discarded after linking, but there are two copies of .eh_frame and .gcc_except_table for std::ios_base::clear(std::_Iosb<int>::_Iostate, bool) in the executable. At run time, the wrong .eh_frame and .gcc_except_table are used to handle exception and then core dump happens. Regards, Eric Tsai -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211005/22791f6c/attachment.html>