X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Date: Tue, 11 Dec 2001 20:13:43 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: sandmann AT clio DOT rice DOT edu Message-Id: <8011-Tue11Dec2001201343+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com, acottrel AT ihug DOT com DOT au In-reply-to: <10112110836.AA20180@clio.rice.edu> (sandmann@clio.rice.edu) Subject: Re: Alternate exit code to set psp References: <10112110836 DOT AA20180 AT clio DOT rice DOT edu> 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: sandmann AT clio DOT rice DOT edu (Charles Sandmann) > Date: Tue, 11 Dec 2001 02:36:40 -0600 (CST) > > > > > > asm volatile("movb $0x51, %%ah > > > int $0x21 > > > movb $0x50, %%ah > > > int $0x21 > > > > > > (so we don't pass the psp any more, we do a getpsp call to decide > > > what to set it to). > > > > Won't this do harm if the PSP you get is zeroed (by the same NTVDM bug we > > are trying to fix)? > > The PSP returned by DOSX (DPMI) is still correct, so when we do the set > it cleans up the internal bogosity in NTVDM. > > It appears to work (at least most of the time ...). My patched gcc 2.8.1 > driver which uses this code would crash each 1-3 compiles without it, but > only crashed once with it. I was going to see if that crash was > reproducible. The old code might be more reliable, but I don't see > how to have a child program know if it's run from a go32-v2. Well, I'm paranoiac nonetheless, primarily because this code wasn't tested except now, while the old code was tested by several users on several different systems. So I'd prefer a solution which just fixes the old code, so that when it runs under go32-v2, it doesn't call PM Int 21h at all.