* tests/exceptions.at (main.cpp:exceptions_in_module):
Move dlclose outside catch block; otherwise __cxa_end_catch
(part of the cygwin g++ ABI) accesses pointers to data inside
unloaded DLL. This is a platform ABI-specific bug, but is
likely common to many platforms' g++ and/or other C++
compilers.
Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
+2010-06-19 Charles Wilson <libtool@cwilson.fastmail.fm>
+
+ [cygwin] Fix segfault in C++ exception handling test
+ * tests/exceptions.at (main.cpp:exceptions_in_module):
+ Move dlclose outside catch block; otherwise __cxa_end_catch
+ (part of the cygwin g++ ABI) accesses pointers to data inside
+ unloaded DLL. This is a platform ABI-specific bug, but is
+ likely common to many platforms' g++ and/or other C++
+ compilers.
+
2010-06-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix srcdir computation for manual runs of old tests.
return 1;
}
+ bool exception_caught = false;
try {
(*pf) ();
}
catch (modexc e) {
std::cerr << "caught: " << e.what () << '\n';
+ exception_caught = true;
+ }
+
+ if (exception_caught)
+ {
if (lt_dlclose (handle))
{
std::cerr << "dlclose failed: " << lt_dlerror () << '\n';