cmsdist
cmsdist copied to clipboard
enable backtrace in gcc12
Would it be possible to enable backtrace in gcc12 adding
--enable-libstdcxx-backtrace=yes
as an option to configure ?
A new Issue was created by @VinInn Vincenzo Innocente.
@smuzaffar, @rappoccio, @Dr15Jones, @antoniovilela, @makortel, @sextonkennedy can you please review it and eventually sign/assign? Thanks.
cms-bot commands are listed here
In reality we have to wait for 12.4 to make proper use of it (unless we patch gcc ourselves) see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111936
all issues I reported do GCC (3) have been fixed in all open branches. In principle one can build gcc12 from latest tag.
thanks @VinInn , I was hoping that GCC 12.4 will come out soon ( normally gcc does release minor update version in 2nd half of the year). So lets wait a a bit more otherwise we can update to gcc 12 latest in Dec (not that updating gcc does require rebuilding all externals)
ok. I understand. We may build a new gcc12 just for testing. this is the last commit required https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=a97c08ea530dadf366022b5c3e5aab21d34a61bd
@VinInn , I have managed to build latest gcc 12 branch and managed to build shared library using your example at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111936#c1 and successfully ran a tests . Shared library was built to link against -lstdc++_libbacktrace
.
bash-4.4$ ../../../test/el8_amd64_gcc12/get_stacktrace
asked 512 at get_stacktrace[abi:cxx11]()#myMallocHook#operator new(unsigned long)#operator new(unsigned long, std::nothrow_t const&)#std::basic_stacktrace<std::allocator<std::stacktrace_entry> >::current(std::allocator<std::stacktrace_entry> const&) [clone .constprop.0]#get_stacktrace[abi:cxx11]()#main#__libc_start_main#_start##
asked 32 at get_stacktrace[abi:cxx11]()#myMallocHook#d_growable_string_resize#d_print_flush#d_demangle#std::stacktrace_entry::_M_get_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int*) const::{lambda(void*, unsigned long, char const*, unsigned long, unsigned long)#2}::_FUN(void*, unsigned long, char const*, unsigned long, unsigned long)#__glibcxx_backtrace_syminfo#get_stacktrace[abi:cxx11]()#main#__libc_start_main#_start##
asked 31 at get_stacktrace[abi:cxx11]()#myMallocHook#operator new(unsigned long)#std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) [clone .constprop.0] [clone .isra.0]#std::stacktrace_entry::_M_get_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int*) const::{lambda(void*, unsigned long, char const*, unsigned long, unsigned long)#2}::_FUN(void*, unsigned long, char const*, unsigned long, unsigned long)#__glibcxx_backtrace_syminfo#get_stacktrace[abi:cxx11]()#main#__libc_start_main#_start##
asked 31 at get_stacktrace[abi:cxx11]()#myMallocHook#operator new(unsigned long)#get_stacktrace[abi:cxx11]()#main#__libc_start_main#_start##
asked 61 at get_stacktrace[abi:cxx11]()#myMallocHook#operator new(unsigned long)#get_stacktrace[abi:cxx11]()#main#__libc_start_main#_start##
asked 31 at get_stacktrace[abi:cxx11]()#myMallocHook#operator new(unsigned long)#std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) [clone .constprop.0] [clone .isra.0]#std::stacktrace_entry::_M_get_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int*) const::{lambda(void*, unsigned long, char const*, unsigned long, unsigned long)#2}::_FUN(void*, unsigned long, char const*, unsigned long, unsigned long)#__glibcxx_backtrace_syminfo#get_stacktrace[abi:cxx11]()#main#__libc_start_main#_start##
get_stacktrace[abi:cxx11]()#main#__libc_start_main#_start##
https://github.com/cms-sw/cmsdist/pull/8821 is testing latest GCC 12 for DEVEL IBs