lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:

> Hans Hagen reported that "luac -l -p" segfaults on Windows XP.
> Other people in the forum have reported this as well.

Antonio Scuri wrote:

> I just tested the parameters and it is correct, it crashes.
> Why?

The problem is with luaP_opnames and luaP_opmodes (lopcodes.c)
linked into luac via print.c. Entries in the luaP_opnames array are
used when listing code with luac. I have read that Windows should
be able to share constant data from a dynamic link library, but I
have yet to find out how to do this with either Visual C or MinGW.

Linking lopcodes.o statically into lua.exe and luac.exe doesn't
seem to work either -- in this case, the linker cannot resolve a
bunch of references (luaU_dump, luaF_newproto, and other members of
the LUAI_FUNC clan) from luac.o.

Consequently, in my builds for Windows I have just punted and built
luac.exe statically, just like Luiz Henrique has recommended all
along.

--
Kurt Jung