[compiler-rt] [hwasan] Fixing relocation R_AARCH64_CONDBR19 out of range (PR #67354)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 10:49:08 PDT 2023


================
@@ -89,22 +89,26 @@ __hwasan_tag_mismatch:
   ubfx x16, x0, #4, #52
   ldrb w16, [x9, x16]
   cmp w16, #0xf
-  b.hi __hwasan_tag_mismatch_v2
+  b.hi mismatch
   cmp w16, w17
-  b.lo __hwasan_tag_mismatch_v2
+  b.lo mismatch
 
   // Load the real tag from the last byte of the granule and compare against
   // the pointer tag.
   orr x16, x0, #0xf
   ldrb w16, [x16]
   cmp x16, x0, lsr #56
-  b.ne __hwasan_tag_mismatch_v2
+  b.ne mismatch
 
   // Restore x0, x1 and sp to their values from before the __hwasan_tag_mismatch
   // call and resume execution.
   ldp x0, x1, [sp], #256
   ret
 
+mismatch:
----------------
thurstond wrote:

It would be helpful to leave a comment about why this trampoline is needed, to avoid any future reader trying to optimize this out.

https://github.com/llvm/llvm-project/pull/67354


More information about the llvm-commits mailing list