delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/13/13:28:48

Date: Thu, 13 Jan 2000 18:00:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Stromberg <Martin DOT Stromberg AT lu DOT erisoft DOT se>
cc: DJGPP <djgpp AT delorie DOT com>
Subject: Re: Problems with protected_mode_int
In-Reply-To: <200001131558.QAA14542@spica-144.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.1000113175705.12754K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 13 Jan 100, Martin Stromberg wrote:

> > This will most probably crash, for several good reasons:
> > 
> >   - stack is allocated off the DS selector whose access rights forbid 
> >     executing any address accessed via that selector;
> > 
> >   - the only segment register that is guaranteed to be loaded with the 
> >     application's selector is CS, so you cannot trust SS.
> 
> Are you saying the base and offsets of CS is different than those of DS?
> If yes, then it won't work. 

The base and limit are the same, but not the access rights.  If you 
pass _my_ss() to the functions which installes the handler, it will
use the SS (actually, the DS) selector, and trigger a GPF due to access
rights.

In addition, in this specific case, the user reported he was using DJGPP 
v1.x, where SS was loaded with a different selector (which was the reason 
why -fomit-frame-pointer didn't work).

- Raw text -


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