From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D2AF23857806; Fri, 13 May 2022 04:02:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2AF23857806 From: "siddhesh at sourceware dot org" To: elfutils-devel@sourceware.org Subject: [Bug libc/29141] _FORTIFY_SOURCE=3 fail for gcc 12/glibc 2.35 Date: Fri, 13 May 2022 04:02:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh at sourceware dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: siddhesh at sourceware dot 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 04:02:17 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29141 --- Comment #6 from Siddhesh Poyarekar --- (In reply to Petr Ovtchenkov from comment #5) > Hmm. c8ee1c8 not correspond to diff you show above. Ah, sorry no, they're two different things that I formatted very badly maki= ng it seem like it's one thing. The commit that introduced the regression: commit c8ee1c85c07b3c9eaef46355cb1095300855e8fa Author: Joan Bruguera Date: Mon Apr 11 19:49:56 2022 +0200 misc: Fix rare fortify crash on wchar funcs. [BZ 29030] and then the one line fix for it that I'm about to post: diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index f1faf8292c..1c2b044a0d 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -164,7 +164,7 @@ /* Length is known to be safe at compile time if the __L * __S <=3D __OBJSZ condition can be folded to a constant and if it is true, or unknown (-1= ) */ #define __glibc_safe_or_unknown_len(__l, __s, __osz) \ - ((__osz) =3D=3D (__SIZE_TYPE__) -1 = \ + ((__builtin_constant_p (__osz) && (__osz) =3D=3D (__SIZE_TYPE__) -1) = \ || (__glibc_unsigned_or_positive (__l) = \ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__= l), \ (__s), (__osz))) = \ --=20 You are receiving this mail because: You are on the CC list for the bug.=