From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27370 invoked by alias); 20 Nov 2013 12:06:24 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 27359 invoked by uid 89); 20 Nov 2013 12:06:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-ob0-f181.google.com Received: from Unknown (HELO mail-ob0-f181.google.com) (209.85.214.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 20 Nov 2013 12:06:22 +0000 Received: by mail-ob0-f181.google.com with SMTP id uy5so2115878obc.12 for ; Wed, 20 Nov 2013 04:06:14 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.213.166 with SMTP id nt6mr195831obc.53.1384949174471; Wed, 20 Nov 2013 04:06:14 -0800 (PST) Received: by 10.182.105.69 with HTTP; Wed, 20 Nov 2013 04:06:14 -0800 (PST) Date: Wed, 20 Nov 2013 12:49:00 -0000 Message-ID: Subject: RE: C++ exceptions From: vijay nag To: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00144.txt.bz2 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' 0xffffe524 in __kernel_vsyscall () (gdb) bt #0 0xffffe524 in __kernel_vsyscall () #1 0xb7d55a40 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #2 0xb7d57203 in __GI_abort () at abort.c:90 #3 0xb7f42195 in __gnu_cxx::__verbose_terminate_handler () at ../../../../../gcc/libstdc++-v3/libsupc++/vterminate.cc:95 #4 0xb7f3feb5 in __cxxabiv1::__terminate (handler=0xb7f42050 <__gnu_cxx::__verbose_terminate_handler()>) at ../../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:40 #5 0xb7f3fef2 in std::terminate () at ../../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:50 #6 0xb7f401ae in __cxxabiv1::__cxa_throw (obj=0x16887c70, tinfo=0xc860434 , dest=0x9cea50 ) at ../../../../../gcc/libstdc++-v3/libsupc++/eh_throw.cc:83 #7 0x009a6145 in Config_Manager::Get_Client (this=this@entry=0x168e8750, asId=...) at orbs/server/Config_Manager.cpp:421 #8 0x009a6500 in Config_Manager::Add_Mod_Client (this=0x168e8750, asId=..., asPasswd=...) at orbs/server/Config_Manager.cpp:514 #9 0x009af26a in set_config (orbs_data=orbs_data@entry=0x168b3ca8, config_req=config_req@entry=0x16b42148, rsp=rsp@entry=0xbfffd0f8) at orbs/server/ORBEM_Server.cpp:1248 #10 0x009b0685 in orbs_config_req_handler (h=0x16875f60, data=0x168b3ca8) at orbs/orbs.cpp:821