This is the mail archive of the
mailing list for the glibc project.
[COMMITTED] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Guy Martin <gmsoft at tuxicoman dot be>
- Cc: Andreas Schwab <schwab at suse dot de>, Mike Frysinger <vapier at gentoo dot org>, libc-alpha at sourceware dot org
- Date: Thu, 21 Nov 2013 15:53:14 -0500
- Subject: [COMMITTED] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()
- Authentication-results: sourceware.org; auth=none
- References: <20131017214754 dot 00555bf3 at dellete> <871u3ina5t dot fsf at igel dot home> <b42704e5527fa00f6e69cacd0d62c19d at tuxicoman dot be> <201310190206 dot 07506 dot vapier at gentoo dot org> <52631FA0 dot 5090403 at redhat dot com> <78728c2956beea68522df0d0e5f8d649 at tuxicoman dot be> <80a141633592ef9ba33d3217af3e9cef at tuxicoman dot be> <mvmy559wode dot fsf at hawking dot suse dot de> <bc4d5a1387269aaa45585cd4c706e456 at tuxicoman dot be> <mvmvc04ty55 dot fsf at hawking dot suse dot de> <f01065eda49089e9180eb6411aeed4a4 at tuxicoman dot be> <528A51E0 dot 5010209 at redhat dot com> <20131121081811 dot 6b5d253d at borg dot lux dot tuxicoman dot be>
On 11/21/2013 02:18 AM, Guy Martin wrote:
> On Mon, 18 Nov 2013 12:44:00 -0500
> "Carlos O'Donell" <firstname.lastname@example.org> wrote:
>> This looks good to me and makes everything cleaner.
> I got my hands on a ia64 machine and the patch was broken for that arch.
> I've attached the working patch that has been tested on amd64/hppa/ia64.
>> Can you check this in yourself or do you need someone to check it in
>> for you?
> I cannot check it myself. I don't have rights on the glibc repo.
Checked in. No regressions on x86_64.
I only fixed one minor thing, you had a 90 character line in
sysdeps/generic/ldsodefs.h and I wrapped it down to under 80.
Author: Guy Martin <email@example.com>
Date: Thu Nov 21 13:23:16 2013 -0500
Don't use broken DL_AUTO_FUNCTION_ADDRESS()
On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the
variable fptr in it's own scope.
The content of fptr is thus undefined right after the macro exits.
Newer gcc's (>= 4.7) reuse the stack space of this variable triggering
a segmentation fault in dl-init.c:69.
To fix this we rewrite the macros to make the call directly to init
and fini without needing to pass back a constructed function pointer.