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

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 11:22:18 PDT 2023


Author: Vitaly Buka
Date: 2023-09-25T11:22:15-07:00
New Revision: 0cff5805f541741292d2a8b66c1cec9cc096ff37

URL: https://github.com/llvm/llvm-project/commit/0cff5805f541741292d2a8b66c1cec9cc096ff37
DIFF: https://github.com/llvm/llvm-project/commit/0cff5805f541741292d2a8b66c1cec9cc096ff37.diff

LOG: [hwasan] Fixing relocation R_AARCH64_CONDBR19 out of range (#67354)

Added: 
    

Modified: 
    compiler-rt/lib/hwasan/hwasan_tag_mismatch_aarch64.S

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/hwasan/hwasan_tag_mismatch_aarch64.S b/compiler-rt/lib/hwasan/hwasan_tag_mismatch_aarch64.S
index bcb0df42019029d..fd060c51cd8e202 100644
--- a/compiler-rt/lib/hwasan/hwasan_tag_mismatch_aarch64.S
+++ b/compiler-rt/lib/hwasan/hwasan_tag_mismatch_aarch64.S
@@ -89,16 +89,16 @@ __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.
@@ -108,6 +108,8 @@ __hwasan_tag_mismatch:
 .global __hwasan_tag_mismatch_v2
 .type __hwasan_tag_mismatch_v2, %function
 __hwasan_tag_mismatch_v2:
+// Avoid using global label, to prevent "relocation out of range".
+mismatch:
   CFI_STARTPROC
   BTI_J
 


        


More information about the llvm-commits mailing list