]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
riscv: update riscv_asan_shadow_offset
authorAndreas Schwab <schwab@suse.de>
Sun, 28 May 2023 10:08:22 +0000 (12:08 +0200)
committerAndreas Schwab <schwab@suse.de>
Tue, 30 May 2023 09:18:08 +0000 (11:18 +0200)
gcc/
PR target/110036
* config/riscv/riscv.cc (riscv_asan_shadow_offset): Update to
match libsanitizer.

gcc/config/riscv/riscv.cc

index 35f96f01203f8a201bf85c2dea17325eb46faec4..37e08c04ec6a24254d11fbd8e06d71269aaf77e5 100644 (file)
@@ -7011,10 +7011,9 @@ riscv_asan_shadow_offset (void)
 {
   /* We only have libsanitizer support for RV64 at present.
 
-     This number must match kRiscv*_ShadowOffset* in the file
-     libsanitizer/asan/asan_mapping.h which is currently 1<<29 for rv64,
-     even though 1<<36 makes more sense.  */
-  return TARGET_64BIT ? (HOST_WIDE_INT_1 << 29) : 0;
+     This number must match ASAN_SHADOW_OFFSET_CONST in the file
+     libsanitizer/asan/asan_mapping.h.  */
+  return TARGET_64BIT ? HOST_WIDE_INT_UC (0xd55550000) : 0;
 }
 
 /* Implement TARGET_MANGLE_TYPE.  */