aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-04-01 00:56:45 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-04-01 00:56:45 +0000
commit8581029d082930c5333775d611ab24b62be8238d (patch)
treefe6b7d8741421b0561e8cf6e92bff7401c408527
parent6bdefa6ca2bdb3d5da8bde6478dc443ad263146d (diff)
parent6e8f3a76eed3de31dccb5f98723f7c3567e7cf02 (diff)
downloadbionic-8581029d082930c5333775d611ab24b62be8238d.tar.gz
Merge "Extempt calculate_gnu_hash_neon from hwasan."
-rw-r--r--linker/arch/arm_neon/linker_gnu_hash_neon.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/linker/arch/arm_neon/linker_gnu_hash_neon.cpp b/linker/arch/arm_neon/linker_gnu_hash_neon.cpp
index 11cf5a3d0..159c66e9d 100644
--- a/linker/arch/arm_neon/linker_gnu_hash_neon.cpp
+++ b/linker/arch/arm_neon/linker_gnu_hash_neon.cpp
@@ -81,6 +81,8 @@ constexpr uint32_t kStepN7 = kStepN6 * 0x3e0f83e1;
// return h;
// }
//
+// This does an within-alignment out-of-bounds read for performance reasons.
+__attribute__((no_sanitize("hwaddress")))
std::pair<uint32_t, uint32_t> calculate_gnu_hash_neon(const char* name) {
// The input string may be misaligned by 0-7 bytes (K). This function loads the first aligned