dotgnu-libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dotgnu-libjit] Libjit bug


From: Kirill Kononenko
Subject: Re: [Dotgnu-libjit] Libjit bug
Date: Thu, 18 Sep 2008 17:07:28 -0700

As I see you have in the first program:

   jit_insn_label(f_main, &label);

   value5       = jit_insn_add(f_main, value4, value2);
   jit_insn_store(f_main, value4, value5);

   test         = jit_insn_lt(f_main, value4, count);


and in the second:

   jit_insn_store(f_main, value4, value3);

   jit_insn_label(f_main, &label);

   value4       = jit_insn_add(f_main, value4, value2);

   test         = jit_insn_lt(f_main, value4, count);


The second program will never stop as the line "value4 =
jit_insn_add(f_main, value4, value2)" does not work as you expect. The
value4 on left and right are actually two different pointers. You need
to do an extra store something like store(value4, jit_insn_add(value4,
value2)) as in the first program.



Thanks,
Kirill

2008/9/18 simone campanoni <address@hidden>:
> Hi everybody,
>   I am Simone Campanoni, I'm writing a JIT (called ILDJIT) exploiting the
> Libjit library.
> I have found a bug, but I don't know if it was already discovered.
> I have attached 2 really simple example that shows the bug.
>
> The two programs are semantically equivalent but they differ in execution
> for a bug inside libjit.
>
> The first one, libjittestCorrect is correct :-)
> and the second one not (it does not stop).
>
> Thanks
> Simone Campanoni
>
> _______________________________________________
> Dotgnu-libjit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/dotgnu-libjit
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]