LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-14-2006, 07:25 AM   #1
manikan
LQ Newbie
 
Registered: Feb 2006
Posts: 12

Rep: Reputation: 0
cxa_throw() exception unhandled in gcc


Hi all,

I am just facing issue in handling an exception a named cxa_throw() which calls abort() and finally my code coredumps due to SIGIOT signal.

There is some problem witht the libgcc library used by gcc complier.

Verison i used is: gcc-3.3 in AIX 4.33

For this exception there are no matchnig handlers written in the libgcc library i guess.I may not be sure.

Here is the small snippet which throws this kind of exception.

int main(int argc, char **argv)
{
int x = 0;

try {
throw new int;
x = 1;
}
catch (int *) {
x = 2;
}
return x;
}

The error i see is like below

ld: 0711-317 ERROR: Undefined symbol: std::cout
ld: 0711-317 ERROR: Undefined symbol: .std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
ld: 0711-317 ERROR: Undefined symbol: .operator new(unsigned long)
ld: 0711-317 ERROR: Undefined symbol: .__cxa_allocate_exception
ld: 0711-317 ERROR: Undefined symbol: typeinfo for char*
ld: 0711-317 ERROR: Undefined symbol: .__cxa_throw
ld: 0711-317 ERROR: Undefined symbol: .__cxa_begin_catch
ld: 0711-317 ERROR: Undefined symbol: .__cxa_end_catch
ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::Init[in-charge]()
ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::~Init [in-charge]()
ld: 0711-317 ERROR: Undefined symbol: __gxx_personality_v0
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status


Is there any to resolve this issue ?

Or else i need to handle the SIGIOT signal in the code.

Plz give ur suggestions

Mani
 
Old 04-14-2006, 08:09 AM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,352

Rep: Reputation: 129Reputation: 129
I'm not certain why you have throw new int; try throw; or throw x;

Also the error Undefined symbol: std::cout would indicate other problems with your code.
 
Old 04-14-2006, 08:21 AM   #3
manikan
LQ Newbie
 
Registered: Feb 2006
Posts: 12

Original Poster
Rep: Reputation: 0
The same happens when the throw statement is written as throw new char and catch as
catch(char *)

If anybody throws light on cxa_throw() exception that would be usefult to me.

Regards
Mani
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unhandled exception has occurred thinhla Fedora - Installation 1 06-02-2005 04:36 PM
wine: Unhandled exception, - any solution? crm Linux - Games 0 02-19-2005 08:59 AM
wine unhandled exception at 0012 darkleaf Linux - Games 0 12-06-2004 12:33 PM
Wine unhandled exception w/ Excel mi6alec Linux - Software 2 03-06-2004 04:00 PM
No games will start w/ winex: Unhandled Exception sboy Linux - Games 3 10-15-2003 10:41 AM


All times are GMT -5. The time now is 04:39 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration