Re: lj_gc_step_jit bug

  • From: "Cheng, Long" <long.x.cheng@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 19 Nov 2013 17:02:30 +0800

Hi Mike:
http://repo.or.cz/w/luajit-2.0.git/commit/7b4d5306c7441a373516ee54bd942218f35348c2
I think there is some problem with this commit.
The added "return 1;" line implies a full gc cycle is finished, according to the API specification, but gcstate may be not GCPause. Our code is confused by this situation when manually calls lua_gc(L, LUA_GCSTEP, stepsize) and examines the return value.

Regards
Long
于 2013/11/6 2:52, Mike Pall 写道:
Cheng, Long wrote:
We think we found a bug in lj_gc_step_jit, here is the detail:
Thank you very much for the bug report and the detailed
explanation! Fixed in the git repository.

This is actually a long-standing bug in LuaJIT 2.x. It doesn't
lead to incorrect behavior, but it affects GC throughput. E.g. the
binarytrees benchmark is 15% faster with this bug fixed ... ouch.

--Mike



Other related posts: