SOLVED Re: debugging segfault

Anton Shterenlikht mexas@bristol.ac.uk
Fri Mar 4 15:25:00 GMT 2011


On Fri, Mar 04, 2011 at 03:07:42PM +0000, Anton Shterenlikht wrote:
> On amd64 linux with gfortran45, compiled with 
> 
> -W -ffpe-trap=overflow,zero -fdump-core -fbacktrace
> 
> I get this segfault:
> 
> 
> Program received signal 11 (SIGSEGV): Segmentation fault.
> 
> Backtrace for this error:
>   + function __restore_rt (0x478DA0)
>   + function free (0x48C33B)
>   + in the main program
>   + function __libc_start_main (0x474281)
> ** Warning: a core dump was requested, but the core sizelimit
> **          is currently zero.
> 
> Quit
> 
> 
> I narrowed it down to ALLOCATE() statement.
> I'm nowhere near the physical RAM limit.
> In fact, the program segfaults even
> if I ask for an array of length 1.
> 
> How can I debug this further?

 -fbounds-check

The defect code fragment was very far from
the error..

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423



More information about the Fortran mailing list