lua-users home
lua-l archive

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


On Sat, Dec 22, 2018 at 11:58 AM Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:

> Does a question about VM crash make sense?

I cannot say without it being asked first.

> The stack size must be known at link time on Windows.

No. It is a default that the application can override at run time. https://docs.microsoft.com/en-us/windows/desktop/ProcThread/thread-stack-size

> Yes, of course, a host application developer should take into consideration both "how much stack Lua VM needs" and "how much stack the application itself needs"

Even that is impossible if the host provides functions using varying amounts of stack size callable from Lua, and the user is free to supply Lua code, even assuming that Lua can safely predict and control its own stack usage.

> I believed that Lua VM does guarantee to never crash the host application whatever Lua script is given.

Unfortunately that is not the case (as stated).

Cheers,
V.