[llvm-commits] PATCH: Stub for ASan/TSan symbolizer

Alexey Samsonov samsonov at google.com
Thu May 31 05:39:53 PDT 2012


> What's the goal of this stub? Why is it needed, and how will it fit into
> the bigger picture?


Dynamic tools (AddressSanitizer and ThreadSanitizer) need to symbolize code
locations to produce fine stack traces. AddressSanitizer now uses a .py
script that runs addr2line on a printed report after the program exits.
ThreadSanitizer behaves even worse - AFAIR it starts several addr2line
processes and talks with them via pipe as, unlike ASan, it needs to
symbolize stack traces at run-time to use suppression machinery. It would
be nice
to have a single run-time symbolization machinery that could use a DWARF
data in the binary.

There is an interface to parse DWARF and fetch data from it (it is located
in llvm/DebugInfo/DIContext.h) that we would like to call from the
symbolizer. That would require using llvm code from compiler-rt, but that's
another problem (see thread in llvmdev).


> You use '__' in an identifier -- that's not allowed outside of the
> standard library.
>

See response from Kostya.


> Also, you have comments that don't agree with the file names, and comments
> that don't make a lot af sense (Why is including system headers bad? What
> is mini_libc?). It almost looks like this is cribbed from some other
> codebase???
>

Fixed comments in files and made them more descriptive.


>
> On Thu, May 31, 2012 at 4:22 AM, Alexey Samsonov <samsonov at google.com>wrote:
>
>> Hi,
>>
>> This patch adds a stub for LLVM-based symbolizer that is intended to be
>> used in {Address,Thread}Sanitizer.
>>
>> --
>> Alexey Samsonov, MSK
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>


-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120531/6fb1e1d2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: san_symbolizer2.patch
Type: application/octet-stream
Size: 2007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120531/6fb1e1d2/attachment.obj>


More information about the llvm-commits mailing list