diff options
| author | 2024-02-20 06:57:04 +0000 | |
|---|---|---|
| committer | 2024-02-20 06:57:04 +0000 | |
| commit | 522acbfc6c0cc45ccc3cb7b9fa36cfbcdfc6ad41 (patch) | |
| tree | 2b3619d2d692556c4b416f2e1a2347752c2b0f85 /libs/ui/DisplayIdentification.cpp | |
| parent | 02a9b3158cd070bdd6ef73a1f2e697f4f2f09cef (diff) | |
| parent | 3b1cd386e1539c56dfe235ccc82d4b9834e719d5 (diff) | |
Merge "Turn off integer overflow UBSAN checks for hash functions" into main am: 3b1cd386e1
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2967129
Change-Id: I1eada9da5269992f821633714332f2cf4055e884
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/ui/DisplayIdentification.cpp')
| -rw-r--r-- | libs/ui/DisplayIdentification.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ui/DisplayIdentification.cpp b/libs/ui/DisplayIdentification.cpp index a45ffe1a19..82e5427317 100644 --- a/libs/ui/DisplayIdentification.cpp +++ b/libs/ui/DisplayIdentification.cpp @@ -47,6 +47,7 @@ uint64_t shiftMix(uint64_t val) { return val ^ (val >> 47); } +__attribute__((no_sanitize("unsigned-integer-overflow"))) uint64_t hash64Len16(uint64_t u, uint64_t v) { constexpr uint64_t kMul = 0x9ddfea08eb382d69; uint64_t a = (u ^ v) * kMul; @@ -57,6 +58,7 @@ uint64_t hash64Len16(uint64_t u, uint64_t v) { return b; } +__attribute__((no_sanitize("unsigned-integer-overflow"))) uint64_t hash64Len0To16(const char* s, uint64_t len) { constexpr uint64_t k2 = 0x9ae16a3b2f90404f; constexpr uint64_t k3 = 0xc949d7c7509e6557; @@ -401,4 +403,4 @@ uint64_t cityHash64Len0To16(std::string_view sv) { return hash64Len0To16(sv.data(), len); } -} // namespace android
\ No newline at end of file +} // namespace android |