From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18251 invoked by alias); 16 Nov 2013 01:11:44 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 18238 invoked by uid 89); 16 Nov 2013 01:11:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f175.google.com Received: from Unknown (HELO mail-pd0-f175.google.com) (209.85.192.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 16 Nov 2013 01:11:41 +0000 Received: by mail-pd0-f175.google.com with SMTP id w10so2068053pde.20 for ; Fri, 15 Nov 2013 17:11:33 -0800 (PST) X-Received: by 10.68.134.200 with SMTP id pm8mr1882283pbb.123.1384564293866; Fri, 15 Nov 2013 17:11:33 -0800 (PST) Received: from pebble.twiddle.net.tph-wap.local ([180.214.69.188]) by mx.google.com with ESMTPSA id gv10sm1458540pbd.0.2013.11.15.17.11.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2013 17:11:32 -0800 (PST) From: Richard Henderson To: libc-ports@sourceware.org Cc: alpha@gentoo.org, mattst88@gmail.com Subject: [COMMITTED] alpha: Fix signal thunk unwind info Date: Sat, 16 Nov 2013 11:06:00 -0000 Message-Id: <1384564284-27834-1-git-send-email-rth@twiddle.net> X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00027.txt.bz2 --- I'm still testing this same patch applied to 2.18. I don't plan on backporting it further. Gentoo can do that if it wishes, but I hope most of their users will update all the way to the most recent. r~ ports/ChangeLog.alpha | 5 +++++ ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha index 07f5dfb..8f97951 100644 --- a/ports/ChangeLog.alpha +++ b/ports/ChangeLog.alpha @@ -1,3 +1,8 @@ +2013-11-16 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Include a nop + before each signal thunk. + 2013-10-30 Mike Frysinger * sysdeps/alpha/configure.in: Moved to ... diff --git a/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index 3d291fd..6efa738 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -83,14 +83,21 @@ PSEUDO_END(__syscall_rt_sigaction) cfi_offset (64, \base + 2 * 8) .endm - .align 4 - cfi_startproc cfi_return_column (64) .cfi_signal_frame SIGCONTEXT_REGS -648 - cfi_def_cfa_offset (648) + + /* While this frame is marked as a signal frame, that only applies + to how this return address is handled for the outer frame. + The return address that arrived here, from the inner frame, is + not marked as a signal frame and so the unwinder still tries to + subtract 1 to examine the presumed call insn. Thus we must + extend the unwind info to a nop before the start. */ + nop + .align 4 + __syscall_sigreturn: mov sp, a0 ldi v0, __NR_sigreturn @@ -98,8 +105,11 @@ __syscall_sigreturn: .size __syscall_sigreturn, .-__syscall_sigreturn .type __syscall_sigreturn, @function - .align 4 + /* See above wrt including the nop. */ cfi_def_cfa_offset (176 + 648) + nop + .align 4 + __syscall_rt_sigreturn: mov sp,a0 ldi v0,__NR_rt_sigreturn -- 1.8.3.1