[PATCH] D11803: Teach `DlAddrSymbolizer::SymbolizeData` how to find symbol size

Ismail Pazarbasi via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 06:37:30 PDT 2015


ismailp created this revision.
ismailp added reviewers: kubabrecka, glider, kcc, samsonov.
ismailp added a subscriber: llvm-commits.

When sanitizers report a problem around a global symbol, error report
contains symbol size. However, sizes of global symbols are 0 on
Darwin, because `Dl_info` doesn't have a field for symbol size.

This patch calculates the symbol size as the distance from given symbol
to next symbol in the same section, or to the end of section, if there
is no next symbol. The result is greater than or equal to the actual
size of symbol. Currently, only 64-bit Mach-O images are supported.

http://reviews.llvm.org/D11803

Files:
  lib/sanitizer_common/sanitizer_symbolizer_mac.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11803.31446.patch
Type: text/x-patch
Size: 12893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150806/ac7ef7d3/attachment-0001.bin>


More information about the llvm-commits mailing list