Re: Very strange bug with "compare-against-ULL" bound check and FWD optimization on x86

  • From: Philipp Kutin <philipp.kutin@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 25 Mar 2013 17:37:48 +0100

Great, much appreciated! The two test cases that run LuaJIT embedded
into our application now work as expected.

However, there's another bug of a similar kind. It's also a wrongly
failing bound check, but now, the machine code looks a bit different:
it uses (I think) MMX registers and floating point comparisons. This
time, there's a skip of one exit number.

I can provide the executed (generated) Lua code, point to the
supporting "library" Lua code, or upload the LuaJIT dumps if desired.
Would any of that help? Preparing a standalone version is expected to
be more involved this time, since the loop is rather large and uses
all kinds of functionality from the supporting code.

--Philipp

On Sat, Mar 23, 2013 at 2:57 PM, Mike Pall <mike-1303@xxxxxxxxxx> wrote:
> Philipp Kutin wrote:
>> in short, the working
>> snippet has jump exits numbered consecutively around the
>> bound-checking code, while the incorrect version suddenly makes a leap
>> from exit number 4 to a series of jumps to exit 10.
>
> Yes, that was the root of the problem. Thank you for the bug
> report and the test case! Fixed in git HEAD.
>
> --Mike
>

Other related posts: