gcc3.2.3 : exception caught, but still segment fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am using gcc3.2.3 as the compiler for my c++ code on Red Hat Linux Enterprise 3. I find that even an exception is caught, "Segment Fault" is still thrown out and program crashes.


 Here is my code,
int func0(){
  ...
  if (...some condition...){
    throw MyException();
  }
}

char* func(){
  try{
     ...
     func0();
  }
  catch (MyException& ){
     cout << "Hey catch exception" << endl;
     return NULL;
  }
}

In running the code, I can see that "Hey catch exception", and then "Segment Fault", it never returns to the caller of func().

 Is this a known problem?

Thanks.
 I wonder

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux