From owner-freebsd-bugs@freebsd.org Sun Mar 6 13:58:17 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1226EA9540D for ; Sun, 6 Mar 2016 13:58:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02C8CE12 for ; Sun, 6 Mar 2016 13:58:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u26DwGq2072029 for ; Sun, 6 Mar 2016 13:58:16 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207736] clang 3.8.0/powerpc's _Unwind_RaiseException code generation has messed up r31 (frame pointer) save/restore code (SEGV's can result) Date: Sun, 06 Mar 2016 13:58:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org 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: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 13:58:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207736 --- Comment #1 from Mark Millard --- I compiled a .o for TARGET_ARCH=3Dpowerpc64 via letting "buildworld" get as= far as it could and the resultant .o produced has the same sort of r31/frame-pointer problem as powerpc for _Unwind_RaiseException: The problem DOES occur for powerpc64. A) r31 is stored twice to the same location, with the 2nd store destroying = the frame-pointer value that is supposed to be saved and restored for the calle= r. B) r31 is restored twice from the same location. The FreeBSD TARGET_ARCH=3Dpowerpc64 does officially use a stack red-zone on= the low-address side with officially "late" decrement and "early" increment (AIX like). Relative to this: A) each r31 store is on a different side of the "late" r1 decrement and B) each r31 restore is on a different side of the "early" r1 increment TARGET_ARCH=3Dpowerpc gets that same relationships but the late r1 decremen= t and early r1 increment are SVR4 ABI violations: SVR4'sABI does not require a "red-zone" on the low-address side of the stack. (To get as far as I have for powerpc "buildworld" I had to add signal red-z= one handling to my personal FreeBSD builds.) --=20 You are receiving this mail because: You are the assignee for the bug.=