diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S index a0d1732bdc..c392820cd0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001,2004,2005,2006,2009,2010,2011 Free Software Foundation, Inc. +/* Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -55,12 +55,20 @@ longjmp_msg: ENTRY(____longjmp_chk) /* Restore registers. */ mov (JB_RSP*8)(%rdi), %R8_LP - movq (JB_RBP*8)(%rdi), %r9 + mov (JB_RBP*8)(%rdi),%R9_LP mov (JB_PC*8)(%rdi), %RDX_LP #ifdef PTR_DEMANGLE PTR_DEMANGLE (%R8_LP) - PTR_DEMANGLE (%r9) + PTR_DEMANGLE (%R9_LP) PTR_DEMANGLE (%RDX_LP) +# ifdef __ILP32__ + /* We ignored the high bits of the %rbp value because only the low + bits are mangled. But we cannot presume that %rbp is being used + as a pointer and truncate it, so recover the high bits. */ + movl (JB_RBP*8 + 4)(%rdi), %eax + shlq $32, %rax + orq %rax, %r9 +# endif #endif cmp %R8_LP, %RSP_LP |