-fno-exceptions, ffi, lua_error, and C++ exceptions

  • From: Dan Eloff <dan.eloff@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 27 Aug 2012 17:34:15 -0500

Sorry to flog the exceptions horse on this list again, but I've been
unable to find out what happens when embedding LuaJIT in a C++ program
compiled with exception support disabled (posix x64 with gcc with
-fno-exceptions)

Some things I do:

Call lua_error in c++ code. I *think* the places I do this don't have
leakable resources on the stack, but I'm curious if the stack would
actually be unwound and destructors called. Afaik this is the LuaJIT
behavior on posix x64 when exceptions are enabled, does this change
when compiling with -fno-exceptions?

Call extern "C" functions via ffi, which call c++ code. Here disabled
exceptions seems to be good because these are not allowed to raise c++
exceptions in LuaJIT.

Anything else I should be aware of?

Thanks,
Dan

Other related posts: