cvs commit: fptools/libraries/base/cbits lockFile.c

Simon Marlow simonmar at glass.cse.ogi.edu
Wed Jun 2 08:35:11 EDT 2004


simonmar    2004/06/02 05:35:11 PDT

  Modified files:
    libraries/base/cbits lockFile.c 
  Log:
  The lock arrays are too small on Windows, leading to buffer overruns
  and crashes when a program opens too many files.
  
  The problem is that on Windows, we shouldn't use FD_SETSIZE to get the
  max number of file descriptors: this is set to 64 in the mingw
  includes.  The real maximum is 2048 (according to the crt sources), so
  we now hardwire that in.
  
  Also, put in a runtime check that we aren't overruning this array.
  
  MERGE TO STABLE
  
  Revision  Changes    Path
  1.3       +21 -6     fptools/libraries/base/cbits/lockFile.c


More information about the Cvs-libraries mailing list