LuaJIT isn't a perfect drop-in, however, as it has various limitations that base Lua doesn't (in addition to the obvious ones if you're using Lua 5.2 features, which LuaJIT doesn't support).
In my case it's because of LuaJIT has address-space limitations that standard Lua does not, due to its use of NaN-encoding for pointers. There are some inputs where LuaJIT simply runs out of memory (or rather, address-space), which work fine when run using standard Lua.
[For my app the speedup from LuaJIT isn't so great anyway, so it's just a minor annoyance.]
In my case it's because of LuaJIT has address-space limitations that standard Lua does not, due to its use of NaN-encoding for pointers. There are some inputs where LuaJIT simply runs out of memory (or rather, address-space), which work fine when run using standard Lua.
[For my app the speedup from LuaJIT isn't so great anyway, so it's just a minor annoyance.]