dotgnu-libjit
[Top][All Lists]
Advanced

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

[Dotgnu-libjit] valgrind reports memory leak in libjit


From: Alexey Galakhov
Subject: [Dotgnu-libjit] valgrind reports memory leak in libjit
Date: Mon, 29 Oct 2012 19:16:31 +0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.9) Gecko/20121015 Icedove/10.0.9

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



reply via email to

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