Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

core dump when returning from subroutine in fortran 77

core dump when returning from subroutine in fortran 77

core dump when returning from subroutine in fortran 77

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

RE: core dump when returning from subroutine in fortran 77

Do you know if it is compiled as 32 or 64 bit? Is it picking up the correct DLLs (.so). What does ldd say?

RE: core dump when returning from subroutine in fortran 77

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.

RE: core dump when returning from subroutine in fortran 77

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close