FIX: LINK 5.3 Consumes All Available Free Disk Space or Hangs

Last reviewed: September 16, 1997
Article ID: Q86812
5.30 MS-DOS kbtool kbcode kberrmsg kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft LINK for MS-DOS, version 5.3

SYMPTOMS

An attempt to link an application fails when Microsoft LINK version 5.3 consumes all available free disk space and hangs. The exact symptoms depend on the specified command-line options and on the linked code. Some of the behaviors are as follows:

  • LINK writes data to an executable file until no free disk space is available, then LINK hangs. It is necessary to boot the computer to regain control.
  • LINK writes data to an executable file until no free disk space is available, then LINK gives an Invalid Fault in the Windows operating system.
  • LINK generates lost clusters until no free disk space is available, then LINK gives an Invalid Fault in the Windows operating system.
  • LINK prints one string repeatedly until the user presses CTRL+C. Then LINK displays the message "null pointer assignment." LINK also generates an executable file that consumes all available free disk space.

CAUSE

These problems occur when LINK attempts to write CodeView information and a symbol is defined as both a data item and a function in the same object module. In other words, these problems occur when all of the following five conditions occur simultaneously:

  • The code contains two symbols that differ from each other only in capitalization (for example, ExtraBytes and EXTRABYTES).
  • The two symbols reside in the same object module (.OBJ) file.
  • The LINK command line does not specify the /NOI[GNORECASE] option.
  • The LINK command line specifies the /CODEVIEW option.
  • The symbols are defined such the first one creates a COMDEF (function) record and the second one creates a PUBDEF (data) record.

RESOLUTION

To work around this problem, perform one of the following four steps:

    - Change the name of one of the conflicting symbols
    - Modify the LINK command line to specify the /NOIGNORECASE option
    - Modify the LINK command line to remove the /CODEVIEW option
    - Modify the application source code to initialize the data item

STATUS

Microsoft has confirmed this to be a problem in LINK version 5.3 for MS-DOS (provided with Microsoft C/C++ version 7.0 for MS-DOS and Windows). This problem was corrected in LINK version 5.31.009 for MS-DOS (provided with the C/C++ version 7.0a for MS-DOS and Windows patch disk). To obtain the patch disk, obtain a disk from Microsoft. To obtain a disk in the United States, call Microsoft Product Support Services at (206) 454-2030. Outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, go to the Microsoft Web site http://www.microsoft.com/worldwide/default.htm

MORE INFORMATION

The following code example demonstrates this problem. LINK generates the following message and hangs:

   L2025: _FuncName: symbol defined more than once

If the application initializes FUNCNAME to a value or if the LINK command line omits the /CODEVIEW option switch, the L2025 error persists but LINK does not hang. To eliminate the error completely, rename one of the symbols or specify the /NOIGNORECASE LINK option.

Sample Code

/*
 * Compile options needed: /c
 *    Link options needed: /CO
 */

#include <stdio.h>

void FuncName(int i)
{
   printf("function called: %d\n", i);
}

int FUNCNAME;

void main(void)
{
   FUNCNAME = 1;
   FuncName(FUNCNAME);
}


Additional reference words: 5.30 7.00 CVPACK
KBCategory: kbtool kbcode kberrmsg kbbuglist kbfixlist
KBSubcategory: LinkIss
Keywords : LINKIss kbbuglist kbcode kberrmsg kbfixlist kbtool
Version : 5.30
Platform : MS-DOS
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 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.