[PATCH] D60039: Fix the bug of garbage collection of siod.
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 19:47:34 PDT 2019
LuoYuanke added a comment.
In D60039#1450876 <https://reviews.llvm.org/D60039#1450876>, @craig.topper wrote:
> I believe this is saving rbp but mangling it while doing so in a reversible way.
>
> 0x00007ffff6f93fa3 <+3>: mov %rbp,%rax
> 0x00007ffff6f93fa6 <+6>: xor %fs:0x30,%rax
> 0x00007ffff6f93faf <+15>: rol $0x11,%rax
> 0x00007ffff6f93fb3 <+19>: mov %rax,0x8(%rdi)
Yes. It is demangled on __longjmp. But anyway in the jmp buffer the rbp value is mangled, so it is not object pointer any more.
(gdb) disassemble __longjmp
Dump of assembler code for function __longjmp:
0x00007ffff6f94090 <+0>: mov 0x30(%rdi),%r8
0x00007ffff6f94094 <+4>: mov 0x8(%rdi),%r9
0x00007ffff6f94098 <+8>: mov 0x38(%rdi),%rdx
0x00007ffff6f9409c <+12>: ror $0x11,%r8
0x00007ffff6f940a0 <+16>: xor %fs:0x30,%r8
0x00007ffff6f940a9 <+25>: ror $0x11,%r9
0x00007ffff6f940ad <+29>: xor %fs:0x30,%r9
0x00007ffff6f940b6 <+38>: ror $0x11,%rdx
0x00007ffff6f940ba <+42>: xor %fs:0x30,%rdx
0x00007ffff6f940c3 <+51>: nop
0x00007ffff6f940c4 <+52>: mov (%rdi),%rbx
0x00007ffff6f940c7 <+55>: mov 0x10(%rdi),%r12
0x00007ffff6f940cb <+59>: mov 0x18(%rdi),%r13
0x00007ffff6f940cf <+63>: mov 0x20(%rdi),%r14
0x00007ffff6f940d3 <+67>: mov 0x28(%rdi),%r15
0x00007ffff6f940d7 <+71>: mov %esi,%eax
0x00007ffff6f940d9 <+73>: mov %r8,%rsp
0x00007ffff6f940dc <+76>: mov %r9,%rbp
0x00007ffff6f940df <+79>: nop
0x00007ffff6f940e0 <+80>: jmpq *%rdx
End of assembler dump.
Repository:
rT test-suite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60039/new/
https://reviews.llvm.org/D60039
More information about the llvm-commits
mailing list