mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
Maintain stack alignment in ____longjmp_chk on x86_64
This commit is contained in:
parent
821ae7137b
commit
e451d22b22
@ -1,3 +1,9 @@
|
|||||||
|
2011-04-07 Andreas Schwab <schwab@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (CALL_FAIL):
|
||||||
|
Maintain aligned stack.
|
||||||
|
(CHECK_RSP): Remove unused macro.
|
||||||
|
|
||||||
2011-04-03 Ulrich Drepper <drepper@gmail.com>
|
2011-04-03 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
* sysdeps/x86_64/cacheinfo.c (intel_02_known): Fix typo in table.
|
* sysdeps/x86_64/cacheinfo.c (intel_02_known): Fix typo in table.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2001,2004,2005,2006,2009,2010 Free Software Foundation, Inc.
|
/* Copyright (C) 2001,2004,2005,2006,2009,2010,2011 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -30,19 +30,23 @@ longjmp_msg:
|
|||||||
//#define __longjmp ____longjmp_chk
|
//#define __longjmp ____longjmp_chk
|
||||||
|
|
||||||
#ifdef PIC
|
#ifdef PIC
|
||||||
# define CALL_FAIL leaq longjmp_msg(%rip), %rdi; \
|
# define CALL_FAIL subq $8, %rsp; \
|
||||||
call __GI___fortify_fail
|
cfi_remember_state; \
|
||||||
|
cfi_def_cfa_offset(16); \
|
||||||
|
leaq longjmp_msg(%rip), %rdi; \
|
||||||
|
call __GI___fortify_fail; \
|
||||||
|
nop; \
|
||||||
|
cfi_restore_state
|
||||||
#else
|
#else
|
||||||
# define CALL_FAIL movq $longjmp_msg, %rdi; \
|
# define CALL_FAIL subq $8, %rsp; \
|
||||||
call __fortify_fail
|
cfi_remember_state; \
|
||||||
|
cfi_def_cfa_offset(16); \
|
||||||
|
movq $longjmp_msg, %rdi; \
|
||||||
|
call __fortify_fail; \
|
||||||
|
nop; \
|
||||||
|
cfi_restore_state
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CHECK_RSP(reg) \
|
|
||||||
cmpq reg, %rsp; \
|
|
||||||
jbe .Lok; \
|
|
||||||
CALL_FAIL; \
|
|
||||||
.Lok:
|
|
||||||
|
|
||||||
/* Jump to the position specified by ENV, causing the
|
/* Jump to the position specified by ENV, causing the
|
||||||
setjmp call there to return VAL, or 1 if VAL is 0.
|
setjmp call there to return VAL, or 1 if VAL is 0.
|
||||||
void __longjmp (__jmp_buf env, int val). */
|
void __longjmp (__jmp_buf env, int val). */
|
||||||
|
Loading…
Reference in New Issue
Block a user