lua-users home
lua-l archive

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

g->ud is null if you use lua_open.

The normal allocator is using realloc, so my idea is that you broke the allocator by freeing an invalid pointer out side of lua.


Alexander Gladysh a écrit :

Hi all!

I'm trying to move to Lua 5.1.1 from Lua 5.0.2.

While porting, I experience crash in luaM_realloc_() call inside
garbage collection inside lua_close() call.

 block = (*g->frealloc)(g->ud, block, osize, nsize);

Debugger shows that g->ud is NULL. Can anyone give me any hints on how
to debug such crashes in Lua?

More information follows.

Julien Hamaide
Engineering Coach
10Tacle Studios Belgium / Elsewhere Entertainment