lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2 June 2016 at 04:25, Heinrich Hartmann
<heinrich@heinrichhartmann.com> wrote:
> LuaJIT supports Solaris/Illumos, with the single caveat that one
> cannot use lightuserdata on the stack. While LuaJIT was very
> accommodating to changes required to support
> Solaris/Illumos, this particular incompatibility is not something that
> can be fixed easily:
> LuaJIT uses pointer compaction and does not support pointers using high bits.
> Illumos and its derivatives use high bits on stack memory: they are
> just incompatible!
>
> So, if lpeg wants to support Solaris/Illumus it has to avoid using
> lightusedata residing the stack.
>
> Fortunately, the problem very easy to circumvent on the application
> side, by making surgical changes that are easy to reason about, as in
> the PR.

I'm surprised that it works as well as you indicate.
Especially when targeting lua 5.1, pushing stack-allocated
lightuserdata is essential for safe operation (see lua_cpcall).

It sounds like you may want to send some resources towards
https://github.com/LuaJIT/LuaJIT/issues/156