Re: recovering from SIGBUS in jitted code

  • From: Mike Pall <mike-1210@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 31 Oct 2012 17:15:44 +0100

aaron foo wrote:
> in the signal handler have tried lj_err_run/mem/throw all cant
> unwind the stack correctly. Is there anyway to recover from this
> kind of error? theres no problem when in interpreted mode.

No, you can't recover from a SIGBUS (or other) this way. And it's
not safe to do so, even in interpreted mode.

You must not use any VM function (internal or not) inside a signal
handler, except lua_sethook() (but that doesn't help you here).

BTW: I consider posting a 600 line file from the distribution to
be an excessive waste of list bandwidth. Please don't do that again.
A small diff would have served the purpose just as well. Thank you
for your consideration!

--Mike

Other related posts: