dibyendumajumdar/ravi

Merge Lua 5.3.3

Closed this issue · 6 comments

Merge Lua 5.3.3

Currently the lua tests are failing with an assertion failure.

Merge reverted on master branch - bug to be fixed in the lua533-merge branch.

Issues:

  1. In function codebinexpval() in lcode.c the order in
    which the luaK_exp2RK() is called has changed between 5.3.2 and 5.3.3.
    Using the changed order causes an assertion failure when running Lua tests (math.lua line 551). By reverting the order the assertion failure went away - but cannot explain what the issue is.
  2. The change to hookmask in lua_State has not been merged as it has moved within the struct. This requires updating any mappings in the LLVM and GCC JIT implementations.
  3. api.lua fails at line 870 or thereabouts, when compiled with ravi.tracehook() enabled.

Merge is held up due to test failure in api.lua when ravi.tracehook() is enabled.

It turns out that the test failure in api.lua was due to unexpected interaction with gc due to the gcstep parameter of 200 that is used to force a full gc after every 200 JIT compilations. Somehow the timing of the collection was conflicting with the failing test which expected a certain gc behaviour. By changing the gcstep parameter to 300 the failure has gone away as presumably there is no longer a timing conflict.

See issue #50 for details of what the gcstep parameter is used for.

Completed in 0.16