KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q66578: Program Crashes If Run on a Machine Without an 80x87

Article: Q66578
Product(s): See article
Version(s): 6.00
Operating System(s): OS/2
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 9-NOV-1990

Question:

I have a multithreaded application that I developed on a system with
an 80x87 coprocessor. Everything is working properly; however, when I
try to run the code on a machine that doesn't have a coprocessor, it
always fails with a General Protection fault. I have tried all
variations of the run-time library (LLIBCMT.LIB and CDLLOBJS.LIB) to
no avail. Is there a problem with using the multithreaded run-time
libraries on a machine without a coprocessor?

Response:

There is no problem with using the multithreaded run-time libraries on
a machine without a coprocessor.

The problem is probably caused by not using _beginthread() to start
the threads that perform the floating point calculations. If you use
DosCreateThread() to start the thread, there is required
initialization code that is not performed in the run-time for that
thread; this is mandatory because 80x87 emulation is performed in the
run-time in cases where there is no coprocessor.

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.