> 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.
> 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.