From owner-freebsd-bugs@freebsd.org Fri Feb 26 22:04:28 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 3A863AB66DA for ; Fri, 26 Feb 2016 22:04:28 +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 1E64A1987 for ; Fri, 26 Feb 2016 22:04:28 +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 u1QM4RYR017542 for ; Fri, 26 Feb 2016 22:04:27 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207325] projects/clang380-import for TARGET_ARCH=powerpc : c++ exceptions cause SEGV (9 line program) Date: Fri, 26 Feb 2016 22:04:28 +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.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2016 22:04:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207325 --- Comment #4 from Mark Millard --- I have found the following mismatch between the powerpc code generated and = the .eh_frame information generated by clang 3.8.0. (Using objdump and dwarfdump notation below, no relocations.) 00007fd8 <_Unwind_RaiseException> mflr r0 00007fdc <_Unwind_RaiseException+0x4> stw r31,-148(r1) 00007fe0 <_Unwind_RaiseException+0x8> stw r30,-152(r1) 00007fe4 <_Unwind_RaiseException+0xc> stw r0,4(r1) 00007fe8 <_Unwind_RaiseException+0x10> stwu r1,-2992(r1) 00007fec <_Unwind_RaiseException+0x14> mr r31,r1 00007ff0 <_Unwind_RaiseException+0x18> mfcr r12 . . . 0000827c <_Unwind_RaiseException+0x2a4> lwz r14,2776(r31) 00008280 <_Unwind_RaiseException+0x2a8> addi r1,r1,2992 00008284 <_Unwind_RaiseException+0x2ac> lwz r0,4(r1) 00008288 <_Unwind_RaiseException+0x2b0> lwz r31,-148(r1) 0000828c <_Unwind_RaiseException+0x2b4> lwz r30,-152(r1) 00008290 <_Unwind_RaiseException+0x2b8> mtlr r0 00008294 <_Unwind_RaiseException+0x2bc> blr 00008298 <_Unwind_RaiseException+0x2c0> bl 0001eccc The .eh_frame information shows off cfa=3D2992(r31) over that whole range b= ut 0x828c to 0x8298 comes after R31 is returned to its old value. (See below.) Also with for 0x00007ff0 it also lists: for 0x00007ff0. In other words: DW_CFA_offset r31 -148 (37 * -4) is used as if cfa was not tied to r31's value via . The dwarfdump material for this is: < 0><0x00007fd8:0x0000829c><><= eh aug data len 0x0> 0x00007fd8: =20 0x00007fec: =20 0x00007ff0: =20 fde section offset 692 0x000002b4 cie offset for fde: 696 0x000002b8 0 DW_CFA_advance_loc 20 (5 * 4) 1 DW_CFA_def_cfa_offset 2992 4 DW_CFA_offset r31 -148 (37 * -4) 6 DW_CFA_offset r30 -152 (38 * -4) 8 DW_CFA_offset_extended_sf r65 4 (-1 * -4) 11 DW_CFA_advance_loc 4 (1 * 4) 12 DW_CFA_def_cfa_register r31 14 DW_CFA_offset r14 -216 (54 * -4) 16 DW_CFA_offset r15 -212 (53 * -4) 18 DW_CFA_offset r16 -208 (52 * -4) 20 DW_CFA_offset r17 -204 (51 * -4) 22 DW_CFA_offset r18 -200 (50 * -4) 24 DW_CFA_offset r19 -196 (49 * -4) 26 DW_CFA_offset r20 -192 (48 * -4) 28 DW_CFA_offset r21 -188 (47 * -4) 30 DW_CFA_offset r22 -184 (46 * -4) 32 DW_CFA_offset r23 -180 (45 * -4) 34 DW_CFA_offset r24 -176 (44 * -4) 36 DW_CFA_offset r25 -172 (43 * -4) 38 DW_CFA_offset r26 -168 (42 * -4) 40 DW_CFA_offset r27 -164 (41 * -4) 42 DW_CFA_offset r28 -160 (40 * -4) 44 DW_CFA_offset r29 -156 (39 * -4) 46 DW_CFA_offset r30 -152 (38 * -4) 48 DW_CFA_offset r31 -148 (37 * -4) 50 DW_CFA_offset r46 -144 (36 * -4) 52 DW_CFA_offset r47 -136 (34 * -4) 54 DW_CFA_offset r48 -128 (32 * -4) 56 DW_CFA_offset r49 -120 (30 * -4) 58 DW_CFA_offset r50 -112 (28 * -4) 60 DW_CFA_offset r51 -104 (26 * -4) 62 DW_CFA_offset r52 -96 (24 * -4) 64 DW_CFA_offset r53 -88 (22 * -4) 66 DW_CFA_offset r54 -80 (20 * -4) 68 DW_CFA_offset r55 -72 (18 * -4) 70 DW_CFA_offset r56 -64 (16 * -4) 72 DW_CFA_offset r57 -56 (14 * -4) 74 DW_CFA_offset r58 -48 (12 * -4) 76 DW_CFA_offset r59 -40 (10 * -4) 78 DW_CFA_offset r60 -32 (8 * -4) 80 DW_CFA_offset r61 -24 (6 * -4) 82 DW_CFA_offset r62 -16 (4 * -4) 84 DW_CFA_offset r63 -8 (2 * -4) 86 DW_CFA_nop --=20 You are receiving this mail because: You are the assignee for the bug.=