[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.0 metatable and stack safety
- From: Eero Pajarre <epajarre@...>
- Date: Tue, 19 Nov 2002 14:07:02 +0200
I just noticed that an incorrect (written in Lua) __newindex
method can crash the application by overflowing the C-language
stack.
My __newindex method was in some case redoing the table
operation "directly" (I am changing it to rawset).
This lead to C-stack filling with the following
function loop:
luaV_settable
luaV_execute
luaD_call
callTM
luaV_settable
luaV_execute
luaD_call
callTM
this cutted from VC++ ide so it is a stack, first activated function
at the bottom. This is also from the top of the stack, I couldn't
get to the point where it had started.
I will of course fix my code, but I am reporting this because I sort
of hope Lua being more bullet proof.
Eero