Undocumented lua_getstack() ar.i_ci behavior

  • From: Paul Du Bois <dubois@xxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 19 Nov 2013 15:11:59 -0800

Background: ​To fix some corner cases in our lua debugger, I need to​ do
some probing of stack frames to detect tail calls (as previously discussed
on-list). While digging through the code trying to figure out how to do an
O(n) count of stack frames, I ran across behavior where lua_getstack() on
failure returns the frame count in ar.i_ci.

Is it likely that this functionality will remain in future revisions of
luajit?

Thanks,
paul

Other related posts: