lua-users home
lua-l archive

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

Thomas Blom wrote:
Below is the simplest test I could concoct to repro. There are a few interesting cases:

   lua_State * pThread = lua_newthread( master );
From Reference Manual:


Creates a new thread, pushes it on the stack, and returns a pointer to a lua_State that
  represents this new thread.

  3.2 - Stack Size

When you interact with Lua API, you are responsible for ensuring consistency. In particular, you are responsible for controlling stack overflow. You can use the function lua_checkstack
  to grow the stack size.

So you just overflow master's stack.