[120] in pc-kerberos

home help back first fref pref prev next nref lref last post

Re: OS/2 port of kerberos DLL - Thread problems!?!

daemon@ATHENA.MIT.EDU (Paul B. Hill )
Sat Jul 29 15:35:59 1995

To: Mike Hojnowski <mqh@mqh.cit.cornell.edu>
Cc: pc-kerberos@MIT.EDU
Date: Sat, 29 Jul 95 15:34:28
From: pbh@MIT.EDU (Paul B. Hill )
Reply-To: pc-kerberos@MIT.EDU

>>3) In several modules there are these declarations:
>>
>>   static FILE *cnffile; /* XXX pbh added static because of MS bug in fgets() 
>>*/
>>   static char FAR *linebuf;/* XXX pbh added static because of MS bug in 
>>			fgets() */
>>
>>   What is the bug in fgets()?  Does it exist in OS/2 CSET?  Is there a
>>   test code that proves the bug in MS that can be tested against the
>>   OS/2 compiler?

The bug in the MS compiler was (is?) that the library would assume that the
segment for the first and third arguments to fgets() were the same even
under the large model. Internal to the fgets() funtion the segment of the
third argument would be dropped and the segment of the first argument would
be used as the segment of the thrid argument. Then fgets() would internally
call another library function (sorry don't remember which one) with this
incorrect inforamtion. This would cause a GPF on an intermittant basis.

As I recall the static declarations force the same segment to be used so the
problem did not occur. I doubt very much that the problem would occur with
the CSet compiler. It may even have been fixed in some versions of the MS
compiler. If anyone has the time to test this and can provide a list of wich
MS compilers exhibit the bug and which do not we'll be happy to patch the
code.

Paul



home help back first fref pref prev next nref lref last post