From: YunQiang Su Date: Wed, 26 Oct 2022 02:00:38 +0000 (-0700) Subject: [sanitizer] Update struct_kernel_stat_sz for mips32 and mipsn32 X-Git-Tag: upstream/17.0.6~29500 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76b92df0d6915aa419c6856f97198df3321c35d7;p=platform%2Fupstream%2Fllvm.git [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 --- 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 bd5692e..44dd3d9 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;