Strange segmentation fault
Toon Moene
toon@moene.indiv.nluug.nl
Mon Oct 2 17:11:00 GMT 2000
Bernard Heymann wrote:
>
> We are baffled by a problem that cropped up in one of our Fortran
> programs compiled using g77, which compiles and runs when compiled with
> the IRIX MIPSpro f90 compiler or the VMS Fortran compiler. When we call
> a subroutine with arguments required to dimension an array, we get a
> segmentation fault in the subroutine call. Decreasing the size of the
> array being dimensioned below a certain threshold solved the problem.
You're running into the limit on available stacksize on your system.
g77 allocates "automatic arrays" (like the ones you use) on the stack,
and the allocation that corresponds to the crash apparently exceeds the
available space.
See if you can enhance the available stack space with
ulimit -s <size>
Hope this helps,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
More information about the Gcc-bugs
mailing list