dotgnu-libjit
[Top][All Lists]
Advanced

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

Re: [Dotgnu-libjit] Memory bug


From: simone campanoni
Subject: Re: [Dotgnu-libjit] Memory bug
Date: Sat, 23 Jan 2010 14:17:03 -0500

Hi Klaus,
   your patch works perfectly!
When I run ILDJIT under valgrind tool I saw no errors or warnings at all even if the CIL program is really complex and it stresses the Libjit library.

Thanks
Simone

On Sat, Jan 23, 2010 at 6:45 AM, Klaus Treichel <address@hidden> wrote:
Hi Simone,

> Hi everyone,
>    I think I have found a bug on Libjit which tries to read from
> memory not allocated.
> I am using the Libjit from the GIT repository; unfortunately this bug
> shows only when I compile complicated program in ILDJIT (hence, I
> could not find a simple test case).
> Consider that no other memory error appears on the execution outside
> Libjit (for that reason I think it is a bug of Libjit and not of
> ILDJIT).
>
> The "guilty" lines are the following:
>
>       * Line: jit_insn_branch_if (jit-insn.c:3681). Message from
>         valgrind:
> Invalid read of size 4
> ==1632==  Address 0x167c5518 is 56 bytes inside a block of size 64
> free'd
> ==1632==    at 0x4024D12: realloc
> (vg_replace_malloc.c:476)
> ==1632==    by 0x432B673: jit_realloc
> (jit-alloc.c:114)
> ==1632==    by 0x432DB7C: _jit_block_add_insn
> (jit-block.c:852)
> ==1632==    by 0x433ABC6: jit_insn_branch_if
> (jit-insn.c:3675)
>       * Line: jit_insn_branch_if (jit-insn.c:3682). Message from
>         valgrind:
>

Thanks, this is a good catch.
Can you try if the attached patch makes the valgrind errors disappear?

Cheers,
Klaus


reply via email to

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