[Dev-luatex] Luajittex 0.72.0 announcement

Mojca Miklavec mojca.miklavec.lists at gmail.com
Thu Jan 10 00:55:24 CET 2013


On Tue, Dec 25, 2012 at 9:25 PM, luigi scarso wrote:
> On Tue, Dec 25, 2012 at 9:17 PM, Patrick Gundlach wrote:
>>
>>>>
>>>> Can't create the Lua state.
>>>>
>>> Hm what format are you using ?
>>
>> non, I run luatex --ini --lua xxx.lua myfile.tex
> Which platform ?

For me: 64-bit Mac OS X.

> gdb luajittex
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
shared libraries ... done

(gdb) r --luaonly "/Users/ConTeXt/tex/texmf-osx-64/bin/mtxrun"
--script context a.tex
Starting program: /Users/ConTeXt/tex/texmf-osx-64/bin/luajittex
--luaonly "/Users/ConTeXt/tex/texmf-osx-64/bin/mtxrun" --script
context a.tex
Reading symbols for shared libraries ++......................... done
Can't create the Lua state.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000018
0x00000001002e8a8d in lua_checkstack (L=0x0, size=9) at lj_api.c:87
87	  if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) {
(gdb) backtrace
#0  0x00000001002e8a8d in lua_checkstack (L=0x0, size=9) at lj_api.c:87
#1  0x00000001002e8b75 in luaL_checkstack (L=0x0, size=9,
msg=0x100869811 "too many arguments to script") at lj_api.c:97
#2  0x00000001000b80fd in lua_initialize (ac=6, av=0x7fff5fbffa08) at
luainit.w:856
#3  0x00000001000022a0 in main (ac=6, av=0x7fff5fbffa08) at luatex.c:468
(gdb)

The problem seems to be around
   lj_alloc_create () at lj_alloc.c:1134
1134	  tbase = (char *)(CALL_MMAP(tsize));
(gdb) step
CALL_MMAP [inlined] () at
/Users/ConTeXt/luajittex/buildjit/libs/luajit/luajit-build/src/lj_alloc.c:208
...
222	    void *p = mmap((void *)alloc_hint, size, MMAP_PROT, MMAP_FLAGS, -1, 0);
(gdb) p p
$13 = (void *) 0x1010af000
...
235	  return CMFAIL;
...
1135	  if (tbase != CMFAIL) {
(gdb) p tbase
$18 = 0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>


Possibly related post: http://lua-users.org/lists/lua-l/2012-03/msg00656.html

Mojca


More information about the dev-luatex mailing list