From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 90C3C387476E for ; Mon, 25 Jul 2022 07:04:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 90C3C387476E Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 5CA39667CC; Mon, 25 Jul 2022 03:04:36 -0400 (EDT) Message-ID: <4ae7033e87198cfed67db923f28139f877f4aa03.camel@xry111.site> Subject: Re: [PATCH] libsanitizer: Cherry-pick 2bfb0fcb51510f22723c8cdfefe from upstream From: Xi Ruoyao To: Dimitrije Milosevic , "gcc-patches@gcc.gnu.org" Cc: Djordje Todorovic , Richard Sandiford Date: Mon, 25 Jul 2022 15:04:34 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2022 07:04:41 -0000 LGTM. Requiring permission to push. > +const unsigned struct_kernel_stat_sz =3D > +=C2=A0=C2=A0=C2=A0 SANITIZER_ANDROID > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ? FIRST_32_SECOND_64(104, 128= ) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : FIRST_32_SECOND_64((_MIPS_S= IM =3D=3D _ABIN32) ? 160 : 144, 216); These values matches sizeof(struct stat) on gcc230, so should be correct: xry111@gcc230:~$ cat t.c #include #include int main() { printf("%d\n", sizeof(struct stat)); } xry111@gcc230:~$ cc t.c -mabi=3D32 && ./a.out=20 144 xry111@gcc230:~$ cc t.c -mabi=3Dn32 && ./a.out=20 160 xry111@gcc230:~$ cc t.c -mabi=3D64 && ./a.out=20 216 --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University