[ILUG] Segmentation Fault

Chris Higgins chris.higgins at horizon.ie
Thu Sep 13 14:29:31 IST 2001


> 
> But when I try to use it as an inpout for the second fortran program, I get 
> "Segmentation Fault".

A segmentation fault, is an attempt by your program to access a portion
of memory which does not belong to the process. It's more usual to see them
in C programs - in which case it's usually a non-initialised pointer, or
data overrun..

Use strace to see exactly what your program is doing, and you might find that
it's failing to perform some system operation - if you are then assuming that
the system operation succeeded and doing something based on a return value -
you might be using an invalid return value..

Strace should help loads....

> 
> Ok, here's the question: in general, what causes segmentation faults?
> 
> I've gone through the second fortran program, even added in print commands 
> to see how far down the program, I was getting, but the first one isn't even 
> reached.
> 
> I've checked anything I can think of - file permissions, etc - and I can't 
> find anything.
> 
> Any suggestions????????
> 
> 
> Mike
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> -- 
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie

-- 
** Chris Higgins                         e: chris.higgins at horizon.ie **
** Technical Business Development        tel: +353-1-6204916            **
** Horizon Technology Group              fax: +353-1-6204949            **






More information about the ILUG mailing list