delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/01/01:26:04

From: axlq AT unicorn DOT us DOT com (to comp.os.msdos.djgpp)
Newsgroups: comp.os.msdos.djgpp
Subject: Pentium "General Protection Fault" (works on 486)
Date: 31 Aug 1999 19:51:21 GMT
Organization: a2i network
Lines: 48
Message-ID: <7qhbnp$3rp$1@samba.rahul.net>
NNTP-Posting-Host: waltz.rahul.net
NNTP-Posting-User: unicorn
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I am experiencing a wierd situation where a program compiles and
runs PERFECTLY well using DJGPP on my 80486 laptop, but crashes,
before the execution even gets into main(), with the following
message on my 233 MHz pentium desktop:

Exiting due to signal SIGSEGV
General Protection Fault at eip=0000d724
eax=00000046 ebx=5b8bd889 ecx=00002f2c edx=00000004 esi=0000000d edi=000a1534
ebp=000a1528 esp=000a1518 program=<STRING OF RANDOM GARBAGE CHARACTERS>
cs: sel=00af  base=83781000  limit=000affff
ds: sel=00b7  base=83781000  limit=000affff
es: sel=00b7  base=83781000  limit=000affff
fs: sel=0087  base=00012000  limit=0000ffff
gs: sel=00c7  base=00000000  limit=0010ffff
ss: sel=00b7  base=83781000  limit=000affff
App stack: [000a16bc..000216bc]  Exceptn stack: [00021610..0001f6d0]
Call frame traceback EIPs:
  0x0000d724
  0x0000ac55
  0x0000ae55

Compiling it through RHIDE with full debugging revealed that the
execution doesn't even make it into main()!  It crashes before
then.  And yet, it compiles and runs just fine on my 486.  I can
compile other programs on my pentium and they run OK.

The program is a public-domain textfile-format-translator of
timed scripts for subtitling foreign films, and the author
is interested in porting it to various platforms.  So I
agreed to help - a simple matter, as it works fine on POSIX,
FreeBSD, AmigaDOS, and MSDOS on my 486 - just not my pentium
desktop!  The version I'm working on is at my FTP site,
ftp://ftp.unicorn.us.com/pub/sconv126.lzh -- the makefile.dj is
what I'm using to build it.

The code does nothing fancy, except perhaps having lots of
cross-references between modules.  It's a quick-compiling
program with small modules that compiles without errors and
just a few inconsequential warnings (unused variables etc.).

Both computers are running the same version of Windows 95, with
DJGPP/RHIDE running in a DOS window.  Typing gcc --version on
the desktop says "2.81" -- not sure what the laptop version is
(it's at home and I'm not, at the moment).

Shed some light, anyone?

-Alex

- Raw text -


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