g77 and valgrind error?

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

 



I am using valgrind on a g77 program and am getting
some peculiar results:

Cccccccccccccccccccccccccccccccccccccccccc
      program memty
      integer i
      i=360
      call fsub(i)
      end
C
      subroutine fsub(i)
      integer i
      double complex x(i,i)
      x(i,i)=complex(0D0,0D0)
      end
Ccccccccccccccccccccccccccccccccccccccccc

Valgrind gives an error of the form:

==12420== Invalid write of size 8
==12420==    at 0x8048671: fsub_ (memty.f:10)
==12420==    by 0x80486C5: main (../../../../gcc-3.1/libf2c/libF77/main.c:61)
==12420==  Address 0x52BFE8A0 is on thread 1's stack
==12420==
==12420== Invalid write of size 8
==12420==    at 0x8048679: fsub_ (memty.f:10)
==12420==    by 0x80486C5: main (../../../../gcc-3.1/libf2c/libF77/main.c:61)
==12420==  Address 0x52BFE8A8 is on thread 1's stack

Some more info:

bvds> uname -a
Linux bvds 2.4.25 #1 SMP Sat Mar 20 15:34:02 EST 2004 i686 i686 i386 GNU/Linux
bvds> g77 --version
GNU Fortran (GCC) 3.3.2
bvds> valgrind  --version
valgrind-2.1.2

I see the same behavior in valgrind-2.0.0.
This only happens for complex arrays.
if I use the g77 flag -femulate-complex, then there is one error.
(I have also sent this to the valgrind mailing list.)

Any ideas?

Brett van de Sande

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux