From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 23A4E3857348; Sat, 3 Jun 2023 07:57:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23A4E3857348 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685779030; bh=VDMIJHBFEuJ50wWkV6HKCSVGCr+39vApR997F/KUwyw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mgFa9J7Pap3bNr8mw32KFuhE7FWrdX15F9myLGOYI0ro99Djrb3tLrXKr2y2Ly267 QjwvY0SEAmRZBMw/lrt7MdwzoAeVxjkOShiR2wFyIQHaKs7yzE4II+pJWzQPsyv1o8 ESC1wFbKdbi0PmyNlLttzopIXgnpP2cA8+WfbkYU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/109670] [13/14 regression] Exception handling broken for 32-bit Windows Date: Sat, 03 Jun 2023 07:57:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: cvs-commit 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: 13.2 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=3D109670 --- Comment #17 from CVS Commits --- The releases/gcc-13 branch has been updated by Thomas Neumann : https://gcc.gnu.org/g:7b21a74b41b30cd070f69523edf9583d1e287249 commit r13-7411-g7b21a74b41b30cd070f69523edf9583d1e287249 Author: Thomas Neumann Date: Wed May 10 12:33:49 2023 +0200 fix radix sort on 32bit platforms [PR109670] The radix sort uses two buffers, a1 for input and a2 for output. After every digit the role of the two buffers is swapped. When terminating the sort early the code made sure the output was in a2. However, when we run out of bits, as can happen on 32bit platforms, the sorted result was in a1, as we had just swapped a1 and a2. This patch fixes the problem by unconditionally having a1 as output after every loop iteration. This bug manifested itself only on 32bit platforms and even then only in some circumstances, as it needs frames where a swap is required due to differences in the top-most byte, which is affected by ASLR. The new logic was validated by exhaustive search over 32bit input values. libgcc/ChangeLog: PR libgcc/109670 * unwind-dw2-fde.c: Fix radix sort buffer management.=