llvm.org GIT mirror llvm / b0e9b49
[sanstats] Print the correct line information. The instrumentation tracks the return address and not that of the call so we remove one to compensate. Thanks for Peter Collingbourne for confirming the analysis of the problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307871 91177308-0d34-0410-b5e6-96231b3b80d8 Davide Italiano 2 years ago
3 changed file(s) with 8 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 # RUN: sanstats %p/Inputs/debuginfo.stats | FileCheck %s
1
2 # CHECK: stats.cpp:23 vcall.cfi cfi-vcall 37
3 # CHECK: stats.cpp:28 nvcall.cfi cfi-nvcall 51
7575 if (Begin == End)
7676 return nullptr;
7777
78 // As the instrumentation tracks the return address and not
79 // the address of the call to `__sanitizer_stats_report` we
80 // remove one from the address to get the correct DI.
7881 if (Expected LineInfo =
79 Symbolizer.symbolizeCode(Filename, Addr)) {
82 Symbolizer.symbolizeCode(Filename, Addr - 1)) {
8083 llvm::outs() << LineInfo->FileName << ':' << LineInfo->Line << ' '
8184 << LineInfo->FunctionName << ' ';
8285 } else {