BUG: R6000 After Many Calls to RunQQ If Linked with DefaultsLast reviewed: July 13, 1995Article ID: Q123730 |
The information in this article applies to:
SYMPTOMSRunQQ fails and returns error R6000 (stack overflow) after being called many times. The failure occurs after less than 100 calls (the exact number depends on things like system memory) given the following conditions:
RESOLUTIONSet the linker stack option to 32K 'reserve' and 4K 'commit'. This is the default when compiling and linking using FL32 on the command line.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem does not occur with FORTRAN PowerStation 32.
MORE INFORMATIONPage 168 of the User's Guide states that the default stack for the linker is 1MB 'reserve' and 4K 'commit'. It also states that this is 0x1000000 and 0x4000 respectively - which is inconsitent, it is actually 0x100000 (1MB) and 0x1000 (4K). These are the values used by default in the Visual Workbench. Applications built this way will fail as described above. The default stack used when building from the command line with FL32 is 32K 'reserve' and 4K 'commit'. When an application is compiled and linked usingthe default options of FL32, it does not have the problem described above. To demonstrate the problem, build both sample programs using the linker's default options in the Visual Workbench. The only compile option required is /Ge for TASK.FOR. Then exit Windows and run TEST.EXE from MS-DOS. To demonstrate the problem without using the Visual Workbench, use the following commands (assuming the maintenance release is installed). The linker version for the maintenance release is 1.0F.
FL32 /c /Ge test.for task.for LINK test.obj libf.lib libc.lib BINDMSF test.exe LINK task.obj libf.lib libc.libNOTE: It is not necessary to apply BINDMSF to the TASK.EXE because it is being run from TEST.EXE, which will have already loaded the MS-DOS extender. Feel free to use BINDMSF on TASK.EXE; it will have no effect on this test.
Sample Code TEST.FORC Compile options required: none or /Ge (it will not affect the test)
include 'flib.fi' include 'flib.fd' character*1 answer integer*4 i integer*4 r do i=1,100 write(*,*)"ready to runqq task.exe" r = runqq("task.exe","/none") if (r .ne. 0) then write(*,*)i," task.exe failed" read(*,FMT='(a1)') answer else write(*,*)i," task.exe was successful" end if end do endSAMPLE CODE task.for C Compile options required: /Ge (must turn on stack checking for TASK)
write(*,*)"control passed to task.exe" end |
Additional reference words: 1.00 1.00a docerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |