Re: lua traceback during memory allocations

  • From: Mike Pall <mike-1403@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 15 Mar 2014 11:28:00 +0100

Greg Greenway wrote:
> My guess is that I'm trying to walk up the callstack at a time when it
> isn't in a consistent enough state.

For performance reasons the Lua stack is not kept in sync, except
where absolutely needed. One could work around this on a
case-by-case basis, but that quickly becomes rather complicated or
unfeasible (e.g. for allocations called from JIT-compiled code).
The only guaranteed places are C hooks or C functions bound via
the classic Lua/C API.

--Mike

Other related posts: