FIX: Program Hangs when Startup Code Refers to __qczrinitLast reviewed: September 16, 1997Article ID: Q92408 |
5.30 | 5.30
MS-DOS | WINDOWS
kbtool kbcode kbbuglist kbfixlist
The information in this article applies to:
SYMPTOMSWhen an application is compiled with Microsoft C version 6.0, it runs without any problems. However, when the application is rebuilt using Microsoft C/C++ version 7.0, the program hangs in the CTR0.ASM module while executing the following code:
MOV cx, __qczrinit ;* Get initializer address JCXZ @f ;* Is it zero? CALL cx ;* No -- call indirect CAUSEThere is a problem in the Microsoft Linker (LINK) version 5.3 that does not initialize data in the DGROUP segment to 0.
RESOLUTIONThere are two methods resolve this problem:
STATUSMicrosoft has confirmed this to be a problem in LINK version 5.3. This problem was corrected in LINK version 5.31.009.
MORE INFORMATIONThe C 6.0 startup code explicitly initializes _qczrinit to 0 when the variable is declared. The C/C++ 7.0 startup code does not initialize the symbol. Instead the code relies on the linker to perform the initialization automatically. There is a problem in the Microsoft Linker (LINK) version 5.3 that does not initialize data in the DGROUP segment to 0. Because the _qczrinit value is not initialized, if the random data in the _qczrinit variable is not zero, the startup code calls the address to which the _qczrinit variable points. Calling a random address in this manner causes the system to hang.
|
Additional reference words: 5.30
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |