public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* Signal handling broken on alpha since glibc-2.16
@ 2013-11-04  1:11 Matt Turner
  2013-11-13 22:52 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Turner @ 2013-11-04  1:11 UTC (permalink / raw)
  To: libc-ports
  Cc: Richard Henderson, Uros Bizjak, Mike Frysinger, Gentoo alpha AT

A test from the gcc test suite shows that signal handling is broken on
alpha since glibc-2.16. Bisecting before the glibc-ports merge is
rather hard.

See: https://bugs.gentoo.org/show_bug.cgi?id=480740 (includes test case)

Off hand, do any changes between 2.15 and 2.16 seem to be likely
candidates to cause this bug?

Thanks,
Matt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Signal handling broken on alpha since glibc-2.16
  2013-11-04  1:11 Signal handling broken on alpha since glibc-2.16 Matt Turner
@ 2013-11-13 22:52 ` Richard Henderson
  2013-11-14  2:18   ` Matt Turner
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2013-11-13 22:52 UTC (permalink / raw)
  To: Matt Turner, libc-ports; +Cc: Uros Bizjak, Mike Frysinger, Gentoo alpha AT

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

On 11/04/2013 11:10 AM, Matt Turner wrote:
> A test from the gcc test suite shows that signal handling is broken on
> alpha since glibc-2.16. Bisecting before the glibc-ports merge is
> rather hard.
> 
> See: https://bugs.gentoo.org/show_bug.cgi?id=480740 (includes test case)
> 
> Off hand, do any changes between 2.15 and 2.16 seem to be likely
> candidates to cause this bug?

It's likely to be change 7d1feb5693be7e606104cc2b6657c746a93e5926.

Please try this.


r~

[-- Attachment #2: zz --]
[-- Type: text/plain, Size: 818 bytes --]

diff --git a/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index 3d291fd..bd55418 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -83,14 +83,15 @@ 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)
+
+	nop
+	.align 4
+
 __syscall_sigreturn:
 	mov	sp, a0
 	ldi	v0, __NR_sigreturn
@@ -98,8 +99,9 @@ __syscall_sigreturn:
 	.size	__syscall_sigreturn, .-__syscall_sigreturn
 	.type	__syscall_sigreturn, @function
 
-	.align 4
 	cfi_def_cfa_offset (176 + 648)
+	.align 4
+
 __syscall_rt_sigreturn:
 	mov	sp,a0
 	ldi	v0,__NR_rt_sigreturn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Signal handling broken on alpha since glibc-2.16
  2013-11-13 22:52 ` Richard Henderson
@ 2013-11-14  2:18   ` Matt Turner
  2013-11-14  7:27     ` Uros Bizjak
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Turner @ 2013-11-14  2:18 UTC (permalink / raw)
  To: Richard Henderson
  Cc: libc-ports, Uros Bizjak, Mike Frysinger, Gentoo alpha AT

On Wed, Nov 13, 2013 at 2:50 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 11/04/2013 11:10 AM, Matt Turner wrote:
>> A test from the gcc test suite shows that signal handling is broken on
>> alpha since glibc-2.16. Bisecting before the glibc-ports merge is
>> rather hard.
>>
>> See: https://bugs.gentoo.org/show_bug.cgi?id=480740 (includes test case)
>>
>> Off hand, do any changes between 2.15 and 2.16 seem to be likely
>> candidates to cause this bug?
>
> It's likely to be change 7d1feb5693be7e606104cc2b6657c746a93e5926.
>
> Please try this.

Looks like it works here. Thanks!

RA = 0x120000c44, CFA = 0x11fc9e800
RA = 0x120000c78, CFA = 0x11fc9e810
RA = 0x200000b49d0, CFA = 0x11fc9e820
RA = 0x120000aac, CFA = 0x11fc9eb58
RA = 0x120000b38, CFA = 0x11fc9eb90
RA = 0x120000b58, CFA = 0x11fc9ec30
RA = 0x1200008e8, CFA = 0x11fc9ec40
RA = 0x2000009ad00, CFA = 0x11fc9ec50
Aborted

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Signal handling broken on alpha since glibc-2.16
  2013-11-14  2:18   ` Matt Turner
