ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/09/20:46:50

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "cjwhite" <cjwhite1 AT ews DOT uiuc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: g77-compiled binary stack fault crash
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <6KLs8.38347$tg4.456332@vixen.cso.uiuc.edu>
Date: Tue, 9 Apr 2002 19:45:04 -0500
X-Complaints-To: abuse AT uiuc DOT edu
X-Trace: vixen.cso.uiuc.edu 1018398722 (Tue, 09 Apr 2002 19:32:02 CDT)
NNTP-Posting-Date: Tue, 09 Apr 2002 19:32:02 CDT
Organization: University of Illinois at Urbana-Champaign
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I working on getting a set of *nix fortran apps to compile under dos.  One
of them has just one source file.  It's compiled to an executable with no
errors.  When it's run, it crashes immediately with:

Exiting due to signal SIGSEGV
Stack Fault at eip=00001610

objdump shows the code at this point:

00001600 <_MAIN__>:
    1600:       55                      push   %ebp
    1601:       89 e5                   mov    %esp,%ebp
    1603:       53                      push   %ebx
    1604:       81 ec 20 80 0b 00       sub    $0xb8020,%esp
    160a:       8d 9d f4 7f f4 ff       lea    0xfff47ff4(%ebp),%ebx
    1610:       68 d0 3a 02 00          push   $0x23ad0
    1615:       e8 36 60 00 00          call   7650 <_f_open>

I'm using:
bash-2.04$ g77 --version
GNU Fortran 0.5.26 20020220 (release)

This program compiles and does not crash under various *nixes.
The code before the open call is like:
real  var1,var2, ...etc... for about 25 variables
dimension var1(number), ...etc for those same 25 variables.
Under djgpp g77, is there some limit on the number of variables here, or the
number used in the dimension statement?  I have barely any experience with
fortran on top of what I've seen porting the compile process using DJGPP.
I've done some searching in the mailing list archive, but I didn't find
anything which really helped me out.

cjwhite1 AT uiuc DOT edu

- Raw text -

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