Exception handler of RHEL4 isn't working after the integration ofboost Serialization code

G

girish574

After the integration of boost serialization code, the exceptions
are not at all getting caught in my application. Im building on RHEL4
kernel 2.6.9-42.ELsmp and gcc version is 4.0.2. The application
terminates when exception is thrown. Removing the serialization code
makes the exceptions getting caught.

The worst part is im not able to reproduce the scenario in a small
program.


Also i tried building the same application on suse8 machine. Even
with the boost serialization code exceptions are getting caught. Issue
is there only with RHEL4 build

Do anyone of you encountered this? Or can you point to any potential
mistake for which this can happen?
Is there any gcc flag that may help in this issue


Thank You
Girish
 
M

Martin York

Do anyone of you encountered this? Or can you point to any potential
mistake for which this can happen?
Is there any gcc flag that may help in this issue

One thought.

After an exception is thrown the stack is unwound.
During the unwinding the destructor of all stack objects is called.
If one of the destructors of these objects also throws an exception
then the application will terminate.

struct X
{
~X() {throw int(5);}
};

int main()
{
try
{
X a;
throw int(6);
}
catch(int e)
{
std::cout << "Cought\n"; // Never gets here.
}
std::cout << "Done\n";
}
 
G

girish574

Im having a simple scenario in my application
int x = 6;
try {
throw x;
}
catch(int p) {
cout << caught << endl;
}
This is not getting caught on RHEL4 + boost. But it does on suse8 +
boost
 
R

red floyd

Im having a simple scenario in my application
int x = 6;
try {
throw x;
}
catch(int p) {
cout << caught << endl;
}
This is not getting caught on RHEL4 + boost. But it does on suse8 +
boost

Sounds implementation specific. I suggest either an RHEL group, the
BOOST mailing list, or gnu.g++.help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top