delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/29/12:41:44

Date: Wed, 29 Sep 1999 10:11:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Waldemar Schultz <schultz AT ma DOT tum DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: CWSDPMI crash
In-Reply-To: <37EF9509.6037786A@ma.tum.de>
Message-ID: <Pine.SUN.3.91.990929101015.11087A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 27 Sep 1999, Waldemar Schultz wrote:

>  29 MB  1e0684c
>  30 MB  1f0a84c
>  31 MB  200e84c
> Exiting due to signal SIGSEGV

I looked into this, and it is very strange, indeed.  First, I cannot
reproduce the crashes; your program works for me in several different
system configurations.  So it seems something specific to your system.

Even more strange, the exact point of crash doesn't make any sense.
Here's the crashed instruction as printed by GDB:

  <malloc+551>:  movl   $0x1,0x8(%eax,%ebx,1)

Looking at the registers' dump, the faulty register seems to be EAX:

> eax=448b3600 ebx=020d03f8 ecx=00000410 edx=020d03fc esi=020d080c edi=00000410
> ebp=0008dc9c esp=0008dc88 program=C:\USR\FGSM\H2O\SIM\ALLOC.EXE

EAX is too large, so the program tries to dereference a pointer that
is outside the DS selector limit:

> ds: sel=00af  base=10000000  limit=020dffff

However, the few instructions immediately preceding the one that
crashed are these:

  <malloc+543>:  mov    %eax,(%ebx)
  <malloc+545>:	 mov    %eax,0x4(%eax,%ebx,1)
  <malloc+549>:	 mov	(%ebx),%eax

As far as I understand, this saves EAX at [EBX], then restores it from
there.  Therefore, if EAX was garbled at malloc+551, it should have
been garbled at malloc+545 as well.  And yet the latter didn't
crash...

So I suspect a faulty memory manager or a faulty memory chip (in that
order).  Please try uninstalling EMM386 and see if the problem goes
away.

> Full name of paging file ("" to disable) ? [H:\cwsdpmi.swp]

What is drive H: and why did you redirect the swap file there?

> mem.exe (BTW the machine runs a PII with 128 MB Ram installed !! ??)

See section 15.7 of the FAQ: you only get 32MB because of EMM386.

> DEVICE=C:\sys\EMM386.EXE NOEMS
> 
> rem -----------------GCC optimal ??? what's best ???
> rem :: DEVICE=C:\sys\EMM386.EXE NOEMS NOVCPI
> rem :: DEVICE=C:\sys\EMM386.EXE NOEMS NOVCPI L=640
> rem :: DEVICE=C:\sys\EMM386.EXE NOEMS ROM=C000-C800 I=E000-EFFF

See sections 3.9 and 3.10 of the DJGPP FAQ list, it gives some advice
about configuring EMM386.

> DEVICEhigh C:\dos\ANSI.SYS

Try uninstalling ANSI.SYS, perhaps it does something strange (why do
you need ANSI.SYS, anyway?)

- Raw text -


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