lua-users home
lua-l archive

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


On 05/05/2011 17:07, Mike Pall wrote:
This is the 7th beta release of LuaJIT 2.0.0.

The following little program crashes on my machine (Windows; GCC 4.4.1).

#include <lua.h>
#include <lauxlib.h>

int cfunc (lua_State *L)
{
  return 0;
}

int main()
{
  void *dummy;
  int val;
  lua_State *L = lua_open();
  lua_Alloc f = lua_getallocf(L, &dummy);
  lua_setallocf(L, f, &val);
  lua_pushcfunction(L, cfunc); // crash here
  return 0;
}

--
Shmuel