summaryrefslogtreecommitdiff
path: root/test/hwasan
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-04-18 15:30:08 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-04-18 15:30:08 +0000
commit1d9edeabe5ccbf2b62bcdb10ebcd176cb6f284ea (patch)
treea831cc1461558be35bc82cc50cce10d798f2bf6a /test/hwasan
parent4c0639277d03e91ce34f0dfa90215f63f5655051 (diff)
[sanitizer] Minor refactor of ThreadDescriptorSize
Summary: While I was sifting through dead code findings, I stumbled on this function. First, for `__s390__` it always returned 0 for the 1st call, which doesn't seem right. 2nd call & beyond would return the correct value though. Then it duplicated the `atomic_store` multiple times, sometimes with a `if`, sometimes without. Finally it used a capitalized variable name starting with `k` which indicates a constant, and it is not. So: - rename the static global variable; - change the atomic functions to their relaxed version; - move the store to the end, and make sure we return `val` all the time. Reviewers: alekseyshl, eugenis, koriakin Reviewed By: alekseyshl Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D45725 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/hwasan')
0 files changed, 0 insertions, 0 deletions