gfortran problem



when I am running my fortran 90 code, i am getting an unusual problem.
While the code is compiling very well in intel compiler, its showing
following error while compiling with gfortran just before the end of
run:
######### calculation over
*** glibc detected *** /matsc/students/Rudra/Recursion/Real/run.out:
double free or corruption (out): 0xb7f79008 ***
======= Backtrace: =========
/lib/libc.so.6[0x5efac1]
/lib/libc.so.6(cfree+0x90)[0x5f30f0]
/usr/lib/libgfortran.so.1(_gfortran_internal_free+0x21)[0x24e0c1]
/matsc/students/Rudra/Recursion/Real/run.out[0x804a075]
/matsc/students/Rudra/Recursion/Real/run.out[0x804af1b]
/matsc/students/Rudra/Recursion/Real/run.out[0x804af47]
/lib/libc.so.6(__libc_start_main+0xe0)[0x59c390]
/matsc/students/Rudra/Recursion/Real/run.out[0x8048751]
======= Memory map: ========
00110000-00111000 r-xp 00110000 00:00 0 [vdso]
00242000-002c1000 r-xp 00000000 08:07 4259911 /usr/lib/libgfortran.so.
1.0.0
002c1000-002c2000 rwxp 0007e000 08:07 4259911 /usr/lib/libgfortran.so.
1.0.0
00567000-00582000 r-xp 00000000 08:07 4859005 /lib/ld-2.7.so
00582000-00583000 r-xp 0001a000 08:07 4859005 /lib/ld-2.7.so
00583000-00584000 rwxp 0001b000 08:07 4859005 /lib/ld-2.7.so
00586000-006d9000 r-xp 00000000 08:07 2457626 /lib/libc-2.7.so
006d9000-006db000 r-xp 00153000 08:07 2457626 /lib/libc-2.7.so
006db000-006dc000 rwxp 00155000 08:07 2457626 /lib/libc-2.7.so
006dc000-006df000 rwxp 006dc000 00:00 0
006e1000-00708000 r-xp 00000000 08:07 2457630 /lib/libm-2.7.so
00708000-00709000 r-xp 00026000 08:07 2457630 /lib/libm-2.7.so
00709000-0070a000 rwxp 00027000 08:07 2457630 /lib/libm-2.7.so
00aaa000-00ab5000 r-xp 00000000 08:07 2457634 /lib/
libgcc_s-4.1.2-20070925.so.1
00ab5000-00ab6000 rwxp 0000a000 08:07 2457634 /lib/
libgcc_s-4.1.2-20070925.so.1
08048000-0804c000 r-xp 00000000 00:11 5112713 /matsc/students/Rudra/
Recursion/Real/run.out
0804c000-0804d000 rw-p 00003000 00:11 5112713 /matsc/students/Rudra/
Recursion/Real/run.out
0906e000-090b2000 rw-p 0906e000 00:00 0
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f79000-b7fc1000 rw-p b7f79000 00:00 0
bf89f000-bf8b4000 rw-p bffea000 00:00 0 [stack]

Program received signal SIGABRT, Aborted.
0x00110402 in __kernel_vsyscall ()
Missing separate debuginfos, use: debuginfo-install gcc.i386
glibc.i686
(gdb) backtrace
#0 0x00110402 in __kernel_vsyscall ()
#1 0x005af690 in raise () from /lib/libc.so.6
#2 0x005b0f91 in abort () from /lib/libc.so.6
#3 0x005e79eb in __libc_message () from /lib/libc.so.6
#4 0x005efac1 in _int_free () from /lib/libc.so.6
#5 0x005f30f0 in free () from /lib/libc.so.6
#6 0x0024e0c1 in _gfortran_internal_free () from /usr/lib/
libgfortran.so.1
#7 0x0804a075 in coefficient_ (istart=@0xbf8b1eb4, lorbit=@0xbf8b1eac,
nrec=@0xbf8b1ea8, nsite=@0xbf8b1efc,
nmax=@0xbf8b1eb0, nn=@0xbf8b1ef8, cmat=0xbf8b1e50, dmat=0xbf8b1e08) at
coeff.f90:5
#8 0x0804af1b in MAIN__ () at main.f90:64
#9 0x0804af47 in main ()
(gdb)

can anybody tell me whats wrong? gfortran is working well elsewhere
.



Relevant Pages

  • xemacs doesnt show source code when debugging using MinGW gdb
    ... I'm having a problem runing MinGW gdb in xemacs in that gdb doesn't show ... Compiling in support for the Microsoft window system. ...
    (comp.emacs.xemacs)
  • Segmentation Fault in StatInit()
    ... I installed ARPACK++ (from here: ... I tried compiling the examples ... them in gdb and noticed that all of them segfault in a "StatInit" ... #4 0x0804a21c in int AREig(double*, double*, int, int, double*, ...
    (sci.math.num-analysis)
  • Segmentation Fault in StatInit()
    ... I installed ARPACK++ (from here: ... I tried compiling the examples ... them in gdb and noticed that all of them segfault in a "StatInit" ... #4 0x0804a21c in int AREig(double*, double*, int, int, double*, ...
    (sci.math)
  • Re: GCC gives SEGFAULT... but GDB runs
    ... While i'm compiling the following program in GCC, ... But GDB doesn't give any "segmentation fault" ... As pointed out the reason for the undefined behaviour ...
    (comp.lang.c)
  • [Full-Disclosure] Local variable memory allocation
    ... This is the code I am compiling: ... this is what I get from gdb: ... Dump of assembler code for function function: ... End of assembler dump. ...
    (Full-Disclosure)