From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C05FE385734C; Mon, 16 May 2022 08:53:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C05FE385734C From: "judge.packham at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/105614] New: mips64: sanitizer_platform_limits_linux.cpp:75:38: error: static assertion failed Date: Mon, 16 May 2022 08:53:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: judge.packham at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2022 08:53:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105614 Bug ID: 105614 Summary: mips64: sanitizer_platform_limits_linux.cpp:75:38: error: static assertion failed Product: gcc Version: 11.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: judge.packham at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxi= n at gcc dot gnu.org Target Milestone: --- Building for mips64-unknown-linux-gnu with libsanitizer enabled the followi= ng static_assert is triggered. [ALL ] In file included from /home/ctng/crosstool-ng/.build/mips64-unknown-linux-gnu/src/gcc/libsanitize= r/sanitizer_common/sanitizer_platform_limits_linux.cpp:21:=20 [ERROR]=20=20=20 /home/ctng/crosstool-ng/.build/mips64-unknown-linux-gnu/src/gcc/libsanitize= r/sanitizer_common/sanitizer_platform_limits_linux.cpp:75:38: error: static assertion failed=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 [ALL ] 75 | COMPILER_CHECK(struct_kernel_stat_sz =3D=3D sizeof(struct stat));=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 [ALL ] | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~= ~~~=20=20 [ALL ]=20=20=20 /home/ctng/crosstool-ng/.build/mips64-unknown-linux-gnu/src/gcc/libsanitize= r/sanitizer_common/sanitizer_internal_defs.h:332:44: note: in definition of macro 'COMPILER_CHECK'=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ALL ] 332 | #define COMPILER_CHECK(pred) static_assert(pred, "")=20= =20=20=20=20=20=20=20=20 [ALL ] | ^~~~=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 [ERROR] make[5]: *** [Makefile:615: sanitizer_platform_limits_linux.lo] Error 1=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 [ERROR] make[5]: *** Waiting for unfinished jobs....=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 Looking at the libsanitizer code I see=20 #elif defined(__mips__) const unsigned struct_kernel_stat_sz =3D SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) : FIRST_32_SECOND_64(144, 216); const unsigned struct_kernel_stat64_sz =3D 104; But from the Linux kernel's arch/mips/include/uapi/asm/stat.h I make the si= ze of struct stat 104 for the _MIPS_SIM_ABI64 case. The 144 seems to line up w= ith the _MIPS_SIM_NABI32/_MIPS_SIM_ABI32 case. Where did libsanitizer get 216 from?=