@ 2013-11-14  7:27     ` Uros Bizjak
  2013-11-14 16:43       ` Matt Turner
  0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2013-11-14  7:27 UTC (permalink / raw)
  To: Matt Turner
  Cc: Richard Henderson, libc-ports, Mike Frysinger, Gentoo alpha AT

On Thu, Nov 14, 2013 at 3:18 AM, Matt Turner <mattst88@gmail.com> wrote:
> On Wed, Nov 13, 2013 at 2:50 PM, Richard Henderson <rth@twiddle.net> wrote:
>> On 11/04/2013 11:10 AM, Matt Turner wrote:
>>> A test from the gcc test suite shows that signal handling is broken on
>>> alpha since glibc-2.16. Bisecting before the glibc-ports merge is
>>> rather hard.
>>>
>>> See: https://bugs.gentoo.org/show_bug.cgi?id=480740 (includes test case)
>>>
>>> Off hand, do any changes between 2.15 and 2.16 seem to be likely
>>> candidates to cause this bug?
>>
>> It's likely to be change 7d1feb5693be7e606104cc2b6657c746a93e5926.
>>
>> Please try this.
>
> Looks like it works here. Thanks!
>
> RA = 0x120000c44, CFA = 0x11fc9e800
> RA = 0x120000c78, CFA = 0x11fc9e810
> RA = 0x200000b49d0, CFA = 0x11fc9e820
> RA = 0x120000aac, CFA = 0x11fc9eb58
> RA = 0x120000b38, CFA = 0x11fc9eb90
> RA = 0x120000b58, CFA = 0x11fc9ec30
> RA = 0x1200008e8, CFA = 0x11fc9ec40
> RA = 0x2000009ad00, CFA = 0x11fc9ec50
> Aborted

The test should not abort. Did you compiled it with -fexceptions
-fnon-call-exceptions?

Uros.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Signal handling broken on alpha since glibc-2.16
  2013-11-14  7:27     ` Uros Bizjak
@ 2013-11-14 16:43       ` Matt Turner
  2013-11-14 17:29         ` Uros Bizjak
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Turner @ 2013-11-14 16:43 UTC (permalink / raw)
  To: Uros Bizjak
  Cc: Richard Henderson, libc-ports, Mike Frysinger, Gentoo alpha AT

On Wed, Nov 13, 2013 at 11:27 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Thu, Nov 14, 2013 at 3:18 AM, Matt Turner <mattst88@gmail.com> wrote:
>> On Wed, Nov 13, 2013 at 2:50 PM, Richard Henderson <rth@twiddle.net> wrote:
>>> On 11/04/2013 11:10 AM, Matt Turner wrote:
>>>> A test from the gcc test suite shows that signal handling is broken on
>>>> alpha since glibc-2.16. Bisecting before the glibc-ports merge is
>>>> rather hard.
>>>>
>>>> See: https://bugs.gentoo.org/show_bug.cgi?id=480740 (includes test case)
>>>>
>>>> Off hand, do any changes between 2.15 and 2.16 seem to be likely
>>>> candidates to cause this bug?
>>>
>>> It's likely to be change 7d1feb5693be7e606104cc2b6657c746a93e5926.
>>>
>>> Please try this.
>>
>> Looks like it works here. Thanks!
>>
>> RA = 0x120000c44, CFA = 0x11fc9e800
>> RA = 0x120000c78, CFA = 0x11fc9e810
>> RA = 0x200000b49d0, CFA = 0x11fc9e820
>> RA = 0x120000aac, CFA = 0x11fc9eb58
>> RA = 0x120000b38, CFA = 0x11fc9eb90
>> RA = 0x120000b58, CFA = 0x11fc9ec30
>> RA = 0x1200008e8, CFA = 0x11fc9ec40
>> RA = 0x2000009ad00, CFA = 0x11fc9ec50
>> Aborted
>
> The test should not abort. Did you compiled it with -fexceptions
> -fnon-call-exceptions?

Whoops. Compiling with the proper CFLAGS leads to better results:

RA = 0x120000bdc, CFA = 0x11f8f8f00
RA = 0x120000c14, CFA = 0x11f8f8f00
RA = 0x120000c38, CFA = 0x11f8f8f10
RA = 0x120000c5c, CFA = 0x11f8f8f10
RA = 0x2000009e9d0, CFA = 0x11f8f8f20
RA = 0x120000aec, CFA = 0x11f8f9258
RA = 0x120000b84, CFA = 0x11f8f9280
RA = 0x120000d28, CFA = 0x11f8f9320

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Signal handling broken on alpha since glibc-2.16
  2013-11-14 16:43       ` Matt Turner
