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

Demangling of symbol causes recursive error #95

Open
nitnelave opened this issue Jul 7, 2017 · 7 comments
Open

Demangling of symbol causes recursive error #95

nitnelave opened this issue Jul 7, 2017 · 7 comments
Labels

Comments

@nitnelave
Copy link

When trying to demangle the symbol
__ZN7ErrorOrIN5lexer5TokenENS0_8LexErrorEEC2IS2_EET_PNSt9enable_ifIXsr3std10is_base_ofIS2_NSt5decayIS5_E4typeEEE5valueEvE4typeE

I get error: demangling some part of the AST attempted to demangle itself again.

This is a symbol generated by clang++ (c++14), and I think corresponds to something like that:
template <typename E> ErrorOr<lexer::Token, lexer::LexError>::ErrorOr(E, typename enable_if<std::is_base_of<lexer::LexError, typename std::decay<E>::type>::value>::type) for some value of E (maybe lexer::LexError?)

@fitzgen
Copy link
Member

fitzgen commented Jul 9, 2017

Thanks for the bug report!

@fitzgen fitzgen added the bug label Jul 9, 2017
@fitzgen
Copy link
Member

fitzgen commented Jul 9, 2017

c++filt gives me:

ErrorOr<lexer::Token, lexer::LexError>::ErrorOr<lexer::LexError>(lexer::LexError, std::enable_if<std::is_base_of<lexer::LexError, std::decay<lexer::LexError>::type>::value, void>::type*)

@nitnelave
Copy link
Author

I don't know what version of c++filt you are using, but the one I have (GNU c++filt 2.27) doesn't work (it doesn't recognize it as a symbol).

@nitnelave
Copy link
Author

Tried it with a freshly-compiled GNU c++filt 2.28, same thing.

@nitnelave
Copy link
Author

Tried it with c++filt from https://github.com/Chilledheart/llvm-tools with LLVM 3.7, didn't work.

@fitzgen
Copy link
Member

fitzgen commented Jul 10, 2017

OSX uses two underscores, other *nix use one underscore, so if you try removing one of the leading underscores, you'll probably have better luck. I was on OSX when I ran c++filt.

@khuey
Copy link
Collaborator

khuey commented Oct 9, 2020

$ ./target/debug/examples/cppfilt __ZN7ErrorOrIN5lexer5TokenENS0_8LexErrorEEC2IS2_EET_PNSt9enable_ifIXsr3std10is_base_ofIS2_NSt5decayIS5_E4typeEEE5valueEvE4typeE
ErrorOr<lexer::Token, lexer::LexError>::ErrorOr<lexer::LexError>(std::enable_if<std::is_base_of<lexer::LexError, std::decay<lexer::LexError>::type>::value, void>::type*)

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

3 participants