🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49929

Baffling "Bus error" on sparc-sun-sunos4.1.3 with gcc-2.3.2

#49929
From: Morgan Stair
Date: Tue, 07 Dec 1993 22:06
40 lines
2293 bytes
I've got an error for which I have no explanation :^(.

The "main" part of the program, and several subroutines are written in
FORTRAN, and these call my C subroutines.  The problem is this line in
one of my C subroutines:

(for reference:  long *idx_phenom;  char *cptr;  long *phenom; )

  Dbs_Match (&idx_phenom, cptr, *phenom);

The prototypes are fine, and I always compile with the -Wall switch.
Using GDB-4.11 I can't even step into Dbs_Match.  Here's the error:

Program received signal SIGBUS (10), Bus error
0x4ae9c in file_seek_routine_ (filename=0x158e428 "seekoutput", 
    phenom=0x158e40d, np=0xb41710, plot=0x158e409, filters=0x158e438, 
    nf=0xb41810, scanType=0x158e411, check_scan=0xb416fc, 
    validation=0x158e415, check_valid=0xb41700, filename_len=11)
    at seek_routine.c:61

This routine is called straight from FORTRAN which does everything
call by reference, so I doubt the stack is running out, but I have no
other explanations.

1) Does anyone know a flag I can to give GCC to tell it to build the
   executable with lots of stack space?

2) Does anyone know how to get disassembled look at what's going on,
   so I can find out what's causing this bus error?

Thanks for the help... I'm really lost on this one.  I'm upgrading to
gcc-2.5.5 as a shot in the dark.  Since I can't see how a compiler
could get this line wrong, I'm not too hopeful.

-Morgan
--
____________________________________________________________________
Morgan Stair             Boston College           Work: 617-552-8783
Software Engineer        4 Alfred Cir STE 2       Fax:  617-552-8778
Morgan@DL5000.bc.edu     Bedford MA 01730-2363
Technical Details
Message-ID: <MORGAN.93Dec7170653@dl5000.bc.edu>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!pipex!uunet!noc.near.net!delphi.bc.edu!delphi!morgan

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,b82a61bc745c0b3f,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-12-08 08:41:02 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!pipex!uunet!noc.near.net!delphi.bc.edu!delphi!morgan
From: morgan@dl5000.bc.edu (Morgan Stair)
Newsgroups: gnu.gcc.help
Subject: Baffling "Bus error" on sparc-sun-sunos4.1.3 with gcc-2.3.2
Date: 07 Dec 1993 22:06:52 GMT
Organization: Boston College / ISR
Lines: 40
Distribution: world
Message-ID: <MORGAN.93Dec7170653@dl5000.bc.edu>
NNTP-Posting-Host: dl5000.bc.edu