PING: [PATCH] libsanitizer: Cherry-pick 2bfb0fcb51510f22723c8cdfefe from upstream

Message ID AM0PR03MB488240CC50ACE2ACD7CFA90582979@AM0PR03MB4882.eurprd03.prod.outlook.com
State New, archived
Headers
Series PING: [PATCH] libsanitizer: Cherry-pick 2bfb0fcb51510f22723c8cdfefe from upstream |

Commit Message

Dimitrije Milošević July 27, 2022, 6:41 a.m. UTC
  Gentle ping, requiring someone to push this change, as I do not have commit access. :)

From: Dimitrije Milosevic
Sent: Monday, July 25, 2022 8:55 AM
To: gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>
Cc: Djordje Todorovic <Djordje.Todorovic@syrmia.com>; xry111@xry111.site <xry111@xry111.site>
Subject: [PATCH] libsanitizer: Cherry-pick 2bfb0fcb51510f22723c8cdfefe from upstream 
 
2bfb0fcb51510f22723c8cdfefe [Sanitizer][MIPS] Fix stat struct size for the O32 ABI.

Signed-off-by: Dimitrije Milosevic <dimitrije.milosevic@syrmia.com>.

---
 .../sanitizer_common/sanitizer_platform_limits_posix.h     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Comments

Xi Ruoyao July 27, 2022, 6:43 a.m. UTC | #1
On Wed, 2022-07-27 at 06:41 +0000, Dimitrije Milosevic wrote:
> Gentle ping, requiring someone to push this change, as I do not have
> commit access. :)

Do you know someone very familiar with MIPS and GCC and capable as a
port maintainer?  An active MIPS port maintainer will make the situation
better.
  
Dimitrije Milošević July 27, 2022, 6:52 a.m. UTC | #2
> Do you know someone very familiar with MIPS and GCC and capable as a
> port maintainer?  An active MIPS port maintainer will make the situation
> better.
Sadly, no. I agree it would make things easier.


From: Xi Ruoyao <xry111@xry111.site>
Sent: Wednesday, July 27, 2022 8:43 AM
To: Dimitrije Milosevic <Dimitrije.Milosevic@Syrmia.com>; gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>
Cc: Djordje Todorovic <Djordje.Todorovic@syrmia.com>; richard.sandiford@arm.com <richard.sandiford@arm.com>
Subject: Re: PING: [PATCH] libsanitizer: Cherry-pick 2bfb0fcb51510f22723c8cdfefe from upstream 
 
On Wed, 2022-07-27 at 06:41 +0000, Dimitrije Milosevic wrote:
> Gentle ping, requiring someone to push this change, as I do not have
> commit access. :)

Do you know someone very familiar with MIPS and GCC and capable as a
port maintainer?  An active MIPS port maintainer will make the situation
better.
  
Richard Sandiford July 27, 2022, 12:57 p.m. UTC | #3
Dimitrije Milosevic <Dimitrije.Milosevic@Syrmia.com> writes:
>> Do you know someone very familiar with MIPS and GCC and capable as a
>> port maintainer?  An active MIPS port maintainer will make the situation
>> better.
> Sadly, no. I agree it would make things easier.

Yeah, I agree that's what we need.  I stepped down from being a MIPS
maintainer over eight years ago and Matthew moved on to other things
several years ago as well.  The port has been unmaintained for a long
time now.

For a while I tried to be practical and approve trivial patches, even
though working for an IP company makes that somewhat awkward from a
conflict-of-interest perspective.  But it's been so long now since
I worked on MIPS that the technical side is becoming a problem too.

Thanks,
Richard
  

Patch

diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index 89772a7e5c0..75c6cc7f285 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -81,9 +81,10 @@  const unsigned struct_kernel_stat64_sz = 104;
 const unsigned struct_kernel_stat_sz = 144;
 const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__mips__)
-const unsigned struct_kernel_stat_sz = SANITIZER_ANDROID
-                                           ? FIRST_32_SECOND_64(104, 128)
-                                           : FIRST_32_SECOND_64(144, 216);
+const unsigned struct_kernel_stat_sz =
+    SANITIZER_ANDROID
+        ? FIRST_32_SECOND_64(104, 128)
+        : FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 160 : 144, 216);
 const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__s390__) && !defined(__s390x__)
 const unsigned struct_kernel_stat_sz = 64;