Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

demangle _Z1jI1AEDTcldtfp_cvPT_EES1_ #69

Open
tromey opened this issue Mar 9, 2017 · 13 comments
Open

demangle _Z1jI1AEDTcldtfp_cvPT_EES1_ #69

tromey opened this issue Mar 9, 2017 · 13 comments
Labels

Comments

@tromey
Copy link
Member

tromey commented Mar 9, 2017

I got this from ianlancetaylor/demangle#3

pokyo. ./target/debug/cppfilt  
_Z1jI1AEDTcldtfp_cvPT_EES1_
j<A>DTcldtfp_cvPT_EES1_

But the right answer is:

pokyo. c++filt _Z1jI1AEDTcldtfp_cvPT_EES1_
decltype (({parm#1}.(operator A*))()) j<A>(A)

or something like that -- llvm differs here and that "parm#1" seems suspicious.

@fitzgen

This comment has been minimized.

@jimblandy

This comment has been minimized.

@khuey

This comment has been minimized.

@fitzgen fitzgen added the bug label Jul 9, 2017
@jan-auer
Copy link
Contributor

jan-auer commented Jan 9, 2018

Adding one more example with likely the same cause. Symbol fails to parse:

_Z3MinIiiEDTqultfp_fp0_cl7forwardIT_Efp_Ecl7forwardIT0_Efp0_EEOS0_OS1_

decltype (({parm#1}<{parm#2})?((forward<int>)({parm#1})) : ((forward<int>)({parm#2}))) Min<int, int>(int&&, int&&)

@fitzgen
Copy link
Member

fitzgen commented May 14, 2018

The original input will demangle OK, but not the same as libiberty now:

              _Z1jI1AEDTcldtfp_cvPT_EES1_
libiberty:    decltype (({parm#1}.(operator A*))()) j<A>(A)
cpp_demangle: decltype (({parm#1}.operator A*)()) j<A>(A)

@fitzgen
Copy link
Member

fitzgen commented May 14, 2018

This one demangles correctly now.

Here's another symbol that can't be parsed, probably for similar reasons.

khuey@minbar:~/dev/cpp_demangle$ ./target/debug/cppfilt
_ZN16already_AddRefedIN7mozilla6detail16RunnableFunctionIZNS0_3ipc21AsyncMinidumpAnalyzer3RunEvEUlvE_EEEC4Ev
_ZN16already_AddRefedIN7mozilla6detail16RunnableFunctionIZNS0_3ipc21AsyncMinidumpAnalyzer3RunEvEUlvE_EEEC4Ev
khuey@minbar:~/dev/cpp_demangle$ c++filt _ZN16already_AddRefedIN7mozilla6detail16RunnableFunctionIZNS0_3ipc21AsyncMinidumpAnalyzer3RunEvEUlvE_EEEC4Ev
already_AddRefed<mozilla::detail::RunnableFunction<mozilla::ipc::AsyncMinidumpAnalyzer::Run()::{lambda()#1}> >::already_AddRefed()

@fitzgen
Copy link
Member

fitzgen commented May 14, 2018

Adding one more example with likely the same cause. Symbol fails to parse:

This one is OK but not quite the same as libiberty:

              _Z3MinIiiEDTqultfp_fp0_cl7forwardIT_Efp_Ecl7forwardIT0_Efp0_EEOS0_OS1_
libiberty:    decltype (({parm#1}<{parm#2})?((forward<int>)({parm#1})) : ((forward<int>)({parm#2}))) Min<int, int>(int&&, int&&)
cpp_demangle: decltype (({parm#1})<({parm#2}) ? (forward<int>)({parm#1}) : (forward<int>)({parm#2})) Min<int, int>(int&&, int&&)

fitzgen added a commit that referenced this issue May 14, 2018
Two of them still aren't formatted 100% correctly, but they didn't parse+format
at all way back when, so it is nice to have some kind of test here.

cc #69
@fitzgen
Copy link
Member

fitzgen commented May 14, 2018

Reduced test case for the ?: formatting:

              _Z3abcDTqult3def3ghi3jkl3mnoE
libiberty:    abc(decltype ((def<ghi)?jkl : mno))
cpp_demangle: abc(decltype ((def)<(ghi) ? jkl : mno))

@khuey
Copy link
Collaborator

khuey commented May 14, 2018

Some of that formatting is probably fixed by #145

@Saldivarcher
Copy link
Collaborator

_Z3MinIiiEDTqultfp_fp0_cl7forwardIT_Efp_Ecl7forwardIT0_Efp0_EEOS0_OS1_ demangles the same as libiberty now, but _Z3abcDTqult3def3ghi3jkl3mnoE still does not. :/

@lynnux
Copy link

lynnux commented Jan 7, 2020

_ZGTtNKSt11logic_error4whatEv fail, but http://demangler.com/ do good: transaction clone for std::logic_error::what() const

@khuey
Copy link
Collaborator

khuey commented Oct 9, 2020

_ZGTtNKSt11logic_error4whatEv fail, but http://demangler.com/ do good: transaction clone for std::logic_error::what() const

This is #214 now.

@khuey
Copy link
Collaborator

khuey commented Oct 9, 2020

_Z3MinIiiEDTqultfp_fp0_cl7forwardIT_Efp_Ecl7forwardIT0_Efp0_EEOS0_OS1_ demangles the same as libiberty now, but _Z3abcDTqult3def3ghi3jkl3mnoE still does not. :/

The only difference I see for _Z3abcDTqult3def3ghi3jkl3mnoE is how many parentheses are used (we're a little parentheses happy compared to libiberty).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants