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

Unify symbolization in PrintStackTrace and suppression code #251

Closed
ramosian-glider opened this issue Aug 31, 2015 · 5 comments
Closed

Unify symbolization in PrintStackTrace and suppression code #251

ramosian-glider opened this issue Aug 31, 2015 · 5 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 251

Suppressions should:
- match module name if symbolization is disabled
- use the symbolize callback when present
- use GetPreviousInstructionPc

Reported by earthdok@google.com on 2013-11-29 14:55:10

@ramosian-glider
Copy link
Member Author

Expanding on point #1. Presently, when symbolize=0, we use a dummy symbolizer which
returns 0 symbolized frames. POSIXSymbolizer will fall back to module+offset if the
on-line symbolizer fails, but the dummy symbolizer won't. We don't normally notice
that, because StackTrace::PrintStack reimplements this fallback mechanism. Hence, we
see module+offset in reports even when symbolize=0, but suppression matching (which
doesn't use PrintStack()) won't work. This is bad - in some environments we don't have
the on-line symbolizer, but we still want to skip, e.g., the hundreds of false positives
coming from libfontconfig in Chrome.

Possible extra improvement: with symbolize=1, support a way to get just the module
name first, so we won't have to symbolize if the module name is suppressed (this should
improve performance somewhat).

Also, vis-a-vis #2, I'm guessing the use of symbolize callback needs to be moved from
PrintStack() to the symbolization code as well?

Reported by earthdok@google.com on 2013-12-16 13:34:32

@ramosian-glider
Copy link
Member Author

After the recent changes:
* We create a POSIXSymbolizer (and thus get <module>+<offset>) even if symbolize=0.
So, suppression by module name should now always work. In fact, we have one extra path
in PrintStackTrace which is not present in Symbolizer - fall back to /proc/self/maps
if symbolizer failed to return anything. Do you think we should move this functionality
to Symbolizer as well?
* symbolize callback functionality is removed.
* It is possible to add a method Symbolizer::GetPCModuleAndOffset(), but I'd like to
avoid it unless we see a measurable performance improvement.

Reported by samsonov@google.com on 2013-12-24 19:02:18

@ramosian-glider
Copy link
Member Author

> Do you think we should move this functionality to Symbolizer as well?

I don't see why not.

Reported by earthdok@google.com on 2013-12-24 19:21:54

@ramosian-glider
Copy link
Member Author

This should be fixed at r198025 by a series of recent commits. Currently StackTrace::PrintStack
is pretty straightforward, there is no symbolize callback and no /proc/self/maps fallback.
Symbolizer::GetModuleNameAndOffsetForPC() is implemented and is used in LSan suppression
matcher.

Reported by samsonov@google.com on 2013-12-25 20:23:23

  • Status changed: Fixed

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:13:43

  • Labels added: ProjectAddressSanitizer

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

No branches or pull requests

1 participant