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

ID: Q134817

The information in this article applies to:

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          : kbcode kb16bitonly kbCRT kbVC 
Version           : 1.0 1.5 1.51 1.52
Platform          : WINDOWS

Last Reviewed: October 10, 1997