about summary refs log tree commit diff
path: root/nptl/tst-rwlock2b.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-07-19 10:56:19 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-07-19 11:10:31 -0700
commitd8a801c2eadd6a0286434a49fafdc6c8ef2e1556 (patch)
tree6767060a4e0f026dcd5ab29dd1f4c46a0b1c288e /nptl/tst-rwlock2b.c
parentd500130f313572651e1d299f1677f8d677060fb2 (diff)
downloadglibc-hjl/pr21752/master.tar.gz
glibc-hjl/pr21752/master.tar.xz
glibc-hjl/pr21752/master.zip
Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752] hjl/pr21752/master
__libc_argv[0] points to address on stack and __libc_secure_getenv
accesses environment variables which are on stack.  We should avoid
accessing stack when stack is corrupted.

This patch also renames function argument in __fortify_fail_abort
from do_backtrace to need_backtrace to avoid confusion with do_backtrace
from enum __libc_message_action.

	[BZ #21752]
	* debug/fortify_fail.c (__fortify_fail_abort): Don't pass down
	__libc_argv[0] if we aren't doing backtrace.  Rename do_backtrace
	to need_backtrace.
	* sysdeps/posix/libc_fatal.c (__libc_message): Don't call
	__libc_secure_getenv if we aren't doing backtrace.
Diffstat (limited to 'nptl/tst-rwlock2b.c')
0 files changed, 0 insertions, 0 deletions