This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/13391] AIX: crash on throw/catch between shared objects
- From: "ddurham_gcc_bz at davyandbeth dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Dec 2003 23:48:15 -0000
- Subject: [Bug target/13391] AIX: crash on throw/catch between shared objects
- References: <20031212191310.13391.greed@pobox.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ddurham_gcc_bz at davyandbeth dot com 2003-12-23 23:48 -------
Hi,
I'm experiencing this too... Except I've discovered it doesn't have anything
to do with shared libs...
I'm using gcc-3.3.2 on AIX 4.3.3.0
Try this:
---- main.cpp ----
#include <stdexcept>
extern void foo();
int bogus;
int main()
{
try
{
foo();
}
catch(std::exception &e)
{
}
catch(...)
{
}
return 0;
}
---- foo.cpp ----
#include <stdexcept>
int bogus;
void foo()
{
throw std::runtime_error("test");
}
---- now compile it with:
g++ main.cpp foo.cpp
You may need to add "-Xlinker --allow-multiple-definition" if you're using GNU's ld.
For me, a.out will produce
IOT/Abort trap (core dumped)
Now comment out the definition of bogus() in either source file. Then I get no
problem. I never use bogus.. it's just if it's there, then the problem exists.
The same think will occur if you make 'bogus' not an int but a function. I
guess it's just that if there are any duplicate symbols the problem occurs.
I really need to get this resolved. Please let me know if you find out anything.
Thanks,
Davy
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13391