Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

enable backtrace in gcc12 #8784

Open
VinInn opened this issue Oct 24, 2023 · 7 comments
Open

enable backtrace in gcc12 #8784

VinInn opened this issue Oct 24, 2023 · 7 comments

Comments

@VinInn
Copy link

VinInn commented Oct 24, 2023

Would it be possible to enable backtrace in gcc12 adding
--enable-libstdcxx-backtrace=yes
as an option to configure ?

@cmsbuild
Copy link
Contributor

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

@VinInn
Copy link
Author

VinInn commented Oct 24, 2023

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

@VinInn
Copy link
Author

VinInn commented Nov 15, 2023

all issues I reported do GCC (3) have been fixed in all open branches.
In principle one can build gcc12 from latest tag.

@smuzaffar
Copy link
Contributor

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)

@VinInn
Copy link
Author

VinInn commented Nov 15, 2023

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

@smuzaffar
Copy link
Contributor

@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##

@smuzaffar
Copy link
Contributor

#8821 is testing latest GCC 12 for DEVEL IBs

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants