Hi!
With the newest GCC 4.9 snapshot
$ gcc --version
gcc (GCC) 4.9.2 20140716 (prerelease)
and today's SVN Getfem (r4724), I get segfaults with running my Getfem
programs, which are compiled with the option -std=gnu++11. After
compiling my programs with debug symbols and no -Ox option, this is
what GDB has to say:
(gdb) run
Starting program: /work/build_getfem/stencil.exe
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x0000000000467fda in std::_Rb_tree<getfem::mesh::edge,
getfem::mesh::edge, std::_Identity<getfem::mesh::edge>,
std::less<getfem::mesh::edge>, std::allocator<getfem::mesh::edge>
>::_S_right (__x=0x636e6174736e695f)
at
/mn/anatu/cma-u3/tmac/usr/stow/gcc/include/c++/4.9.2/bits/stl_tree.h:553
553 { return static_cast<_Link_type>(__x->_M_right); }
(gdb) bt
#0 0x0000000000467fda in std::_Rb_tree<getfem::mesh::edge,
getfem::mesh::edge, std::_Identity<getfem::mesh::edge>,
std::less<getfem::mesh::edge>, std::allocator<getfem::mesh::edge>
>::_S_right (__x=0x636e6174736e695f)
at
/mn/anatu/cma-u3/tmac/usr/stow/gcc/include/c++/4.9.2/bits/stl_tree.h:553
#1 0x000000000046016e in std::_Rb_tree<getfem::mesh::edge,
getfem::mesh::edge, std::_Identity<getfem::mesh::edge>,
std::less<getfem::mesh::edge>, std::allocator<getfem::mesh::edge>
>::_M_erase (
this=0x481700 <typeinfo name for
dal::singleton_instance<bgeot::block_allocator, 1000>>,
__x=0x636e6174736e695f) at
/mn/anatu/cma-u3/tmac/usr/stow/gcc/include/c++/4.9.2/bits/stl_tree.h:1245
#2 0x000000000045a4c4 in std::_Rb_tree<getfem::mesh::edge,
getfem::mesh::edge, std::_Identity<getfem::mesh::edge>,
std::less<getfem::mesh::edge>, std::allocator<getfem::mesh::edge>
>::~_Rb_tree (
this=0x481700 <typeinfo name for
dal::singleton_instance<bgeot::block_allocator, 1000>>,
__in_chrg=<optimized out>) at
/mn/anatu/cma-u3/tmac/usr/stow/gcc/include/c++/4.9.2/bits/stl_tree.h:715
#3 0x0000000000457e2e in std::set<getfem::mesh::edge,
std::less<getfem::mesh::edge>, std::allocator<getfem::mesh::edge>
>::~set (this=0x481700 <typeinfo name for
dal::singleton_instance<bgeot::block_allocator, 1000>>,
__in_chrg=<optimized out>) at
/mn/anatu/cma-u3/tmac/usr/stow/gcc/include/c++/4.9.2/bits/stl_set.h:90
#4 0x0000000000457e4e in
getfem::mesh::Bank_info_struct::~Bank_info_struct (this=0x4815c8
<vtable for getfem::mesh+72>, __in_chrg=<optimized out>) at
/mn/anatu/cma-u3/tmac/usr/stow/getfem/include/getfem/getfem_mesh.h:538
#5 0x0000000000457ed3 in getfem::mesh::~mesh (this=0x7fffffffd078,
__in_chrg=<optimized out>, __vtt_parm=<optimized out>) at
/mn/anatu/cma-u3/tmac/usr/stow/getfem/include/getfem/getfem_mesh.h:507
#6 0x00007ffff7af439b in getfem::ga_workspace::~ga_workspace() ()
from /mn/anatu/cma-u3/tmac/usr/lib/libgetfem.so.4
#7 0x00007ffff7af451e in
getfem::ga_predef_function::~ga_predef_function() () from
/mn/anatu/cma-u3/tmac/usr/lib/libgetfem.so.4
#8 0x00007ffff7ab8ad8 in std::map<std::string,
getfem::ga_predef_function, std::less<std::string>,
std::allocator<std::pair<std::string const,
getfem::ga_predef_function> > >::operator[](std::string const&) [clone
.constprop.1773] ()
from /mn/anatu/cma-u3/tmac/usr/lib/libgetfem.so.4
#9 0x00007ffff7ab8dcd in getfem::init_predef_functions() () from
/mn/anatu/cma-u3/tmac/usr/lib/libgetfem.so.4
#10 0x00007ffff7af8f89 in _GLOBAL__sub_I_getfem_generic_assembly.cc ()
from /mn/anatu/cma-u3/tmac/usr/lib/libgetfem.so.4
#11 0x00007ffff7cac216 in __do_global_ctors_aux () from
/mn/anatu/cma-u3/tmac/usr/lib/libgetfem.so.4
#12 0x00007ffff784c843 in _init () from
/mn/anatu/cma-u3/tmac/usr/lib/libgetfem.so.4
#13 0x00007ffff6a164c8 in ?? ()
#14 0x0000003d81a0e555 in _dl_init_internal () from
/lib64/ld-linux-x86-64.so.2
#15 0x0000003d81a00b3a in _dl_start_user () from
/lib64/ld-linux-x86-64.so.2
#16 0x0000000000000001 in ?? ()
#17 0x00007fffffffe523 in ?? ()
#18 0x0000000000000000 in ?? ()
(gdb) quit
The same programs run fine using an older version of the Getfem
library, although I'm not sure how to identify the exact SVN revision
of my old Getfem installation.
Best regards
Torquil Sørensen