From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a50b9611833860a3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.198.210 with SMTP id je18mr3182400wic.1.1367049802283; Sat, 27 Apr 2013 01:03:22 -0700 (PDT) X-Received: by 10.49.35.198 with SMTP id k6mr4171180qej.18.1367049801834; Sat, 27 Apr 2013 01:03:21 -0700 (PDT) Path: hg5ni26032wib.1!nntp.google.com!15no8307294wij.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 27 Apr 2013 01:03:21 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=62.245.124.80; posting-account=gOWpSgoAAADVGkXEvWuE0ZkuZ-N4vbqK NNTP-Posting-Host: 62.245.124.80 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <074f1ecc-4e7b-46d1-a047-a7271e0ae724@googlegroups.com> Subject: Re: gnatcoll ORM memory leak From: landgraf Injection-Date: Sat, 27 Apr 2013 08:03:22 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-04-27T01:03:21-07:00 List-Id: On Saturday, 27 April 2013 08:27:56 UTC+2, Simon Wright wrote: > I see that you get line numbers from the gnatcoll library code, but not > > your own. Did you build with -g (debug)? Yes, I did. $ make debug rm -rf bin/ obj/ lib/ gprbuild -p -f -gnat12 -P gnat/gnatleak -gnata -ggdb -g ... omitted ... gcc -c -gnat12 -gnata -ggdb -g main.adb ... omitted ... gcc main.o -o main $ valgrind --leak-check=full ./bin/main .... omitted .... ==1721== HEAP SUMMARY: ==1721== in use at exit: 9,320 bytes in 158 blocks ==1721== total heap usage: 5,398 allocs, 5,240 frees, 1,063,539 bytes allocated ==1721== ==1721== 3,200 bytes in 100 blocks are definitely lost in loss record 56 of 57 ==1721== at 0x4C2A87C: malloc (vg_replace_malloc.c:270) ==1721== by 0x6B55BB7: __gnat_malloc (s-memory.adb:92) ==1721== by 0x6B70E41: system__pool_global__allocate (s-pooglo.adb:61) ==1721== by 0x6B810E8: system__storage_pools__subpools__allocate_any_controlled (s-stposu.adb:239) ==1721== by 0x53A1F3A: gnatcoll__sql__sessions__add_to_cache (gnatcoll-sql-sessions.adb:676) ==1721== by 0x53A29A0: gnatcoll__sql__sessions__persist (gnatcoll-sql-sessions.adb:666) ==1721== by 0x40BB36: _ada_main (main.adb:19) ==1721== by 0x40CA93: main (b__main.adb:700) ==1721== ==1721== LEAK SUMMARY: ==1721== definitely lost: 3,200 bytes in 100 blocks ==1721== indirectly lost: 0 bytes in 0 blocks ==1721== possibly lost: 0 bytes in 0 blocks ==1721== still reachable: 6,120 bytes in 58 blocks ==1721== suppressed: 0 bytes in 0 blocks ==1721== Reachable blocks (those to which a pointer was found) are not shown. ==1721== To see them, rerun with: --leak-check=full --show-reachable=yes ==1721== ==1721== For counts of detected and suppressed errors, rerun with: -v ==1721== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)