dotgnu-libjit
[Top][All Lists]
Advanced

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

Re: [Dotgnu-libjit] Memory bug


From: Klaus Treichel
Subject: Re: [Dotgnu-libjit] Memory bug
Date: Sat, 23 Jan 2010 12:45:14 +0100

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

Attachment: memaccess.patch
Description: Text Data

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

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