@ 2013-11-14 17:29         ` Uros Bizjak
  0 siblings, 0 replies; 6+ messages in thread
From: Uros Bizjak @ 2013-11-14 17:29 UTC (permalink / raw)
  To: Matt Turner
  Cc: Richard Henderson, libc-ports, Mike Frysinger, Gentoo alpha AT

On Thu, Nov 14, 2013 at 5:43 PM, Matt Turner <mattst88@gmail.com> wrote:

>>>>> A test from the gcc test suite shows that signal handling is broken on
>>>>> alpha since glibc-2.16. Bisecting before the glibc-ports merge is
>>>>> rather hard.
>>>>>
>>>>> See: https://bugs.gentoo.org/show_bug.cgi?id=480740 (includes test case)
>>>>>
>>>>> Off hand, do any changes between 2.15 and 2.16 seem to be likely
>>>>> candidates to cause this bug?
>>>>
>>>> It's likely to be change 7d1feb5693be7e606104cc2b6657c746a93e5926.
>>>>
>>>> Please try this.
>>>
>>> Looks like it works here. Thanks!
>>>
>>> RA = 0x120000c44, CFA = 0x11fc9e800
>>> RA = 0x120000c78, CFA = 0x11fc9e810
>>> RA = 0x200000b49d0, CFA = 0x11fc9e820
>>> RA = 0x120000aac, CFA = 0x11fc9eb58
>>> RA = 0x120000b38, CFA = 0x11fc9eb90
>>> RA = 0x120000b58, CFA = 0x11fc9ec30
>>> RA = 0x1200008e8, CFA = 0x11fc9ec40
>>> RA = 0x2000009ad00, CFA = 0x11fc9ec50
>>> Aborted
>>
>> The test should not abort. Did you compiled it with -fexceptions
>> -fnon-call-exceptions?
>
> Whoops. Compiling with the proper CFLAGS leads to better results:
>
> RA = 0x120000bdc, CFA = 0x11f8f8f00
> RA = 0x120000c14, CFA = 0x11f8f8f00
> RA = 0x120000c38, CFA = 0x11f8f8f10
> RA = 0x120000c5c, CFA = 0x11f8f8f10
> RA = 0x2000009e9d0, CFA = 0x11f8f8f20
> RA = 0x120000aec, CFA = 0x11f8f9258
> RA = 0x120000b84, CFA = 0x11f8f9280
> RA = 0x120000d28, CFA = 0x11f8f9320

Yes, this is the correct sequence (the signal frame is the 5th frame),
and we are able to unwind through the signal frame again.

Thanks,
Uros.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-14 17:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-04  1:11 Signal handling broken on alpha since glibc-2.16 Matt Turner
2013-11-13 22:52 ` Richard Henderson
2013-11-14  2:18   ` Matt Turner
2013-11-14  7:27     ` Uros Bizjak
2013-11-14 16:43       ` Matt Turner
2013-11-14 17:29         ` Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).