www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/11/01:26:39

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Segmentation violation core dump blues
Date: Wed, 10 Nov 1999 22:43:15
Organization: Aspen Technology, Inc.
Lines: 22
Message-ID: <3829f503.sandmann@clio.rice.edu>
References: <808ct1$fj2$1 AT dove DOT qut DOT edu DOT au>
NNTP-Posting-Host: dcloan.aco.aspentech.com
X-NewsEditor: ED-1.5.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> Recently I have been having trouble with djgpp compiled utilities
> getting a segmentation violation on my Windows NT console window.
> 
> Here, for example, is an attempt to run "ls".
> 
> C:\attic\trains>ls
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=0000a2bb
> eax=ff7f0040 ebx=0000003f ecx=000001c2 edx=ff7f0000 esi=00000040 edi=00000003
> ebp=0005dd94 esp=0005dd84 program=
> cs: sel=096f  base=01c20000  limit=7e3cffff

The eax/edx values here look very much like address wrap values, and the
limit on cs/ds is 2Gb, which the the max NT allows.  

What has happened is NT returned DPMI memory blocks in non-increasing address
order.  Since address wrap doesn't work (near pointers don't work on NT) you
can occasionally have these problems on NT.  The only reliable solution is
to modify your binaries to specify "unixy-sbrk" method.

You might be able to get by loading your program images before the command
window in a different order, but it's hit and miss.

- Raw text -


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