Mangled name which gets demangled with Go demangler but not with original c++filt !
simonhf opened this issue · comments
Simon Hardy-Francis commented
The mangled name is legit because it came from a legit Linux C++ project which compiles and runs without error.
Any ideas why this fails with c++filt, or where I would submit a bug for c++filt?
$ git clone https://github.com/ianlancetaylor/demangle.git
$ cd demangle/
$ mkdir -p src/github.com/ianlancetaylor/demangle/
$ cp *.go src/github.com/ianlancetaylor/demangle/
$ GOPATH=`pwd` go run c++filt.go _ZSt16forward_as_tupleIJZNK6broker5store7requestINS0_4dataEJRKN3caf13atom_constantILNS4_10atom_valueE4115129EEES3_S3_EEENS4_8expectedIT_EEDpOT0_EUlRS3_E_ZNKS2_IS3_JS9_S3_S3_EEESC_SF_EUlRNS4_5errorEE0_EESt5tupleIJDpOT_EESO_
std::tuple<broker::store::request<broker::data, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data>(caf::atom_constant<(caf::atom_value)4115129> const&, broker::data&&, broker::data&&) const::{lambda(broker::data&)#1}&&, broker::store::request<broker::data, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data>(caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&) const::{lambda(caf::error&)#2}&&> std::forward_as_tuple<broker::store::request<broker::data, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data>(caf::atom_constant<(caf::atom_value)4115129> const&, broker::data&&, broker::data&&) const::{lambda(broker::data&)#1}, broker::store::request<broker::data, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data>(caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&) const::{lambda(caf::error&)#2}>(broker::store::request<broker::data, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data>(caf::atom_constant<(caf::atom_value)4115129> const&, broker::data&&, broker::data&&) const::{lambda(broker::data&)#1}, broker::store::request<broker::data, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data>(caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&, caf::atom_constant<(caf::atom_value)4115129> const&, broker::data, broker::data&&) const::{lambda(caf::error&)#2})
$ c++filt --version | egrep Binutils
GNU c++filt (GNU Binutils for Ubuntu) 2.33
$ c++filt --no-recursion-limit _ZSt16forward_as_tupleIJZNK6broker5store7requestINS0_4dataEJRKN3caf13atom_constantILNS4_10atom_valueE4115129EEES3_S3_EEENS4_8expectedIT_EEDpOT0_EUlRS3_E_ZNKS2_IS3_JS9_S3_S3_EEESC_SF_EUlRNS4_5errorEE0_EESt5tupleIJDpOT_EESO_
_ZSt16forward_as_tupleIJZNK6broker5store7requestINS0_4dataEJRKN3caf13atom_constantILNS4_10atom_valueE4115129EEES3_S3_EEENS4_8expectedIT_EEDpOT0_EUlRS3_E_ZNKS2_IS3_JS9_S3_S3_EEESC_SF_EUlRNS4_5errorEE0_EESt5tupleIJDpOT_EESO_
$ gcc --version | egrep gcc
gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
$ cat --number /usr/include/c++/9/tuple | head -1483 | tail -7
1477 // _GLIBCXX_RESOLVE_LIB_DEFECTS
1478 // 2275. Why is forward_as_tuple not constexpr?
1479 /// std::forward_as_tuple
1480 template<typename... _Elements>
1481 constexpr tuple<_Elements&&...>
1482 forward_as_tuple(_Elements&&... __args) noexcept
1483 { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); }
Ian Lance Taylor commented
If this package demangles it correctly and the c++filt program does not, then the bug should be filed at https://gcc.gnu.org/bugzilla. (Of course it may already have been fixed there.)
Simon Hardy-Francis commented
Thanks! Created the bug here [1].