PATCH: Calling cosl(PI/2) in a DLL May Cause GP Fault

Last reviewed: October 7, 1997
Article ID: Q134817
The information in this article applies to:
  • Microsoft Visual C++ for Windows, versions 1.0, 1.5, 1.51, 1.52

SYMPTOMS

Calling the run-time function cosl() with an argument equal to one-half the value of pi (3.14159) may generate a general protection (GP) fault when it is called within a DLL, and you are running on a computer that has no math coprocessor.

This error does not occur when cosl is called within an .EXE file; also, it does not occur when cosl() is called within a DLL or .EXE when you are running on a computer that has a math coprocessor.

In addition, sin() is known to produce incorrect results when it is called within a DLL when you are running a computer that has no math coprocessor.

RESOLUTION

FPATCH.EXE is a self-extracting file that contains the FASTADD.OBJ library module that fixes these problems.

NOTE: FASTADD.OBJ does not fix the tan() problem described in Knowledge Base article Q111067.

The following file is available for download from the Microsoft Software Library:

 ~ Fpatch.exe

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

FASTADD.OBJ is also available in Visual C++ version 1.52 for Windows in the Msvc15\Lib directory. Visual C++ version 1.52 users must run the PATCHDLL.BAT file in the Msvc\Lib directory to patch the C run-time libraries.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Keywords          : CRTIss kb16bitonly kbcode
Version           : 1.0 1.5 1.51 1.52
Platform          : WINDOWS
Issue type        : kbfile
Solution Type     : kbpatch


================================================================================


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.

Last reviewed: October 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.