Illegal instruction problem
Andrew Benson
abenson@obs.carnegiescience.edu
Thu Aug 9 21:31:00 GMT 2012
Hi,
A colleague who's compiling my code using gfortran 4.7.1 is finding that it
crashes with an illegal instruction error. I haven't been able to reproduce
this myself but I'm wondering if it is related to PR53485:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53485
I don't have the requisite knowledge to figure this out myself, but I've
appended below the output from running the code in gdb and dumping out the
same information as in the above bug report. (Compiler details etc. are
included also.) Can anyone tell if this is the same issue as in the above PR,
or advise if there's any other output from gdb that might help to diagnose the
problem?
The code was compiled with:
-Wall -g -fbacktrace -ffpe-trap=invalid,zero,overflow -O3 -ffinite-math-only -
fno-math-errno -march=native
We discovered that removing the -march=native fixed this problem and let the
code run to completion. (A good enough workaround, but I wanted to report this
anyway in case it's a new bug.)
Thanks,
Andrew.
=================== OUTPUT ===================
[dy248@appck original.bad]$ gdb --args Galacticus.exe parameters.xml
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /export/scratch/dy248/Galacticus.exe...done.
(gdb) run
Starting program: /export/scratch/dy248/Galacticus.exe parameters.xml
warning: no loadable sections found in added symbol-file system-supplied DSO
at 0x2aaaaaaab000
[Thread debugging using libthread_db enabled]
Program received signal SIGILL, Illegal instruction.
0x000000000048a756 in op_assign_vs_ch (var=Unhandled dwarf expression opcode
0xf3
) at source/ISO_Varying_String/iso_varying_string.F90:439
439 end subroutine op_assign_VS_CH
(gdb) x/i $pc
0x48a756 <op_assign_vs_ch+358>: vzeroupper
(gdb) info frame
Stack level 0, frame at 0x7fffffffd830:
rip = 0x48a756 in op_assign_vs_ch
(source/ISO_Varying_String/iso_varying_string.F90:439); saved rip 0x462fac
called by frame at 0x7fffffffd8e0
source language fortran.
Arglist at 0x7fffffffd8d0, args: var=Unhandled dwarf expression opcode 0xf3
(gdb) quit
A debugging session is active.
Inferior 1 [process 4097] will be killed.
Quit anyway? (y or n) y
[dy248@appck original.bad]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/export/scratch/dy248/libexec/gcc/x86_64-unknown-linux-
gnu/4.7.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.1/configure --prefix=/export/scratch/dy248/ --
enable-languages=c,c++,fortran --disable-multilib --with-
gmp=/export/scratch/dy248/ --with-mpfr=/export/scratch/dy2486/ --with-
mpc=/export/scratch/dy248/
Thread model: posix
gcc version 4.7.1 (GCC)
[dy248@appck original.bad]$ uname -a
Linux appck.ra.phy.cam.ac.uk 2.6.18-308.11.1.el5 #1 SMP Tue Jul 10 08:48:43
EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
=================== OUTPUT ===================
--
* Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel
More information about the Fortran
mailing list