KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q44564: Short Jump to 80 Bytes Forward Generated with C 5.10

Article: Q44564
Product(s): See article
Version(s): 5.10   | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist5.10 | mspl13_c
Last Modified: 19-SEP-1989

The C Version 5.10 compiler has been shown to produce code for a short
jump 0x80 bytes forward. However, when this code is executed, it jumps 0x80
bytes backward because the number is considered negative. Source code
that exemplifies this problem is too large to post here, and the
problem disappears with almost any change to the source code.

Microsoft has confirmed this to be a problem with C Version 5.10. We
are researching this problem and will post new information as it
becomes available.

The executable file symptoms can range from hanging to infinite
looping.

The following is an excerpt from a .COD file produced by the C 5.10
compiler when compiled with /AL /Ox. The second assembly statement for
Line 79 shows the incorrect jump (je $FB331) of 80 hex bytes.

;|***         if(didid == -1)
; Line 79
  *** 00034f 83 be 52 fe ff  cmp WORD PTR [bp-430],-1 ;didid
  *** 000354 74 80           je  $FB331
;|***              break;
; Line 80
                    .
                    .
                    .

  *** 0003d1 2a e4           sub ah,ah
  *** 0003d3 e9 62 fe        jmp $L20017
                   $FB331:

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.

Copyright Microsoft Corporation 1986-2002.