[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: why not add any static objects into lua_State? Was: Re: issue following array example in pil chapter 28.2
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 20 Feb 2012 16:24:04 -0200
> This bug occurs because David mixed two different lua vm, lua use a
> dummynode in ltable.c, and many LUAI_DDEF objects. So if this objects
> are all in G(L), the mix of different lua will not cause crash, Any
> discuss about this topic?
Yes (although I cannot find a link right now). Some people argue that,
as two different VMs is wrong, we should not try to disguise the
symptoms. Lua 5.2 has a verification system that should raise an
error as soon as any library with a wrong VM is loaded.
(Oops, except that there seems to be a little bug there. The check
is only being done in a deprecated function ;)