lua-users home
lua-l archive

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


> on the latest version of Lua source code (commit hash
> 9b4f39ab14fb2e55345c3d23537d129dac23b091)
> 
> I've discovered segmentation fault on access to a local variable with
> non-existent index.
> 
> Assume we have a snippet (lua_getlocal.c) written using Lua C:
> 
> [...]
>  lua_Debug ar;
>  lua_getlocal(L, &ar, 100);
>  lua_close(L);

You cannot call 'lua_getlocal' with an uninitialized 'ar'.  Check the
documentation for more details.

-- Roberto