From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ECCCB385086E; Tue, 19 Jul 2022 13:56:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECCCB385086E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/96766] std::swap(std::variant, std::variant) triggers undefined behavior sanitizer Date: Tue, 19 Jul 2022 13:56:55 +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: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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: Tue, 19 Jul 2022 13:56:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96766 --- Comment #8 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:20ab3972240aff596a3fa98e9fb09ddc0658fbb3 commit r13-1749-g20ab3972240aff596a3fa98e9fb09ddc0658fbb3 Author: Marco Falke Date: Tue Jul 19 10:10:39 2022 +0100 libstdc++: Make __from_chars_alnum_to_val conversion explicit The optimizations from commit r12-8175-ga54137c88061c7 introduced a clang integer sanitizer error. Fix this with an explicit static_cast, similar to the fix for PR 96766. libstdc++-v3/ChangeLog: * include/std/charconv (__from_chars_alnum_to_val): Replace implicit conversion from int to unsigned char with explicit cast.=