From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F4BA3858D1E; Mon, 6 Feb 2023 09:54:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F4BA3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675677257; bh=dKXo8S2JVAqDS1BYditZynAXEmUf65TGPhDasx/HnuM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kskwrDeby1Xa4af0WxP819NxQAjHXu8RnIcz1huQNHKElthqjvj0Tu9y45e91LH9m NpbujrSfFvRgMG21zY++I3ye9FC5QddXcSjL+YTpJWoJN8qDuN+z4/8lVXyg54MpT5 Sla7oNuNmWzcz7ZXX97N6Gg4mwhgFd75Mj8L+wyc= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108674] [wish] *Please* silence *intentional* (non-UB!) unsigned overflow in an libstdc++ header Date: Mon, 06 Feb 2023 09:54:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108674 --- Comment #12 from Jonathan Wakely --- (In reply to Roman Lebedev from comment #10) > I'm not at all familiar with the GCC's preferred patch protocol, See https://gcc.gnu.org/contribute.html#patches > this is the result of `git format-patch origin/master`, That format is great. > with commit message mimicking the ones of the recent commits. > Please let me know what i got wrong this time. The commit message should be in the form "libstdc++: ..." I would just use "libstdc++: silence clang's Integer Sanitizer [PR108674]". The no_sanitize attribute needs to be __no_sanitize__ instead, because this= is a valid program: #define no_sanitize !!1!1 #include int main() { } Otherwise this looks reasonable. The __no_sanitize__("unsigned-integer-overflow") attribute seems to be supporte= d by all non-ancient versions of Clang. Also, please note that the Signed-off-by: tag has the meaning described at https://gcc.gnu.org/dco.html so please be sure that's what you intend when using it :-) Please make the changes above and post to the gcc-patches list, CCing the libstdc++ list, thanks!=