FIX: /Ge Fails to Detect Stack OverflowLast reviewed: September 16, 1997Article ID: Q106520 |
1.00 1.00a | 1.00
MS-DOS | WINDOWS NTkbprg kbfixlist kberrmsg The information in this article applies to:
SYMPTOMSPrograms compiled with the /Ge option produce the following run-time error
DOSXMSF : fatal error DX1020: unhandled exception: General protection fault;when a stack overflow occurs, instead of the expected R6000 stack overflow message.
STATUSMicrosoft has confirmed this to be a problem in FORTRAN PowerStation version 1.0 for MS-DOS. This problem was corrected in Microsoft FORTRAN PowerStation 32, version 4.0.
MORE INFORMATIONThe stack-checking routine enabled by the /Ge option does not detect stack overflow. Because the default stack size for the FORTRAN PowerStation is 32K, a general protection (GP) fault is unlikely to be caused by a stack overflow. The exception to this is when one of the following types of programs is written:
Sample CodeThe following code can be used to illustrate the problem: C Compile options needed: /Ge
subroutine recur(y) integer y y = y + 1 call indrec(y) end subroutine indrec(i) integer i i = i + 1 call recur(i) end integer x x = 0 call recur(x) endNOTE: The /Ge compiler option is no longer used for stack-probe checks under FORTRAN PowerStation 32, version 4.0. Attempting to use this option will generate the message:
Command line warning D2004: obsolete option /Ge ignored. |
Additional reference words: 1.00 gpf gp-fault
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |