dotgnu-libjit
[Top][All Lists]
Advanced

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

Re: [Dotgnu-libjit] valgrind reports memory leak in libjit


From: Aleksey Demakov
Subject: Re: [Dotgnu-libjit] valgrind reports memory leak in libjit
Date: Tue, 30 Oct 2012 01:52:55 +0300

Hi Alexey,

Thank you very much for your report. To resolve the first problem
it is needed to add jit_type_free(signature) to the sample code.
The second problem is indeed a leak in libjit. The fix should be
pushed in few minutes.

Regards,
Aleksey

On Mon, Oct 29, 2012 at 4:16 PM, Alexey Galakhov
<address@hidden> wrote:
> Hello,
>
> I'm trying to develop a program for continuous running using libjit.
> However I found that either libjit does not free memory or valgrind
> gives the false report.
>
> For example, let's use t1.c from the tutorial for a testcase:
>
> mul_add(3, 5, 2) = 17
> ==5941==
> ==5941== HEAP SUMMARY:
> ==5941==     in use at exit: 268 bytes in 7 blocks
> ==5941==   total heap usage: 29 allocs, 22 frees, 9,350 bytes allocated
> ==5941==
> ==5941== 60 bytes in 1 blocks are definitely lost in loss record 6 of 7
> ==5941==    at 0x4026A68: calloc (vg_replace_malloc.c:566)
> ==5941==    by 0x40A5513: jit_calloc (in /usr/lib/libjit.so.0.0.1)
> ==5941==    by 0x40A43CE: ??? (in /usr/lib/libjit.so.0.0.1)
> ==5941==    by 0x40A45B3: jit_type_create_signature (in
> /usr/lib/libjit.so.0.0.1)
> ==5941==    by 0x8048931: main (t1.c:39)
> ==5941==
> ==5941== 64 bytes in 1 blocks are definitely lost in loss record 7 of 7
> ==5941==    at 0x4026A68: calloc (vg_replace_malloc.c:566)
> ==5941==    by 0x40A5513: jit_calloc (in /usr/lib/libjit.so.0.0.1)
> ==5941==    by 0x406C035: _jit_block_create (in /usr/lib/libjit.so.0.0.1)
> ==5941==    by 0x4074D34: jit_insn_new_block (in /usr/lib/libjit.so.0.0.1)
> ==5941==    by 0x407AE22: jit_insn_return (in /usr/lib/libjit.so.0.0.1)
> ==5941==    by 0x80489E9: main (t1.c:51)
> ==5941==
> ==5941== LEAK SUMMARY:
> ==5941==    definitely lost: 124 bytes in 2 blocks
> ==5941==    indirectly lost: 0 bytes in 0 blocks
> ==5941==      possibly lost: 0 bytes in 0 blocks
> ==5941==    still reachable: 144 bytes in 5 blocks
> ==5941==         suppressed: 0 bytes in 0 blocks
>
> I tried that with Git version as of Oct 20, 2012 (last commit
> 7d33e65ebc0885ab93d9cab5c622e45c53486274 by Aleksey Demakov).
>
> Am I missing something? Is it a bug?
>
> Regards,
> --
> Alex
>
> _______________________________________________
> Dotgnu-libjit mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/dotgnu-libjit



reply via email to

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