Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480740 - >=sys-libs/glibc-2.16 signal handling on alpha is broken
Summary: >=sys-libs/glibc-2.16 signal handling on alpha is broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 467256
  Show dependency tree
 
Reported: 2013-08-12 14:49 UTC by Tobias Klausmann (RETIRED)
Modified: 2013-11-24 17:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Testing program for gcc test suite (cleanup-9.c,2.13 KB, text/plain)
2013-08-12 14:49 UTC, Tobias Klausmann (RETIRED)
Details
patch (zz.txt,852 bytes, patch)
2013-11-14 02:13 UTC, Matt Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Klausmann (RETIRED) gentoo-dev 2013-08-12 14:49:28 UTC
Created attachment 355772 [details]
Testing program for gcc test suite

This was found by Uros Bizjak using the gcc test suite.

Testing program is attached. Compile with -fexceptions -fnon-call-exceptions -O2

On broken glibc/alpha, it yields this output:

$ ./a.out
RA = 0x120000cbc, CFA = 0x11fd9cde0
RA = 0x120000cf4, CFA = 0x11fd9cde0
RA = 0x120000d18, CFA = 0x11fd9cdf0
RA = 0x120000d3c, CFA = 0x11fd9cdf0
RA = 0x2000009cee0, CFA = 0x11fd9ce00
RA = (nil), CFA = 0x11fd9d088
Aborted

The (nil) should not be there but rather a proper address. From Uros' report:

"""
The return address is deduced from RT signal context, but for some
reason it is wrong now (nil). The breakage is system wide and is not
dependent on gcc or libgcc version.
"""

I will mask glibc-2.17 on alpha in a moment.
Comment 1 SpanKY gentoo-dev 2013-08-16 18:47:30 UTC
when you dekeyword things in toolchain ebuilds, don't just delete the keyword.  a missing keyword means it'll get built (and maybe runtime) tested before ~arch gets added back.  if you want to actually indicate support is actively disabled, use -arch instead.
Comment 2 SpanKY gentoo-dev 2013-08-21 05:47:37 UTC
(In reply to Tobias Klausmann from comment #0)

seems to me that glibc-2.16 fails the same way.  can you confirm/deny ?
Comment 3 Tobias Klausmann (RETIRED) gentoo-dev 2013-08-21 10:56:03 UTC
(In reply to SpanKY from comment #2)
> (In reply to Tobias Klausmann from comment #0)
> 
> seems to me that glibc-2.16 fails the same way.  can you confirm/deny ?

Indeed, freshly made chroot with only glibc updated to 2.16.0:

# ./a.out 
RA = 0x120000bfc, CFA = 0x11fd091c0
RA = 0x120000c34, CFA = 0x11fd091c0
RA = 0x120000c58, CFA = 0x11fd091d0
RA = 0x120000c7c, CFA = 0x11fd091d0
RA = 0x200000a29f0, CFA = 0x11fd091e0
RA = (nil), CFA = 0x11fd09468
Aborted
Comment 4 SpanKY gentoo-dev 2013-08-25 02:23:46 UTC
bisecting these earlier versions are a pita as glibc-ports is a sep repo :/
Comment 5 Matt Turner gentoo-dev 2013-11-14 02:13:56 UTC
Created attachment 363228 [details, diff]
patch

Patch from Richard. Seems to work.

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

I've tested with glibc-2.17, but should be applied to 2.16, 2.17, and 2.18. Please apply.