FIX: Invalid Executable File, 65,535 Byte Stack Size Requested

Last reviewed: September 11, 1997
Article ID: Q70262
3.x 4.x 5.0x 5.1x 5.20 | 5.0x 5.10 5.11 5.13 5.15
MS-DOS                 | OS/2
kbtool kberrmsg kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft LINK for MS-DOS, versions 3.x, 4.x, 5.0x, 5.1x, and 5.2
  • Microsoft LINK for OS/2, versions 5.0x, 5.1, 5.11, 5.13, and 5.15

SYMPTOMS

An attempt to run an executable file fails and the computer hangs, the program gives unexpected results, or generates the following message:

      run-time error R6000
      - stack overflow

CAUSE

The application specifies a stack size of exactly 65,535 bytes. When the Microsoft LINK /STACK option specifies 65,535 bytes (or the Microsoft language compiler /F option specifies FFFFh bytes), the linker does not display a warning message and it sets the stack size to zero bytes. The error occurs because LINK rounds an odd stack size to the next larger even value in an effort to create the most efficient executable file.

RESOLUTION

To request the largest possible stack size, specify 65,534 in the /STACK linker option (or /F compiler option).

RESOLUTION

Microsoft has confirmed this to be a problem in LINK versions listed above. LINK versions 5.3 and higher (16-bit versions) generate an error if the user specifies a stack size larger than 65,534 (64K - 2).


Additional reference words: 3.65 3.69 4.06 4.07 4.10 5.01.20 5.01.21
5.02 5.03 5.05 5.10 5.11 5.13 5.15 5.20
KBCategory: kbtool kberrmsg kbbuglist kbfixlist
KBSubcategory: LinkIss
Keywords : kb16bitonly
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.