www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/06/07:07:55

Xref: news-dnh.mv.net comp.os.msdos.djgpp:4135
Path: news-dnh.mv.net!mv!barney.gvi.net!news.sprintlink.net!rain.fr!jussieu.fr!univ-lyon1.fr!in2p3.fr!oleane!tank.news.pipex.net!pipex!howland.reston.ans.net!newsfeed.internetmci.com!news.sesqui.net!rice!news!sandmann
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: interrupt help please
Date: Fri, 05 Jan 1996 08:22:31 CST
Organization: Rice University, Houston, Texas
Lines: 28
Message-ID: <30ed3427.sandmann@clio.rice.edu>
References: <DKosDv DOT H8H AT jade DOT mv DOT net>
Reply-To: sandmann AT clio DOT rice DOT edu
NNTP-Posting-Host: clio.rice.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> I am using DJGPP v2b2.  I thought I had got on top of all the issues
> related to interrupts but alas the problems of machine crashes and
> page faults have come back to haunt me.

Please get cwsdpmi beta 9, it has some additional diagnostics about page
faults and hardware interrupts.

> whenever I get an interrupt (even if set at once a second via signal generator)
> I get the following error message :-
> 
> Page fault at eip=250037; flags=3046
> eax=002400b7 ebx=00268e00 ecx=0000345c edx=00000033 esi=000276fc edi=000034a8
> ebp=0024e14c esp=00268e00 cs=a7 ds=b7 es=b7 fs=b7 gs=b7 ss=b7 error=0006

A page fault is an access to a location currently not in memory.  This can
be because of a bad pointer, or accessing a memory location paged out to
disk in a HW interrupt handler.  If the later is the case, you must lock
all memory to be touched in a HW interrupt.  You don't mention how you
deal with the interrupt, but the most recent beta of V2's wrapper routines
lock most of the memory for you.

From the EIP and ESP here, it looks like you are in the middle of one of
the wrapper routines.  The ESP has all low 12 bits clear, so you are
probably pushing a value onto the stack in the wrapper and that page is
not in memory.  The fix would be to use the beta-4 gopint.c module.

Something as simple as rearranging code so this page was touched by some
other malloc/free in the previous working code would change the behavior.

- Raw text -


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