From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26625 invoked by alias); 11 Feb 2015 17:45:31 -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 26494 invoked by uid 48); 11 Feb 2015 17:45:27 -0000 From: "ian at airs dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/64999] s390x libgo test failure in TestMemoryProfiler Date: Wed, 11 Feb 2015 17:45: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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ian at airs dot com X-Bugzilla-Status: UNCONFIRMED 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: 2015-02/txt/msg01231.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64999 --- Comment #9 from Ian Lance Taylor --- I think that libbacktrace is doing more or less the right thing. If we don't subtract one from pc there, we have no way to convey signal handler frames correctly. Also, the resulting PC value is in the instruction we want, not the next instruction. So probably runtime.Callers (in libgo/runtime/go-callers.c) ought to adjust the value, since that is what the Go code expects. There is a deeper problem with this code, which is that although the gc compiler can reliably map a PC value to a location, the gccgo compiler can not, because of inlining. To get inlining right, you need to collect the file/line information when unwinding; you can't recreate it afterward. runtime_callers get the right information, but runtime.Callers throws it away.