delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/21/01:13:31

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10205210514.AA14985@clio.rice.edu>
Subject: Re: emacs under w2k
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Tue, 21 May 2002 00:14:45 -0500 (CDT)
Cc: djgpp-workers AT delorie DOT com, lauras AT softhome DOT net
In-Reply-To: <Pine.SUN.3.91.1020521074720.4513A-100000@is> from "Eli Zaretskii" at May 21, 2002 07:58:55 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

> > Tried adding __djgpp_exception_toggle() before the sbrk() calls and it
> > no longer aborts under Win2K(), even with very large memory arena moves.
> 
> That's encouraging, but toggling exceptions on each sbrk is probably 
> going to make memory-intensive programs significantly slower.  There are 
> quite a few DPMI calls in __djgpp_exception_toggle.

I don't think it's a solution, just a debugging hint.

> > event (interrupt?) happens in that time.  It then gets serviced after 
> > the move - or in the middle of it (ignoring the disable interrupt
> > call?) and boom.
> 
> Perhaps the virtualization of interrupt disabling causes the disable 
> interrupt call to be ignored?

It could be.  We call the disable interrupts DPMI call, but my best guess
is it's being ignored because it's a bug.

> > There's no real easy way to restore just the keyboard handler that I
> > see without some dpmiexcp edits I didn't have time for.
> 
> How about simply blocking the interrupt in the PIC?  It might not work 
> due to virtualization of the PIC, but it's so simple that I think it's 
> worth trying.

I'd prefer to avoid adding another unknown into the mix at this point.
I'll probably just hack dpmiexcp to see if that fixes it.  If so, then
the problem is confirmed.

> The main issue that worries me is the interrupts besides the keyboard 
> that could cause the same crashes.  While we can do lots of things with 
> the keyboard (isn't there a keyboard controller command to tell the 
> keyboard to stop sending keys, btw?), other sources, such as the timer, 
> are harder.

I'm not 100% sure this is the issue yet, but I agree that a real cli
type behavior is preferred (we do have it coded so we shouldn't get
interrupts ...)  

> So if the PIC method works, it might be a better solution, because we can 
> block all the potential trouble-making IRQ lines, and we don't lose 
> events as the result, if the time we keep them blocked is short.  By 
> contrast, toggling the timer interrupt handler with 
> __djgpp_exception_toggle will lose the timer ticks and other interrupts 
> until we toggle again.  Losing interrupts is much better than crashing, 
> but is not very nice (e.g., imagine a communications program that loses 
> bytes as a result).

I understand why this might be good, but I'm worried about what it might
break on other platforms.  (and if it would even work under W2K & XP ...)

- Raw text -


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