Re: forrtl: severe (174): SIGSEGV due to output file.



fj wrote:
(snip)

I doubt that a too large initial time step could lead to a
segmentation fault. In changing the initial time step, you have
changed the behavior of the program and avoided the bug by chance.

In a properly written program it shouldn't happen, but there
are always ways for things to go wrong.

One that I haven't seen happen in C, but have wondered about
relates to C's internal I/O and the way formatting works.
In C, the width of a formatted output item expands as needed.

char str[400];
sprintf(str,"%f",x);

400 characters should be big enough for any floating
point output conversion, right? I could even believe
a bug in the Fortran library related to output conversion.

A numerical instability is usually very fast and leads to floating
underflow or overflow messages, not to a segmentation fault.

It might lead to negative values in a place that was unexpected.
The program might test for it, and then find an otherwise
hidden bug in code that was never tested.

It would be best to find the real cause. It might cause
wrong answers even when it seems like it works.

-- glen

.



Relevant Pages

  • Re: make cores on 5.4-RELEASE amd64 but not on i386, need a maintainer.
    ... The hardware is OK, no other troubles. ... > This could be a hint to the bug in suffix parsing that Matt found some ... Using current make it does Not Segmentation fault, ...
    (freebsd-current)
  • Re: Core dump with "in memory" file
    ... close STDERR; ... This is perl, ... With 5.10.1 for i386-freebsd I can reproduce the bug without the ... Segmentation fault ...
    (comp.lang.perl.misc)
  • Re: forrtl: severe (174): SIGSEGV due to output file.
    ... a bug in the Fortran library related to output conversion. ... I found and reported just such a bug in one compiler, but the vendor hasn't fixed it yet, when the output conversion requires over 4900 characters. ... Can enormous numbers be printed with F0.5 format? ... Intel and g95 get this one right, albeit with different outputs:-) In the possibly out-of-date version that I don't have superuser privileges to update, gfortran compiles it OK but gives a run-time segmentation fault. ...
    (comp.lang.fortran)
  • Re: Problems with my little c-program
    ... > segmentation fault after running my program. ... find a bug, you need to find which of your assumptions is wrong, ... Make a diagram of a two-element list, ... Take a couple of tokens - two distinct coins, ...
    (comp.lang.c)
  • Re: Debian sid, PHP cli, xdebug, set_error_handler, mysql_list_dbs, throw = Segmentation fault
    ... this time I write to this list to report a bug, a segmentation fault. ... Couldn't find any lead to this bug anywhere else. ... The following PHP code exits in "segmentation fault". ... with Xdebug v2.2.1, Copyright 2002-2012, by Derick Rethans ...
    (Debian-User)