Date: Mon, 13 Aug 2001 21:28:53 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Andrew Cottrell" Message-Id: <5832-Mon13Aug2001212853+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com, pavenis AT lanet DOT lv, sandmann AT clio DOT rice DOT edu In-reply-to: <026201c12403$e0d609f0$0a02a8c0@acceleron> (acottrel@ihug.com.au) Subject: Re: Selector Exhaustion References: <10108100454 DOT AA13597 AT clio DOT rice DOT edu> <001901c12239$16e71dd0$0a02a8c0 AT acceleron> <2427-Mon13Aug2001123310+0300-eliz AT is DOT elta DOT co DOT il> <026201c12403$e0d609f0$0a02a8c0 AT acceleron> 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 Precedence: bulk > From: "Andrew Cottrell" > Date: Tue, 14 Aug 2001 00:26:00 +1000 > > > > I slightly modifed Charles patch so that the changes were only executed > if > > > on a Win NT / 2000 / XP machine, this way I can also use the same LIBC > and > > > code on the Win 98 box. > > > > ??? Why would the original code prevent you from using the same libc > > on all systems? > The original code leaked DPMI selector like a sive on Win2K when building > LIBC on Win 2K, it was a night mare to have to restart every minute or two. By ``original code'' I meant the patch posted by Charles. > The issue I had was that Charles patch was for Win 2K and Andris patch was > for Win 98. I wanted to have the same source and executables for both Win 98 > and 2K. Between the patch from Charles that was for Win 2K issues and > Andris and your comments about this last week I thought it best to only > enable the code in Charles's patch on my Win 2K box and don't enable the > function calls when running on my Win 98 box. I thought it was better safe > than sorry. If there's a conflict between different patches, I suggest to discuss that and arrive at a unified solution. Rushing into rebuilding packages before we have an agreed solutioin that should be good for all platforms might be a waste of resources. > > Looks like the stack is smashed (EBP actually looks like ASCII text). > > Did you try to stubedit gcc.exe to a larger stack? > I need to read and try to understand the FAQ section 12.2. Is there any > further pointers on what to look for in the registers or should I just keep > on sending the crash info? Section 12.2 is the starting point; after that, ask here. If, after reading the FAQ, you don't understand how did I arrive at the above conclusion, I can explain. > > Also, the EIP value seems right at the program start. Can you see > > where it is, exactly? > I need to do some background reading in the FAQ and GDB etc on this so I can > give the info next time the crash occurs or is it too late once the crash > occurs? The mapping between the EIP and the code doesn't change unless you rebuild the program. So, if you need to know where in the program is a specific EIP value, run "gdb program", and then try either one of the two commands "list *0xNNNN" and "disassemble 0xNNNN", where NNNN is the address you are after (13f5, in this case). Note that `list' needs an asterisk before the address, while `disassemble' does not.