Page MenuHomePhabricator

[asan_symbolize] Teach `asan_symbolize.py` to symbolicate partially symbolicated ASan reports.
AcceptedPublic

Authored by delcypher on Apr 10 2019, 12:27 PM.

Details

Summary

The use case here is to be able symbolicate ASan reports that might be
partially symbolicated, in particular where the function name is known but no source
location is available. This can be caused by missing debug info. Previously we
would only try to symbolicate completely unsymbolicated reports.

The code currently contains an unfortunate quirk to handle a darwin
specific bug (rdar://problem/49784442) in the way partially symbolicated
reports are emitted when the source location is missing.

rdar://problem/49476995

Event Timeline

delcypher created this revision.Apr 10 2019, 12:27 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 10 2019, 12:27 PM
Herald added subscribers: Restricted Project, aprantl. · View Herald Transcript
Eugene.Zelenko added inline comments.
test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc
31

Asserts are not used.

32

Please use cstdlib for C++ code.

delcypher updated this revision to Diff 194610.Apr 10 2019, 4:22 PM
  • Use cstdlib include instead of stdlib.h
  • Remove unused assert.h include
delcypher marked 2 inline comments as done.Apr 10 2019, 4:23 PM

LGTM

Thanks. I need to land the other patches in the stack first though. This is because asan_symbolize.py needs to use the module map to symbolize on darwin when the atos symbolizer is used (the default).

vitalybuka accepted this revision.Apr 24 2019, 11:05 AM
This revision is now accepted and ready to land.Apr 24 2019, 11:05 AM
vitalybuka requested changes to this revision.Apr 24 2019, 11:07 AM

Can you make the tests Posix?

This revision now requires changes to proceed.Apr 24 2019, 11:07 AM

Can you make the tests Posix?

To clarify, do you mean

  1. Split the test up into the Posix and Darwin specific part (use Module map)
  2. Disable the Posix test for Darwin (it won't work until we fix a bug in the Symbolizer implementation for Darwin).

If, yes then this seems like a good idea.

vitalybuka accepted this revision.Apr 26 2019, 10:45 AM

Thanks, You already explained that module-map is Darwin specific on another patch.
You are still welcome to extract Posix stuff if you see how.

This revision is now accepted and ready to land.Apr 26 2019, 10:45 AM