Skip to content

Commit

Permalink
[sanitizer] Update struct_kernel_stat_sz for mips32 and mipsn32
Browse files Browse the repository at this point in the history
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 #55499

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D135553
  • Loading branch information
wzssyqa authored and MaskRay committed Oct 26, 2022
1 parent 9403a8b commit 76b92df
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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;
Expand Down

0 comments on commit 76b92df

Please sign in to comment.