Segmentation fault on start up. Observed on Debian x86_64 GNU/Linux, gcc 4.6/4.7.
geo@fermi:~/RW/mpi/launchmon/launchmon-1.0-release$ launchmon
Segmentation fault
geo@fermi:~/RW/mpi/launchmon/launchmon-1.0-release$
geo@fermi:~/RW/mpi/launchmon/launchmon-1.0-release$ gdb launchmon
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/geo/RW/mpi/launchmon/launchmon-1.0-release/lmon-srun/bin/launchmon...done.
(gdb) run
Starting program: /home/geo/RW/mpi/launchmon/launchmon-1.0-release/lmon-srun/bin/launchmon
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff777df4b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff777df4b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00000000004136cb in __static_initialization_and_destruction_1 (__initialize_p=<optimized out>, __priority=<optimized out>) at sdbg_linux_ttracer_impl.hxx:77
#2 _GLOBAL__sub_I__ZN17linux_launchmon_t8init_APIEP11opts_args_t () at sdbg_linux_launchmon.cxx:3398
#3 0x0000000000438d2d in __libc_csu_init ()
#4 0x00007ffff6ebce40 in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=0x438cd0 <__libc_csu_init>,
fini=0x7ffff7220320 <initial>, rtld_fini=0x7ffff79a7c90 <typeinfo for std::locale::facet>, stack_end=0x7fffffffdc28) at libc-start.c:187
#5 0x0000000000413e81 in _start ()
(gdb)
This is because of std::string module_name and module_symbol which requires basic_string(std::string const&) before strings could be used. Solution: replace std::string with const char*. Tested on same Debian x86_64 GNU/Linux. Patch is submitted.
svn diff with fix