From: Harri P. <po...@kd...> - 2007-05-21 18:05:37
|
Hi! I did a clean build of the current KDE 4 today and get this crash when launching an application (Konqueror in this case): Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1109830432 (LWP 25309)] 0x41cadd90 in __gnu_cxx::__pool<true>::_M_reclaim_block (this=0x41d39ac0, __p=0x804ac28 "\016", __bytes=27) at /home/porten/gcc/libstdc++-v3/src/mt_allocator.cc:226 226 /home/porten/gcc/libstdc++-v3/src/mt_allocator.cc: No such file or directory. in /home/porten/gcc/libstdc++-v3/src/mt_allocator.cc (gdb) bt #0 0x41cadd90 in __gnu_cxx::__pool<true>::_M_reclaim_block (this=0x41d39ac0, __p=0x804ac28 "\016", __bytes=27) at /home/porten/gcc/libstdc++-v3/src/mt_allocator.cc:226 #1 0x41cae734 in __gnu_cxx::__mt_alloc<char, __gnu_cxx::__common_pool_policy<true> >::deallocate (this=0xbffffbd7, __p=0x804ac28 "\016", __n=27) at /tmp/obj/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h:710 #2 0x41cf5c23 in std::string::_Rep::_M_destroy (this=0x804ac28, __a=@0xbffffc0c) at /tmp/obj/i686-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:371 #3 0x40b46e35 in HelperProgramConfig (this=0x1b) at basic_string.h:207 #4 0x40b47ae8 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /home/porten/svn4/kdesupport/strigi/src/streamanalyzer/endanalyzers/helperendanalyzer.cpp:132 #5 0x40b47b5b in global constructors keyed to _ZN24HelperEndAnalyzerFactory14registerFieldsERN6Strigi13FieldRegisterE () at /home/porten/svn4/kdesupport/strigi/src/streamanalyzer/endanalyzers/helperendanalyzer.cpp:145 #6 0x40b55f95 in __do_global_ctors_aux () from /mnt/extra/kde4/lib/libstreamanalyzer.so.0 #7 0x40b233d5 in _init () from /mnt/extra/kde4/lib/libstreamanalyzer.so.0 #8 0x4000c1ce in _dl_catch_error () from /lib/ld-linux.so.2 #9 0x4000c2ba in _dl_init () from /lib/ld-linux.so.2 #10 0x40000c5d in ?? () from /lib/ld-linux.so.2 (gdb) In helperanalyzer.h I see static const HelperProgramConfig helperconfig; Not good! At least not in a library. Static, global non-POD objects should be avoided at all cost due the problem of the construction/destruction order. Consult your favourite C++ book or search engines for ways out. Harri. |