[Bug fortran/41478] function "pack" causes double free violation

2009-09-27 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2009-09-27 13:12 ---
Different libc, different behavior on double-free


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478



[Bug fortran/41478] function "pack" causes double free violation

2009-09-27 Thread dominiq at lps dot ens dot fr


--- 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



[Bug fortran/41478] function "pack" causes double free violation

2009-09-27 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2009-09-27 10:36 ---
Confirmed on i?86-linux.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  GCC build triplet|i386-32bit, MAC OS X Leopard|
   GCC host triplet|i386-32bit, MAC OS X Leopard|
 GCC target triplet|i386-32bit, MAC OS X Leopard|


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478



[Bug fortran/41478] function "pack" causes double free violation

2009-09-27 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2009-09-27 09:59 ---
I also see it on *-apple-darwin9 gcc 4.2.4, 4.3.4, 4.4.1, and trunk.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478



[Bug fortran/41478] function "pack" causes double free violation

2009-09-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #3 from jvdelisle at gcc dot gnu dot org  2009-09-27 00:39 
---
I can reproduce this on 4.3.3 and 4.5.0 r151904.


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-09-27 00:39:22
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478



[Bug fortran/41478] function "pack" causes double free violation

2009-09-26 Thread kargl at gcc dot gnu dot org


--- Comment #2 from kargl at gcc dot gnu dot org  2009-09-26 21:15 ---
Works for me on FreeBSD.

REMOVE:kargl[201] cd tmp
REMOVE:kargl[202] setenv MALLOC_OPTIONS AJ
REMOVE:kargl[203] gfc4x -o z asd.f90 
REMOVE:kargl[204] ./z
 array1:
   0
   0
 array2:
   1
   2
 pack array2(2) into array1:
 array1:
   2
   0


-- 

kargl at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|function "pack" causes  |function "pack" causes
   |double free violation   |double free violation


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478



[Bug fortran/41478] function "pack" causes double free violation

2009-09-26 Thread reuter at physik dot uni-freiburg dot de


--- Comment #1 from reuter at physik dot uni-freiburg dot de  2009-09-26 
20:06 ---
Created an attachment (id=18660)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18660&action=view)
Test code triggering the runtime error.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478