Re: Crashing on LOOP instruction (ARMV7-A)

  • From: Oleg Volosin <oleg@xxxxxxxxxxxxxx>
  • To: "luajit@xxxxxxxxxxxxx" <luajit@xxxxxxxxxxxxx>
  • Date: Mon, 6 Aug 2018 19:46:41 +0000


I'll have a dig into page protection tomorrow.

Thanks a ton for the hint Mike!  


Oleg



On 6 Aug 2018, at 18:44, Mike Pall <mikelj-1808@xxxxxxx> wrote:

Oleg Volosin wrote:
Memory fault

Check memory page protections for JIT-compiled code. You're
probably ending up using the dummy allocator in lj_mcode.c, which
WILL fail, if memory is not executable by default.

In other words: Figure out which API your OS supports, e.g. POSIX.
Then compile with e.g. -DLUAJIT_OS=LUAJIT_OS_POSIX . Or contribute
a change to lj_arch.h for your OS (near LUAJIT_OS).

--Mike



Other related posts: