summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/gwp_asan/tests/compression.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [GWP-ASan] 32-bit test pointers, allow multi-init for test.Mitch Phillips2019-12-091-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: GWP-ASan test currently fail on 32-bit platforms, as some of the pointers are larger than `uintptr_t` on 32-bit platforms. Fix up all those instances. Also add an uncompress varint test where the result is an underflow. Furthermore, allow multi-init for testing. Each gtest when running `check-gwp_asan` apparently runs in its own instance, but when integrating these tests into Android, this behaviour isn't the same. We remove the global multi-init check here, to allow for testing to work elsewhere, and we're not really worried about multi-init anyway as it's part of our contract with the allocator. Reviewers: eugenis, vlad.tsyrklevich Reviewed By: eugenis Subscribers: #sanitizers, llvm-commits, pcc Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71121
* [GWP-ASan] Implement stack frame compression.Mitch Phillips2019-08-151-0/+258
Summary: This patch introduces stack frame compression to GWP-ASan. Each stack frame is variable-length integer encoded as the difference between frame[i] and frame[i - 1]. Furthermore, we use zig-zag encoding on the difference to ensure that negative differences are also encoded into a relatively small number of bytes. Examples of what the compression looks like can be seen in `gwp_asan/tests/compression.cpp`. This compression can reduce the memory consumption cost of stack traces by ~50%. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: mgorny, #sanitizers, llvm-commits, eugenis, morehouse Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66189 llvm-svn: 369048
OpenPOWER on IntegriCloud