C 6.0 TEXT.C Example May Cause Protection Violation Under OS/2

ID Number: Q61603

6.00

OS/2

buglist6.00 fixlist6.00a

Summary:

If the file example TEXT.C (obtained from the C Compiler version 6.0

online help) is compiled using the large memory model (/AL) and the

OS/2 protected mode libraries, the following operating system error

may occur:

SYS1943: A program caused a protection violation.

More Information:

To reproduce this problem, copy the program example from online help

and save it to a file named TEXT.C. Then compile with the following

command line:

cl /AL /Zp text.c grtextp.lib

Upon invoking TEXT.EXE, the SYS1943 message will be displayed and the

program will exit.

Because of a problem with the _outtext() function, compiling this

program in large memory model produces the protection violation.

As a workaround, if you compile the program with the small memory

model (/AS), the program will run properly.

Microsoft has confirmed this to be a problem in C version 6.0. This

problem was corrected in C version 6.0a.

Additional reference words: 6.00