delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/24/03:51:28

Date: Thu, 24 May 2001 09:42:44 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Crashes due to selector depletion
In-Reply-To: <10105240351.AA12474@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1010524094035.17472L-100000@is>
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

On Wed, 23 May 2001, Charles Sandmann wrote:

> > (I originally considered to use the PSP selector, since the transfer
> > buffer follows the PSP, but that selector seems to have a 100h-byte
> > limit, or at least could be like that according to the DPMI spec.)
> 
> You could use the 128 bytes of the command line area, overwriting it
> with the message string, since you are getting ready to exit.  This
> should be guaranteed to be enough for a message, and fit in the limit.
> 
> > Question: is it safe to overwrite the program's environment by using
> > the environment block as the transfer buffer?  Note that I don't want
> > to modify the selector itself -- this is verboten by the DPMI rules --
> > only to write over the environment strings accessing them via the
> > selector stuffed by the DPMI host at offset 2Ch in the PSP.
> 
> This would probably work also, since I don't think the environment will
> be needed anymore.  But what if the environment is very short?  Probably
> unlikely (especially if you are in an environment which runs out of 
> selectors), but the possibility of dos memory block corruption.

Thanks for all the ideas, everybody.  I think I have enough to solve this 
in some reasonable way.

- Raw text -


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