delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/21/11:26:26

From: damon AT WRONG DOT redshift DOT com (Damon Casale)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GP fault on a new -- why?
Date: Wed, 21 Feb 2001 16:17:38 GMT
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <3a93e928.37950550@news.redshift.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010208102939 DOT 20284Y-100000 AT is> <95up73$63a$1 AT nnrp1 DOT deja DOT com> <3a83ea84 DOT sandmann AT clio DOT rice DOT edu>
X-Newsreader: Forte Free Agent 1.11/32.235
X-Complaints-To: newsabuse AT supernews DOT com
Lines: 42
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Fri,  9 Feb 2001 13:03:00, "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
wrote:

>> > > General Protection Fault at eip-3af9d; flags=3046
>> > > eax=00043406 ebx=000100af ecx=00af00a7 edx=0000001c esi=00af00bf
>> > > edi=00000000 ebp=0004342c esp=0000227a cs=a7 ds=a7 es=af fs=bf gs=bf
>> > > ss=33 error=0000
>> >
>> > You will see in section 12.2 that this message comes from CWSDPMI.  It
>> > means you crashed the machine so badly that CWSDPMI aborted itself.
>
>From CWSDPMI - correct.  It only exits if an exception handler isn't 
>available, or there are more than 5 levels deep of exceptions (which 
>usually means there is something broken in the user exception handler).
>
>> Specifically, it's crashing on the following line (excerpted from
>> src/libc/go32/excepn.S):
> ...
>> not_forced:
>> 	movw	%cs:___djgpp_our_DS, %ds
>> 	movl	$0x10000, forced  <-----	/* its zero now, flag
>
>Note in this code that we load DS with __djgpp_our_DS.  Note in the
>register dump above that DS == CS, and CS is not writeable.  That's
>the reason for the fault.  How it got that way is for you to figure
>out.  That's what's broken in the user exception handler.

Well, since Dejanews is down, I guess this is about as far as I can go on
this thread.  (I'm posting from home right now.)

Thanks for all the help, guys.  :-)

The routine I had written which exhibited this problem was a recursive
add-to-linked-list function.  I didn't bother writing it right the first
time, but this forced me to change to an iterative function sooner than I
otherwise would have.  Guess that'll teach me to stay farther away from
recursion.  ^^;;;

Damon Casale, damon AT WRONG DOT redshift DOT com (remove the obvious)
"Sometimes I gets in trouble,
  and I just whistle this little tune..."  (repeat)

- Raw text -


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