mirror of git://sourceware.org/git/glibc.git
Also protect SP and BP.
This commit is contained in:
parent
0efe424f4f
commit
c67da0b50e
|
@ -51,6 +51,8 @@ ENTRY(__longjmp)
|
||||||
movq (JB_PC*8)(%rdi),%rdx
|
movq (JB_PC*8)(%rdi),%rdx
|
||||||
movq (JB_RSP*8)(%rdi),%rsp
|
movq (JB_RSP*8)(%rdi),%rsp
|
||||||
#ifdef PTR_DEMANGLE
|
#ifdef PTR_DEMANGLE
|
||||||
|
PTR_DEMANGLE (%rbp)
|
||||||
|
PTR_DEMANGLE (%rsp)
|
||||||
PTR_DEMANGLE (%rdx)
|
PTR_DEMANGLE (%rdx)
|
||||||
#endif
|
#endif
|
||||||
jmpq *%rdx
|
jmpq *%rdx
|
||||||
|
|
|
@ -26,12 +26,21 @@
|
||||||
ENTRY (__sigsetjmp)
|
ENTRY (__sigsetjmp)
|
||||||
/* Save registers. */
|
/* Save registers. */
|
||||||
movq %rbx, (JB_RBX*8)(%rdi)
|
movq %rbx, (JB_RBX*8)(%rdi)
|
||||||
|
#ifdef PTR_MANGLE
|
||||||
|
movq %rbp, %rax
|
||||||
|
PTR_MANGLE (%rax)
|
||||||
|
movq %rax, (JB_RBP*8)(%rdi)
|
||||||
|
#else
|
||||||
movq %rbp, (JB_RBP*8)(%rdi)
|
movq %rbp, (JB_RBP*8)(%rdi)
|
||||||
|
#endif
|
||||||
movq %r12, (JB_R12*8)(%rdi)
|
movq %r12, (JB_R12*8)(%rdi)
|
||||||
movq %r13, (JB_R13*8)(%rdi)
|
movq %r13, (JB_R13*8)(%rdi)
|
||||||
movq %r14, (JB_R14*8)(%rdi)
|
movq %r14, (JB_R14*8)(%rdi)
|
||||||
movq %r15, (JB_R15*8)(%rdi)
|
movq %r15, (JB_R15*8)(%rdi)
|
||||||
leaq 8(%rsp), %rdx /* Save SP as it will be after we return. */
|
leaq 8(%rsp), %rdx /* Save SP as it will be after we return. */
|
||||||
|
#ifdef PTR_MANGLE
|
||||||
|
PTR_MANGLE (%rdx)
|
||||||
|
#endif
|
||||||
movq %rdx, (JB_RSP*8)(%rdi)
|
movq %rdx, (JB_RSP*8)(%rdi)
|
||||||
movq (%rsp), %rax /* Save PC we are returning to now. */
|
movq (%rsp), %rax /* Save PC we are returning to now. */
|
||||||
#ifdef PTR_MANGLE
|
#ifdef PTR_MANGLE
|
||||||
|
|
Loading…
Reference in New Issue