From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20030 invoked by alias); 23 Sep 2014 13:34:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19996 invoked by uid 48); 23 Sep 2014 13:34:31 -0000 From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/60406] recover.go: test13reflect2 test failure Date: Tue, 23 Sep 2014 13:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bergner at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-09/txt/msg02172.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60406 --- Comment #10 from Peter Bergner --- (In reply to boger from comment #9) > On ppc64le, this works as expected but on ppc64(be) the code that is > generated from this is not the address of the function but the address of > the .opd entry that is used to call the function. As a result the setting > of the deferring function is incorrect and it does not appear as if it can > recover because of the way __go_can_recover uses the deferring function's > address to see if it is in the correct range. On BE, a "function pointer" (unlike on LE or x64* or ...) always points to a function's function descriptor (ie, the .opd entry) and not the code address. The function descriptor contains 3 64-bit doublewords. The first doubleword is the address of the function's code. The second doubleword is the TOC value that needs to be in r2 while we execute the function and the third doubleword contains an environment pointer for languages such as Pascal and PL/1.