Exception handling works fine however on SUSE / GCC 4.2--- trunk/rts/lib/lua/include/luaconf.h 2008-11-16 15:42:39 UTC (rev 7052)
+++ trunk/rts/lib/lua/include/luaconf.h 2008-11-16 16:57:26 UTC (rev 7053)
@@ -615,7 +615,7 @@
** compiling as C++ code, with _longjmp/_setjmp when asked to use them,
** and with longjmp/setjmp otherwise.
*/
-#if defined(__cplusplus)
+#if defined(__cplusplus) && !(defined(__GNUC__) && (__GNUC__ == 4)) // FIXME: Some bug in GCC 4.2, 4.3, ... makes try/catch crash
/* C++ exceptions */
#define LUAI_THROW(L,c) throw(c)
#define LUAI_TRY(L,c,a) try { a } catch(...) \
What are details of this crash? stacktrace? test case? Link to GCC bug report?
Are we 100% sure that using longjmp/setjmp AND exception handling works correctly together? Do destructors get called when longjmp'ing out of functions? (Hint: No, they don't.) If not, are we sure the crash isn't just memory corruption that shows up in some destructor?