Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

core dump when returning from subroutine in fortran 77

Status
Not open for further replies.

Mike Huffman

Technical User
Jul 10, 2017
3
0
0
US
Hi: I'm new to the forum. I am a structural engineer trying to modify an old Fortran 77 program. I am using the gfortran GCC4.4.4-13.e16.x86_64 compiler package. I have run into a problem I have not seen in many years programming in Fortran.
The program compiles without problems or warnings using -Wall. A runtime core dump occurs when the program returns to a calling subroutine from the called subroutine. If I stop the execution prior to the RETURN there is not a runtime dump. If I stop the execution AFTER subroutine CALL in the calling program the core dumps. I have examined ( printed out prior to the CALL and within the called subroutine) all the parameters and they match exactly with regard to type,size and alignment.
The dump says: "***glibc detected*** < executable name > double free or corruption (out)"
and refers to several files in /lib64 and usr/lib64 such as, among others, /lib64/libgcc_s-4.4.4-20100726.so.1 etc.

Can anyone out there give me any suggestions? I would appreciate your help very much. I was about to reinstall the gcc compiler package in a Hail Mary sort of way but I decided to wait and see if anyone has a better suggestion.
Thank you so much for your help.
Mike Huffman
 
Do you know if it is compiled as 32 or 64 bit? Is it picking up the correct DLLs (.so). What does ldd say?
 
Thank you guys for your quick replies.
To mikrom: thanks I'm going to try that and see.
To xwb: Thank you too! It is compiled 64 bit. Im' going to see what ldd says about the situation.
As you've probably guessed by now I'm not a brilliant programmer. My knowledge is totally utilitarian!

Thank you both again.
 
Hey Guys that worked. For some data sets there were a couple of array indexes out of bounds.
The ldd reference helped too. Now I have to go back and rerun all my benchmarks on several programs with -fbounds-check enabled during compile.

Thank you both so much for the help.
Mike Huffman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top