delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/10/10:28:33

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10108101424.AA15584@clio.rice.edu>
Subject: Re: Selector Exhaustion
To: pavenis AT lanet DOT lv (Andris Pavenis)
Date: Fri, 10 Aug 2001 09:24:47 -0500 (CDT)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.A41.4.05.10108101055280.40162-100000@ieva06.lanet.lv> from "Andris Pavenis" at Aug 10, 2001 11:41:32 AM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> My own patch (checking all descriptors using
> __dpmi_get_descriptor_access_rights(), repeating the test after
> running program and trying to release ones which have been newly appeared)
> works nicely under Win98SE but not under WinNT 4.0+SP6. Blind releasing
> area of descriptors like in Your patch (potentially dangerous as we're
> assuming specific descriptors allocation order) works much better under
> WinNT 4.0+SP6: executable spawned other DJGPP program more than 2500 times
> without descriptor leak
> 
> So it looks that:
> 
> for Win9X we can scan all possible descriptors to see which ones are
> additionally allocated after return from child process to free them
> after that. Such way is verified to work Ok under Win98SE and under
> DOSEMU-1.0.2 (Linux kernel 2.4.7)
> 
> It looks that under WinNT 4.0SP6 freeing descriptor does not change
> it access rights so I don't see a simple way how to find which descriptors
> are in use before running child process. So it seems that blind freeing
> descriptor inside such interval is best we can do.
> 
> Perhaps it's too dangerous to enable such blind releasing descriptors
> by default, so I think some option in startup flags (default off)
> could be added. There is no problem for Win9X and DOSEMU as we can
> find which descriptors are newly allocated by spawned program.

I didn't have much time for testing or comparing - not ignoring your
efforts.  I just wanted to see if I could do a full libc build without
having to restart on Windows 2K.  Since my other platforms are Windows NT
that is the other one I care about :-)

I'd like to see a fix which works on all platforms, is safe, but has
minimal performance implications on platforms that don't need it.  We'll
get there eventually.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019