This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: CREAD buggy?
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: fortran at gcc dot gnu dot org
- Date: Sat, 30 Jul 2005 11:44:28 -0700
- Subject: Re: CREAD buggy?
- References: <20050730182057.B4E9D1DC154@bromo.msbb.uc.edu>
On Sat, Jul 30, 2005 at 02:20:57PM -0400, Jack Howarth wrote:
> I have been able to build xplor-nih using the new cray pointer patches
> and xplor-nih passes most of its testsuite. However, I see subset of tests
> fail with segfaults that all seem to be in calls to CREAD. The gdb output
> shows...
>
> COOR>ATOM 1 C4 DNP 250 -4.070 58.954 181.339 1.00 0.00
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x00016ff0
My initial guess would be that you are stepping outside of
an array bounds.
> The CREAD call in question is of the form...
>
> CALL CREAD(X, Y, Z, WMAIN, QMAIN, ISLCT, heap(p_segid),
> & heap(p_res), heap(p_resid), heap(p_type))
>
Will these cause an aliasing problem heap(p_segid), heap(p_res),
heap(p_resid), and heap(p_type)?
> INTEGER ISLCT(*)
> INTEGER HEAPDM
> PARAMETER (HEAPDM=2)
> C dummy array to be able to use pointers in FORTRAN.
> INTEGER HEAP(HEAPDM)
The heap has 2 elements, and I'm suspicious that you have
an aliasing problem. Unfortnately, xplor-nih requires
registeration to get access to the source, so I can't
look at the code.
--
Steve