lua-users home
lua-l archive

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

On Thu, May 5, 2011 at 9:24 PM, Shmuel Zeigerman <> wrote:
> The following little program crashes on my machine (Windows; GCC 4.4.1).
> ...
>  lua_Alloc f = lua_getallocf(L, &dummy);
>  lua_setallocf(L, f, &val);
>  lua_pushcfunction(L, cfunc); // crash here

This is not surprising, as IIRC, there is no guarantee that the
default allocator doesn't use the opaque UD value, and you go and
change the opaque UD value.