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

  • From: Leo Razoumov <>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 27 Aug 2012 19:07:06 -0400

On Mon, Aug 27, 2012 at 6:34 PM, Dan Eloff <dan.eloff@xxxxxxxxx> wrote:
> 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.

If I recall correctly, -fno-exceptions switches off the C++ exception
mechanism completely.  Object creation/destruction is not tracked and
destructors are not called while the stack is being unwound.


Other related posts: