lua-users home
lua-l archive

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

> > - Does the bug happen in both modes (generational and incremental)?
> I have left the gc in its default mode, which I believe is inc mode. I have tested with: lua_gc(_state, LUA_GCGEN); and the bug still persists

The default mode in 5.4 is generational. You might change it to incremental
to check that.

One more question: can you be sure the __gc of a table is being called
twice? For what I saw in your code (the first version you sent), the
problem of destroying the same userdata twice could be caused by
some bug in the weak table, if it returned the same userdata for
two different tables. That is, when cleaning the weak table from a
deleted key, it might get corrupted and then could return a wrong
value in a future query.

Again, many thanks,

-- Roberto
lua-l mailing list --
To unsubscribe send an email to