From owner-freebsd-bugs@freebsd.org Fri Mar 18 02:58:49 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 7F6DEAD3D98 for ; Fri, 18 Mar 2016 02:58:49 +0000 (UTC) (envelope-from johnandsara2@cox.net) Received: from eastrmfepo102.cox.net (eastrmfepo102.cox.net [68.230.241.214]) by mx1.freebsd.org (Postfix) with ESMTP id 32CF938A for ; Fri, 18 Mar 2016 02:58:48 +0000 (UTC) (envelope-from johnandsara2@cox.net) Received: from eastrmimpo209.cox.net ([68.230.241.224]) by eastrmfepo202.cox.net (InterMail vM.8.01.05.15 201-2260-151-145-20131218) with ESMTP id <20160318024727.MWAX21150.eastrmfepo202.cox.net@eastrmimpo209.cox.net> for ; Thu, 17 Mar 2016 22:47:27 -0400 Received: from [192.168.3.15] ([72.219.207.23]) by eastrmimpo209.cox.net with cox id XEnS1s00D0WpXgw01EnSi7; Thu, 17 Mar 2016 22:47:27 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020204.56EB6C3F.004F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.1 cv=B+E30YdM c=1 sm=1 tr=0 a=mYpcIwsqoufCTD7dyaqayA==:117 a=mYpcIwsqoufCTD7dyaqayA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=8nJEP1OIZ-IA:10 a=6I5d2MoRAAAA:8 a=YVOhz5M6AAAA:8 a=vIp_YFcn2Uwy76YA7UQA:9 a=wPNLvfGTeEIA:10 X-CM-Score: 0.00 Authentication-Results: cox.net; none Message-ID: <56EB6897.4070804@cox.net> Date: Thu, 17 Mar 2016 22:31:51 -0400 From: anonymous User-Agent: Thunderbird 2.0.0.24 (X11/20100228) MIME-Version: 1.0 To: bugzilla-noreply@freebsd.org CC: freebsd-bugs@FreeBSD.org Subject: Re: [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) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Fri, 18 Mar 2016 02:58:49 -0000 bugzilla-noreply@freebsd.org wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207736 > > Bug ID: 207736 > Summary: clang 3.8.0/powerpc's _Unwind_RaiseException code > generation has messed up r31 (frame pointer) > save/restore code (SEGV's can result) > Product: Base System > Version: 11.0-CURRENT > Hardware: ppc > OS: Any > Status: New > Severity: Affects Only Me > Priority: --- > Component: bin > Assignee: freebsd-bugs@FreeBSD.org > Reporter: markmi@dsl-only.net > > [This has been reported on llvm bugzilla: 26856.] > > The below causes gdb difficulties for its stack handling: more than just > exception handling is at issue. I just happened to notice it via exception > handling. > > Function _Unwind_RaiseException below is from a FreeBSD "buildworld" using > clang 3.8.0. > > Dump of assembler code for function _Unwind_RaiseException: > 0x41b2ab80 <+0>: mflr r0 > 0x41b2ab84 <+4>: stw r31,-148(r1) > 0x41b2ab88 <+8>: stw r30,-152(r1) > 0x41b2ab8c <+12>: stw r0,4(r1) > 0x41b2ab90 <+16>: stwu r1,-2992(r1) > 0x41b2ab94 <+20>: mr r31,r1 > . . . > 0x41b2abe0 <+96>: stw r31,2844(r31) > (which replaces the earlier save of the old Frame pointer R31 > value with a copy of r1's current value. Note the offset > relationships with the r1 adjustment: -2992+2844=-148) > . . . > 0x41b2add0 <+592>: lwz r31,2844(r31) > (This restores the r1 value that resulted from the "stwu r1,-2992(r1)" into > R31.) > . . . > 0x41b2ae30 <+688>: lwz r31,-148(r1) > (This restores the r1 value that resulted from the "stwu r1,-2992(r1)" into > R31.) > . . . > > The wrong r31 value is present when _Unwind_RaiseException returns. > > But before that while _Unwind_RaiseException is active the C++ exception > handling infrastructure has been given bad r31 information for around > _Unwind_RaiseException's frame. > a little off topic but. i almost downloaded BSD but didn't have time as i was confused ... BSD 4.3 still has "authentic compatible and fast C" 4.4 - 9.0 has GNU C, which is ok i'm a linux user, i'm used to it for better or worse; it's a dialect that keeps changing and causes many woes but 9-10.0 uses C Lang - and i'm unsure if that isn't just another mutating dialect (ie, K&R already has issues, %100 not C to start with) BEFORE I GO ON DISCUSSING THAT: i go on freeBSD Forums to discuss or what: it never let's me on does anyone know why freeBSD forums has stopped working for many people with their recent firefox web browsers (many are complaining) (i call ff-20.0 recent) ??