delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/01/19:52:48

From: axlq AT unicorn DOT us DOT com (to comp.os.msdos.djgpp)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Pentium "General Protection Fault" (works on 486)
Date: 1 Sep 1999 13:37:24 GMT
Organization: a2i network
Lines: 88
Message-ID: <7qja6k$gi4$1@samba.rahul.net>
References: <7qhbnp$3rp$1 AT samba DOT rahul DOT 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

Responding to my previous post, someone was kind enough to tell
me about 'symify' which may help.  I apologize for not posting
that information before.

Update to my previous article:

In article <7qhbnp$3rp$1 AT samba DOT rahul DOT net>,
to comp.os.msdos.djgpp <axlq AT unicorn DOT us DOT com> wrote:
>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>
[snip]

Here's what I left out (regenerated per the FAQ):

Exiting due to signal SIGSEGV
General Protection Fault at eip=00011524
eax=00000046 ebx=c08904c4 ecx=0000732c edx=00000004 esi=0000000d
edi=0024fe6c
ebp=0024fe60 esp=0024fe50 program=
cs: sel=00ef  base=8355d000  limit=0024ffff
ds: sel=00ff  base=8355d000  limit=0024ffff
es: sel=00ff  base=8355d000  limit=0024ffff
fs: sel=00cf  base=00016540  limit=0000ffff
gs: sel=010f  base=00000000  limit=0010ffff
ss: sel=00ff  base=8355d000  limit=0024ffff
App stack: [00250000..001d0000]  Exceptn stack: [00025210..000232d0]

Call frame traceback EIPs:
  0x00011524   _malloc+192
  0x0000e7d9   __npxsetup+841
  0x0000e9d9   ___crt1_startup+49

Question: Which way does it flow?  Is the problem in malloc or
crt1_startup?

Now to continue:

>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).

The laptop version is 2.8.0.  I am now doubting that the problem
is due to pentium versus 80486, but possibly a bug introduced in
2.81.

According to the FAQ, it doesn't look like a stack overrun.

My environment:

winbootdir=C:\WINDOWS
COMSPEC=C:\WINDOWS\COMMAND.COM
MSINPUT=C:\PROGRA~1\MICROS~2
TEMP=E:\TEMP
TMP=e:\temp
PATH=E:\DJGPP\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND;E:\UTIL;E:\POVRAY3
DJGPP=e:\DJGPP\DJGPP.ENV
windir=C:\WINDOWS

Many thanks to anybody who can shed some light.

-Alex

- Raw text -


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