Microsoft KB Archive/107429

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

PRB: _chain_intr() Crashes When Compiling for 80386 Processor

Q107429

1.00 1.50 WINDOWS kbprg kbprb ---------------------------------------------------------------------- The information in this article applies to: - The C Run-time (CRT), included with: Microsoft Visual C++ for Windows, versions 1.0 and 1.5 ---------------------------------------------------------------------- SYMPTOMS ======== Calling the C run-time library function _chain_intr() causes an application to crash or behave unpredictably if the code is compiled with /G3 to target the 80386 processor. CAUSE ===== The _chain_intr() function is written to be compatible with previous versions of the C run-time, and therefore the function expects only 16-bit registers to be pushed on the stack. With the /G3 compiler switch, the compiler needs to push and pop 32-bit registers instead of 16-bit registers because the code it generates or the code in functions it calls might modify a 32-bit register. The _chain_intr() function does not handle 32-bit registers, however, and is therefore usable only with processor models that use 16-bit registers, specifically /G0 through /G2. RESOLUTION ========== If a call to _chain_intr() in an interrupt routine is not required, the /G3 compiler switch can be used. Otherwise, the allowable compiler switches are /G0 - /G2. Additional reference words: 1.00 1.50 KBCategory: kbprg kbprb KBSubcategory: CRTIss

Keywords : kb16bitonly
Issue type :
Technology : kbVCsearch kbAudDeveloper kbCRT


Last Reviewed: December 22, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.