From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11526 invoked by alias); 27 Sep 2009 11:45:58 -0000 Received: (qmail 11498 invoked by uid 48); 27 Sep 2009 11:45:47 -0000 Date: Sun, 27 Sep 2009 11:45:00 -0000 Message-ID: <20090927114547.11497.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/41478] function "pack" causes double free violation In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dominiq at lps dot ens dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg02481.txt.bz2 ------- Comment #6 from dominiq at lps dot ens dot fr 2009-09-27 11:45 ------- > Works for me on FreeBSD. Is anyone understanding why? valgrind gives: ==77290== Invalid free() / delete / delete[] ==77290== at 0x167FB: free (vg_replace_malloc.c:323) ==77290== by 0x2EAE: MAIN__ (in ./pr41478.ex) ==77290== by 0x2F0F: main (in ./pr41478.ex) ==77290== Address 0x3e15c0 is 0 bytes inside a block of size 4 free'd ==77290== at 0x167FB: free (vg_replace_malloc.c:323) ==77290== by 0x2E53: MAIN__ (in ./pr41478.ex) ==77290== by 0x2F0F: main (in ./pr41478.ex) ==77290== ==77290== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ==77290== malloc/free: in use at exit: 448 bytes in 11 blocks. ==77290== malloc/free: 30 allocs, 20 frees, 3,482 bytes allocated. ==77290== For counts of detected errors, rerun with: -v ==77290== searching for pointers to 11 not-freed blocks. ==77290== checked 833,028 bytes. ==77290== ==77290== ==77290== 4 bytes in 1 blocks are definitely lost in loss record 1 of 4 ==77290== at 0x15516: malloc (vg_replace_malloc.c:193) ==77290== by 0x257B: MAIN__ (in ./pr41478.ex) ==77290== by 0x2F0F: main (in ./pr41478.ex) ==77290== ==77290== LEAK SUMMARY: ==77290== definitely lost: 4 bytes in 1 blocks. ==77290== indirectly lost: 0 bytes in 0 blocks. ==77290== possibly lost: 0 bytes in 0 blocks. ==77290== still reachable: 444 bytes in 10 blocks. ==77290== suppressed: 0 bytes in 0 blocks. ==77290== Reachable blocks (those to which a pointer was found) are not shown. ==77290== To see them, rerun with: --leak-check=full --show-reachable=yes -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478