- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My program crashes with a stack overflow error. Any suggestions for what I'm doing wrong would be gratefully received!
Intel Fortran Compiler 11.1 build 054
Windows 7 Professional 64 bit SP1
Stepping through, the first time a problem is apparent is in calling a routine in a static library - the arguments seem to be messed up. The subroutine header is:
[fortran]subroutine getsysindex(sysindex,date,systemformat,sysfilepath,sysnum) type(sysindex_t), intent(in) :: sysindex integer, intent(in) :: date character(*), intent(in) :: systemformat character(255), intent(out) :: sysfilepath integer, intent(out) :: sysnum end subroutine getsysindex[/fortran]
Inside the subroutine (having called it with appropriate arguments), the call stack shows:
[fortran]GEtaxcredits-MultiSys.exe!FORTAX_PRICES::GETSYSINDEX(TYPE(SYSINDEX_T) SYSINDEX={...}, INTEGER(4) DATE=19950407, SYSTEMFORMAT=, .tmp..T938__V$768=,
CHARACTER(255) SYSFILEPATH='', .tmp..T943__V$76b=, INTEGER(4) SYSNUM= Undefined address)
Line 362 Fortran [/fortran]
(I've removed the 255 blank spaces in the SYSFILEPATH argument so that it fits in a reasonable amount of space)
1. Why is the systemformat argument missing?
2. What are the arguments .tmp..T938__V$768 and .tmp..T943__V$76b?
3. Why is sysnum an undefined address?
Thanks very much!
Intel Fortran Compiler 11.1 build 054
Windows 7 Professional 64 bit SP1
Stepping through, the first time a problem is apparent is in calling a routine in a static library - the arguments seem to be messed up. The subroutine header is:
[fortran]subroutine getsysindex(sysindex,date,systemformat,sysfilepath,sysnum) type(sysindex_t), intent(in) :: sysindex integer, intent(in) :: date character(*), intent(in) :: systemformat character(255), intent(out) :: sysfilepath integer, intent(out) :: sysnum end subroutine getsysindex[/fortran]
Inside the subroutine (having called it with appropriate arguments), the call stack shows:
[fortran]GEtaxcredits-MultiSys.exe!FORTAX_PRICES::GETSYSINDEX(TYPE(SYSINDEX_T) SYSINDEX={...}, INTEGER(4) DATE=19950407, SYSTEMFORMAT=, .tmp..T938__V$768=,
CHARACTER(255) SYSFILEPATH='', .tmp..T943__V$76b=, INTEGER(4) SYSNUM= Undefined address)
Line 362 Fortran [/fortran]
(I've removed the 255 blank spaces in the SYSFILEPATH argument so that it fits in a reasonable amount of space)
1. Why is the systemformat argument missing?
2. What are the arguments .tmp..T938__V$768 and .tmp..T943__V$76b?
3. Why is sysnum an undefined address?
Thanks very much!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is very little to go on here, so let me make a few wild guesses.
First, the ".tmp.XXX" variables are the hidden string length. However you compiled the source, caused the string lengths to be passed immediately following the string address. I might have guessed /iface:cvf except that the subroutine name is not decorated.
Second, along that same line, you don't show either the command line or the calling statement. How are you calling getsysindex in the first place? Is it possible that the two things are compiled the same? That is, one is compiled with /iface:cvf and the other is not?
Finally, I'm not sure where this call stack came from -- is it from Visual Studio?
--Lorri
First, the ".tmp.XXX" variables are the hidden string length. However you compiled the source, caused the string lengths to be passed immediately following the string address. I might have guessed /iface:cvf except that the subroutine name is not decorated.
Second, along that same line, you don't show either the command line or the calling statement. How are you calling getsysindex in the first place? Is it possible that the two things are compiled the same? That is, one is compiled with /iface:cvf and the other is not?
Finally, I'm not sure where this call stack came from -- is it from Visual Studio?
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brilliant - you were exactly right. The library had mistakenly been compiled with /iface:cvf.
Thanks very much.
Thanks very much.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page