summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/symbolize_stack.cc
Commit message (Collapse)AuthorAgeFilesLines
* [LSan] Fix `__sanitizer_print_stack_trace` via fast unwinderJulian Lettner2019-02-201-1/+1
| | | | | | | | | | Summary: Quick follow-up to: https://reviews.llvm.org/D58156 Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58358 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354522 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] On Darwin `__sanitizer_print_stack_trace` only prints topmost frameJulian Lettner2019-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In compiler-rt we have the notion of a `fast` and a `slow` stack unwinder. Darwin currently only supports the fast unwinder. From reading the code, my understanding is that `BufferedStackTrace::Unwind` can be called with `bp=0, stack_top=0, stack_bottom=0, request_fast_unwind=false`. If `request_fast_unwind=true`, then we alos need to supply bp, stack_top, and stack_bottom. However, `BufferedStackTrace::Unwind` uses `StackTrace::WillUseFastUnwind` which will adapt `request_fast_unwind` if the requested unwinder is not supported. On Darwin, the result is that we don't pass actual values for bp, stack_top, and stack_bottom, but end up using the fast unwinder. The tests then fail because we only print the topmost stack frame. This patch adds a check to `WillUseFastUnwind` at the point of usage to avoid the mismatch between `request_fast_unwind` and what `Unwind` actually does. I am also interested in cleaning up the `request_fast_unwind` machinery so this patch just the simplest thing possible so I can enable the tests. Reviewers: vitalybuka, vsk Differential Revision: https://reviews.llvm.org/D58156 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354282 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix sanitizer tool list used to generate sanitizer_common tests to be ↵Dan Liew2019-01-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | up-to-date. Summary: This replaces the sanitizer tool list (used for generating sanitizer_common configurations) with a tool list derived from existing build system information. Previously sanitizer_common had its own list of supported sanitizer tools. This was bad because it was out of sync with the rest of the build system. Notably it meant that the sanitizer_common runtime was only being tested on Darwin the ASan dylib and not the other sanitizer dylibs that are built for Darwin (LSan, TSan, and UBSan). Unfortunately enabling the tests against other sanitizer dylibs has lead to some test failures on Darwin. For now they've been marked as XFAIL until the failures can investigated properly. For Windows and Android we use the old sanitizer tool list to try avoid bot breakages. rdar://problem/47143078 Reviewers: kubamracek, george.karpenkov, yln, samsonov, vitalybuka, krytarowski Subscribers: srhines, mgorny, fedor.sergeev, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D55740 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351398 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix incorrect use of snprintfVitaly Buka2017-02-021-0/+28
Summary: snprintf returns buffer size needed for printing. If buffer was small, calling code receives incorrectly symbolized buffer and fail. Reviewers: eugenis Subscribers: kubamracek, dberris, kcc Differential Revision: https://reviews.llvm.org/D29440 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293930 91177308-0d34-0410-b5e6-96231b3b80d8