summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/DependencyDirectivesSourceMinimizer.cpp
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2019-08-09 00:52:07 +0000
committerDan Liew <dan@su-root.co.uk>2019-08-09 00:52:07 +0000
commit52a36fae2a3f8560a5be690a67304db5edafc3fe (patch)
tree932349eb8e5835ac8215cd794a0b846f7016a33f /clang/lib/Lex/DependencyDirectivesSourceMinimizer.cpp
parentdbfea28219b65ae278b92c65fc6a7c768478ad85 (diff)
downloadbcm5719-llvm-52a36fae2a3f8560a5be690a67304db5edafc3fe.tar.gz
bcm5719-llvm-52a36fae2a3f8560a5be690a67304db5edafc3fe.zip
[asan_symbolize] Fix bug where the frame counter was not incremented.
Summary: This bug occurred when a plug-in requested that a binary not be symbolized while the script is trying to symbolize a stack frame. In this case `self.frame_no` would not be incremented. This would cause subsequent stack frames that are symbolized to be incorrectly numbered. To fix this `get_symbolized_lines()` has been modified to take an argument that indicates whether the stack frame counter should incremented. In `process_line_posix()` `get_symbolized_lines(None, ...)` is now used in in the case where we don't want to symbolize a line so that we can keep the frame counter increment in a single function. A test case is included. The test uses a dummy plugin that always asks `asan_symbolize.py` script to not symbolize the first binary that the script asks about. Prior to the patch this would cause the output to script to look something like ``` #0 0x0 #0 0x0 in do_access #1 0x0 in main ``` rdar://problem/49476995 Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka Subscribers: #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65495 llvm-svn: 368373
Diffstat (limited to 'clang/lib/Lex/DependencyDirectivesSourceMinimizer.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud