From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A07423850234; Thu, 30 Jun 2022 03:55:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A07423850234 From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/105614] mips64: sanitizer_platform_limits_linux.cpp:75:38: error: static assertion failed Date: Thu, 30 Jun 2022 03:55:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: xry111 at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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: Thu, 30 Jun 2022 03:55:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105614 --- Comment #11 from Xi Ruoyao --- > Removing my "fix" resolves the issue for GCC 12 but I suspect something l= ike > the suggestion from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105614= #c7 > might resolve the issue properly. I don't think so. We have: # define POST_WRITE(p, s) COMMON_SYSCALL_POST_WRITE_RANGE(p, s) and the description of COMMON_SYSCALL_POST_WRITE_RANGE is: // COMMON_SYSCALL_POST_WRITE_RANGE // Called in posthook for regions that were written to by the kern= el // and are now initialized. and, libsanitizer does *not* intercept syscalls, but intercepts libc calls.= So the size value is used by determine if the *libc function call* will overwr= ite the buffer, and the size from glibc header shall be used, not the kernel header. The name "struct_kernel_stat_sz" is just misleading, should be "struct_stat_sz" or "struct_libc_stat_sz".=