[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: scripts launching other scripts (coroutines)
- From: Vyacheslav Egorov <mraleph@...>
- Date: Thu, 14 Sep 2006 12:45:05 +0700
Thomas Blom wrote:
Below is the simplest test I could concoct to repro. There are a few
interesting cases:
[...skipped...]
lua_State * pThread = lua_newthread( master );
From Reference Manual:
(1)
lua_newthread
Creates a new thread, pushes it on the stack, and returns a pointer
to a lua_State that
represents this new thread.
(2)
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.
--
e.v.e