diff options
author | Guy Martin <gmsoft@tuxicoman.be> | 2013-11-21 13:23:16 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-11-24 12:36:47 -0500 |
commit | d1b29e58c17436b3e0cf92c12b1e99ec6b4cd9ba (patch) | |
tree | 3e5cd5e7a08b223edeaa805265aa92ef6ddc4d8a /elf/dl-fini.c | |
parent | b15ad643798707d247598a765edfa0ac0e8088c5 (diff) | |
download | glibc-d1b29e58c17436b3e0cf92c12b1e99ec6b4cd9ba.tar.gz |
Don't use broken DL_AUTO_FUNCTION_ADDRESS()
On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the
variable fptr[2] 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.
URL: https://bugs.gentoo.org/486618
URL: https://bugs.gentoo.org/486974
(cherry picked from commit daf75146de07303ea0c5ad700ec5ef703ec114a1)
Diffstat (limited to 'elf/dl-fini.c')
-rw-r--r-- | elf/dl-fini.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-fini.c b/elf/dl-fini.c index 6b245f0022..db5269c82f 100644 --- a/elf/dl-fini.c +++ b/elf/dl-fini.c @@ -254,7 +254,7 @@ _dl_fini (void) /* Next try the old-style destructor. */ if (l->l_info[DT_FINI] != NULL) - ((fini_t) DL_DT_FINI_ADDRESS (l, l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr)) (); + DL_CALL_DT_FINI(l, l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr); } #ifdef SHARED |