-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Some g++ symbols aren't demangled (.localalias & .cold) #869
Comments
I played a bit with demangle unit test and looks like the failure is due to the missing
The test passes if I e.g. remove |
A very naive way to make the test pass would be to add diff --git a/src/demangle.cc b/src/demangle.cc
index 9276c5b..528a4ee 100644
--- a/src/demangle.cc
+++ b/src/demangle.cc
@@ -303,6 +303,7 @@ static bool IsDigit(char c) {
// a function clone suffix.
static bool IsFunctionCloneSuffix(const char *str) {
size_t i = 0;
+ if (strcmp(str, ".localalias") == 0) return true;
while (str[i] != '\0') {
// Consume a single .<alpha>+.<digit>+ sequence.
if (str[i] != '.' || !IsAlpha(str[i + 1])) { |
I noticed another similar case, this time it's a different suffix: |
The glog native demangler is pretty much incomplete and should be regarded as obsolete. glog 0.7.0 will introduce the use of GCC/LLVM provided ABI demangler which will solve als these issues. |
#1023 has landed in |
Glog 0.6.0 can't resolve .localalias & .cold symbols. google/glog#869 It causes the stack trace to contain raw symbols.
I linked glog 0.6.0 using this NixOS recipe (with gflags dependency removed) into my c++ application. I see a stack trace with some C++ symbols properly demangled while a few remain mangled (and good enough for c++filt to decode). E.g.
which after
c++filt
become a pleasant to readI activate the stack trace with
google::InstallFailureSignalHandler();
no further flags or configuration.Is there some kind of limit on the length of mangled identifiers or some other option I'm missing?
The text was updated successfully, but these errors were encountered: