Mail Archives: djgpp/2000/04/03/07:28:20
On Mon, 3 Apr 2000, Andrew Hakman wrote:
> Now that I got 387 emulation working, I get the following page fault
> (only when the program is run on a computer that requires 387 emulation
> - run the exact same exe on a 486 and it runs great!):
> 
> Page Fault cr2=10000002 in RMCB at eip=0; flags=3006 eax=0 ebx=4f ecx=0
> edx=34868 esi=3ebbc edi=34808 ebp=7 esp=c4044 cs=2b ds=b7 es=b7 fs=b7
> gs=b7 ss=b7 error=0004
The cr2 value is the address where the Page Fault happened.  It means 
that the program tried to dereference a NULL pointer (value of 2 instead 
of zero, actually).
Since this happens only under emulation, I suspect that the IPX library 
uses the DS selector inside some interrupt handler.  The problem with 
that is that the FP emulator works by triggering an exception, which it 
does by invalidating the DS selector.  So any interrupt handler should 
use the alias selector stored in the __djgpp_ds_alias variable instead 
of DS.  The alias selector points to the same memory, but it is always 
valid.
- Raw text -