www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/20/12:42:24

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10205201643.AA14265@clio.rice.edu>
Subject: Re: emacs under w2k
To: lauras AT softhome DOT net
Date: Mon, 20 May 2002 11:43:32 -0500 (CDT)
Cc: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii), djgpp-workers AT delorie DOT com
In-Reply-To: <74330986783.20020520124839@softhome.net> from "Laurynas Biveinis" at May 20, 2002 12:48:39 PM
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

> OK, now I've got something more: the patch below moves ds alias base
> setting into sbrk16.asm, and the results have changed:
> 
> 1) Emacs _without_ unixy sbrk (which previously was failing at
> startup) now works like a charm - not a single glitch yet.

This needs to be investigated without the patch.  The patch code
shouldn't be called at all without unixy sbrk being set - so if it 
fixes the problem it must be due to moving something - a secondary
change, which is bad.  As noted before, the point of failure was in
the copy of stubinfo, so we should find out what ESI and EDI are to
find out why it was crashing.

> 2) Emacs _with_ unixy sbrk (which previously was failing randomly),
> and any program which sets that bit now fail consistently at startup,
> sometimes with SIGSEGV, sometimes taking down NTVDM.

You aren't saving BP when using it, which might be a problem.  I
would probably push DX and pop BX to avoid using BP.  In any case,
since this was the mode we were trying to fix, it's disappointing it
doesn't work at all.

> The results without unixy sbrk are encouraging, and before I start
> looking what happens with it, I'd like others to comment on my patch -
> any stupidities or something?

push/pop instead of using BP.  Could use movl on alias into EDX - it's
shorter and faster than the movw and we just ignore the top 1/2.
But since it doesn't work (and shouldn't even change the case you say
it fixed) I don't think we should commit it until we understand what's
going on.

> (If the patch is OK, then the good thing about it is that now everyone
> can take mine or Charles's test program and debug away... Emacs no
> longer required :) Also it would be interesting to see how it behaves
> under other platforms.

My test program reliably fails with the current sbrk (taking down NTVDM)
with the right input arguments (which can change from one run to the
next ...).

Next plan was to try to unhook our keyboard handler (and maybe exception
handlers) to see if it still crashes ntvdm.

- Raw text -


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