#576 Yasp-grid probably triggers a GCC bug
Metadata
Property | Value |
---|---|
Reported by | Andreas Lauser (andreas.lauser@iws.uni-stuttgart.de) |
Reported at | Jul 7, 2009 08:34 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Linux |
Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Last edited at | Jul 7, 2009 11:23 |
Closed by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Closed at | Jul 7, 2009 11:23 |
Closed in version | Unknown |
Resolution | Fixed |
Comment |
Description
If the attached file is compiled without optimizations, it crashes in yasp-grid with the following backtrace:
Program received signal SIGSEGV, Segmentation fault. 0x000000000040276a in Dune::MultiYGrid<2, double>::maxlevel (this=0x48e8758b48ffffc2) at ../../dune/grid/yaspgrid/grids.hh:1801 1801 return _maxlevel; (gdb) bt #0 0x000000000040276a in Dune::MultiYGrid<2, double>::maxlevel (this=0x48e8758b48ffffc2) at ../../dune/grid/yaspgrid/grids.hh:1801 #1 (closed) 0x00000000004027c9 in Dune::YaspEntity<0, 2, Dune::YaspGrid<2> const>::isLeaf (this=0x7fffdf82e218) at ../../dune/grid/yaspgrid.hh:812 #2 (closed) 0x00000000004059d7 in Dune::YaspEntity<0, 2, Dune::YaspGrid<2> const>::ileafbegin (this=0x7fffdf82e218) at ../../dune/grid/yaspgrid.hh:825 #3 (closed) 0x0000000000405a2a in Dune::Entity<0, 2, Dune::YaspGrid<2> const, Dune::YaspEntity>::ileafbegin (this=0x7fffdf82e218) at ../../dune/grid/common/entity.hh:352 #4 (closed) 0x0000000000405a96 in MyTest::foo (this=0x7fffdf82e180, element=@0x7fffdf82e388) at test-yaspgrid.cc:32 #5 (closed) 0x000000000040172f in main (argc=1, argv=0x7fffdf82e528) at test-yaspgrid.cc:64
This seems to be a bug in GCC 4.x, as there are no problems when using -O2, or SGrid. I've verified, that this happens for GCC 4.3.1 and GCC 4.2.3. Since my knowledge about YASP is quite limited, I could not come up with a work-around, but IMHO Yasp-grid should work for this code. The following dune-control command can be used to trigger the bug:
./dune-common/bin/dunecontrol --configure-opts="CXXFLAGS='-g -Wall'" all