BUG: /Oc Optimization Can Corrupt Stack With Inline AssemblyLast reviewed: July 22, 1997Article ID: Q115702 |
6.00 6.00a 7.00 | 1.00 1.50
MS-DOS | WINDOWSkbtool kbbuglist The information in this article applies to:
SYMPTOMSThe use of the /Oc optimization (Enable Block-Common Subexpression Optimization) on inline assembly code which uses the stack may corrupt the stack. The source code below can be used to illustrate this problem.
RESOLUTIONThere are two workarounds to this problem:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. This is not a problem in Visual C++, 32-bit Edition.
MORE INFORMATIONThe following code can be used to demonstrate this problem.
Sample Code
/* Compile options needed: /c /Oc */ void _cdecl b(int c,int d); void a(void) {_asm pushf _asm cli
b(1,2);_asm popf return; } |
Additional reference words: 6.00 6.00a 7.00 8.00 8.00c 1.00 1.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |