[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Any suggestions on debugging assertion fail in Lua testsuite, in a custom Lua port?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 1 Jun 2012 11:48:52 -0300
> Therefore (while admitting I don't know anything about the Lua's GC
> algorithm), as the GC's code is exactly the same, I'd most expect it
> to run identical or nearly identical as the original (maybe with some
> slight differences because of possibly different struct packing
> approach and/or a few sizeofs). So, is this line expected to show a
> different behaviour when porting Lua to a new compiler + some weird
> OS, but still on x86? You wrote that it is "highly dependent on many
> things", so I now understand the answer may still be "yes", but I'd be
> very grateful if you could possibly answer taking into account the
> more detailed description I tried to put up here.
The code is the same, but the size of different objects may be
different, what is previously allocated may be different (e.g., the
'arg' table), etc. All these details affect the GC.
That assert in particular is related to the pace of the collector (how
many steps it does to complete a GC cycle). Actually it is highly
non-portable in general; it should be protected by a "_port" test (so
that it would not run with _U=true).