This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/21744] Tests failing on --enable-tunables --enable-stack-protector=all
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 16 Jul 2017 23:57:40 +0000
- Subject: [Bug libc/21744] Tests failing on --enable-tunables --enable-stack-protector=all
- Auto-submitted: auto-generated
- References: <bug-21744-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21744
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr21744/master has been created
at 894a306f953d38ff606c67d15db9ff1b92ab5962 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=894a306f953d38ff606c67d15db9ff1b92ab5962
commit 894a306f953d38ff606c67d15db9ff1b92ab5962
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Jul 16 12:03:29 2017 -0700
Don't all __access_noerrno with stack protector from __tunables_init [BZ
#21744]
maybe_enable_malloc_check, which is called by __tunables_init, calls
__access_noerrno. It isn't a problem when maybe_enable_malloc_check
is in ld.so, which has a special version of __access_noerrno without
stack protector. But when glibc is built with stack protector,
maybe_enable_malloc_check in libc.a can't call the regular version of
__access_noerrno with stack protector.
This patch changes maybe_enable_malloc_check to call _dl_access_noerrno
instead. For ld.so or glibc built without stack protector, it is defined
to __access_noerrno. Otherwise a special version of __access_noerrno
without stack protector is used by maybe_enable_malloc_check in libc.a.
Tested on x86-64 with and without --enable-stack-protector=all.
[BZ #21744]
* config.h.in (HAVE_STACK_PROTECTOR): New.
* configure.ac (HAVE_STACK_PROTECTOR): AC_DEFINE if configured
with stack protector.
* configure: Regenerated.
* elf/dl-support.c [HAVE_TUNABLES != 0]: Include <access.c> if
__access_noerrno is defined.
* elf/dl-tunables.c (maybe_enable_malloc_check): Replace
__access_noerrno with _dl_access_noerrno.
* elf/dl-tunables.h [SHARED != 0 || HAVE_STACK_PROTECTOR == 0]
(_dl_access_noerrno): New macro.
[SHARED == 0 && HAVE_STACK_PROTECTOR != 0] (__access_noerrno):
New macro.
[SHARED == 0 && HAVE_STACK_PROTECTOR != 0] (_dl_access_noerrno):
New prototype.
* io/access.c (__access): Don't define if __access_noerrno is
defined.
* sysdeps/mach/hurd/access.c (__access): Likewise.
* sysdeps/unix/sysv/linux/access.c (__access): Likewise.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.