diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-03-07 16:22:16 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-03-07 16:22:16 +0000 |
commit | df0d7bf4bc073d15b096b88a26ec7e7871c942d4 (patch) | |
tree | 5211ca414e49d6ec57c6bf4d539de06925492ab1 /test/scudo | |
parent | 41f54f83a6b2114e4bc2237537f2feaed18fc6b8 (diff) |
[scudo] Make logging more consistent
Summary:
A few changes related to logging:
- prepend `Scudo` to the error messages so that users can identify that we
reported an error;
- replace a couple of `Report` calls in the RSS check code with
`dieWithMessage`/`Print`, mark a condition as `UNLIKELY` in the process;
- change some messages so that they all look more or less the same. This
includes the `CHECK` message;
- adapt a couple of tests with the new strings.
A couple of side notes: this results in a few 1-line-blocks, for which I left
brackets. There doesn't seem to be any style guide for that, I can remove them
if need be. I didn't use `SanitizerToolName` in the strings, but directly
`Scudo` because we are the only users, I could change that too.
Reviewers: alekseyshl, flowerhack
Reviewed By: alekseyshl
Subscribers: mgorny, delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D44171
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326901 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/scudo')
-rw-r--r-- | test/scudo/alignment.c | 2 | ||||
-rw-r--r-- | test/scudo/sized-delete.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/scudo/alignment.c b/test/scudo/alignment.c index 6235d5060..4e2dc1af0 100644 --- a/test/scudo/alignment.c +++ b/test/scudo/alignment.c @@ -20,4 +20,4 @@ int main(int argc, char **argv) return 0; } -// CHECK: ERROR: attempted to deallocate a chunk not properly aligned +// CHECK: ERROR: misaligned pointer when deallocating address diff --git a/test/scudo/sized-delete.cpp b/test/scudo/sized-delete.cpp index 85df05e2f..81151b097 100644 --- a/test/scudo/sized-delete.cpp +++ b/test/scudo/sized-delete.cpp @@ -38,4 +38,4 @@ int main(int argc, char **argv) return 0; } -// CHECK: ERROR: invalid sized delete on chunk at address +// CHECK: ERROR: invalid sized delete when deallocating address |