From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12037 invoked by alias); 12 Feb 2013 03:05:05 -0000 Received: (qmail 11572 invoked by uid 48); 12 Feb 2013 03:04:33 -0000 From: "amodra at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55431] Invalid auxv search in ppc linux-unwind code. Date: Tue, 12 Feb 2013 03:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amodra at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: amodra at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2013-02/txt/msg01126.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55431 --- Comment #5 from Alan Modra 2013-02-12 03:04:28 UTC --- Created attachment 29420 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29420 use /proc/self/auxv At the time the original code was being developed, linux-2.4.x was in widespread use. /proc/self/auxv was introduced with linux-2.6.0 in Dec 2003. I guess it's reasonable to rely on that nowadays. BTW, it's not entirely an optimization to condition reading of altivec regs on AT_HWCAP. I believe it may be possible to segv if the unwinder tries to dereference a location past the end of struct sigcontext.