On Wed, 20 Nov 2013, vijay nag wrote:
Hello gcc, I'm working on a big project consisting of both C && C++ libraries. The shared binary created out of these two libraries seems to be having trouble with the exceptions. Exception handler i.e catch() is not being dispatched by libstdc++ for some reason and the program is terminating with SIGABRT as a result of it. Static binary seems to be catching exceptions without any issues. Some amount of googling on this topic suggested me to use "-fexceptions" compiler switch but it didn't have any affect. Since static binary works even without "-fexceptions" I think the issue has nothing to do with "-fexceptions" compiler switch. Just before sigabrt I see these lines being printed by libstdc++. How do I debug this issue ? "terminate called after throwing an instance of 'ORBEM_AS_NotFound'
Are you running on Solaris (or maybe a BSD)? Does LD_PRELOAD=libgcc_s.so.1 (or maybe LD_PRELOAD=/path/to/libgcc_s.so.1) help?
-- Marc Glisse