lua-users home
lua-l archive

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


Hi,

Kent Sibilev wrote:
> Coco is great and works fine on my OSX Intel. But LuaJIT gives me:
> 
> [LuaJIT frontend failed: attempt to call a thread value]
> 
> all the time. Do you know what might be a problem?

Actually someone else had the same problem with LuaJIT on OS X.
I gave some instructions on how to debug this further, but never
heard back. Seems it's a real issue though. :-(

I have no access to an Intel Mac, so I can't debug this myself.
Please try to help me find the problem, by answering these
questions:

Do you always get this? Even for trivial programs like:
  luajit -e 'print("Hello World!")'
  luajit -O -e 'print("Hello World!")'
Or do you get this only in specific situations or only when you
enable the LuaJIT optimizer with -O? If yes, then try -j trace to
see where it fails (or see the last function before it fails). 

Can you tell me more about your system?
  uname -a
  gcc --version

Also whether you made any changes or if you are just using
'make macosx'. You might try changing the optimization flags in
src/Makefile from -O3 -fomit-frame-pointer to something less
aggressive, like -O2 and see if you get the same error.

If you know your way around the LuaJIT sources, you can try
debugging the functions 'frontwrap' and 'j_frontend' and see
where it bombs out and what's on the Lua stack before it does so.
I'm assuming the lua_call() in j_frontend is raising the error,
but I have no idea why ...

If this is not a compiler problem and nobody with an Intel Mac
can debug this, I'll probably need a (non-root) ssh login to an
Intel Mac to further diagnose the problem.

Bye,
     Mike