[compiler-rt] 76b92df - [sanitizer] Update struct_kernel_stat_sz for mips32 and mipsn32

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 19:00:44 PDT 2022


Author: YunQiang Su
Date: 2022-10-25T19:00:38-07:00
New Revision: 76b92df0d6915aa419c6856f97198df3321c35d7

URL: https://github.com/llvm/llvm-project/commit/76b92df0d6915aa419c6856f97198df3321c35d7
DIFF: https://github.com/llvm/llvm-project/commit/76b92df0d6915aa419c6856f97198df3321c35d7.diff

LOG: [sanitizer] Update struct_kernel_stat_sz for mips32 and mipsn32

On mips32 _LARGEFILE_SOURCE and _FILE_OFFSET_BITS == 64 is used (compiler-rt/cmake/base-config-ix.cmake),
thus the correct struct_kernel_stat_sz should be 160 instead of 144.

This value is also updated for N32, since we will use
_LARGEFILE_SOURCE and _FILE_OFFSET_BITS == 64 in future.

Fix https://github.com/llvm/llvm-project/issues/55499

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D135553

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index bd5692ed511b2..44dd3d9e22d1c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -101,7 +101,7 @@ const unsigned struct_kernel_stat64_sz = 104;
 const unsigned struct_kernel_stat_sz =
     SANITIZER_ANDROID
         ? FIRST_32_SECOND_64(104, 128)
-        : FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 160 : 144, 216);
+        : FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 176 : 160, 216);
 const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__s390__) && !defined(__s390x__)
 const unsigned struct_kernel_stat_sz = 64;


        


More information about the llvm-commits mailing list