Skip to content

Instantly share code, notes, and snippets.

@swgillespie
Created December 24, 2015 21:15
Show Gist options
  • Save swgillespie/bf981316b02e39f43d7d to your computer and use it in GitHub Desktop.
Save swgillespie/bf981316b02e39f43d7d to your computer and use it in GitHub Desktop.
Rust sigtrap in destructor
Dump of assembler code for function _ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E:
0x0000555555616750 <+0>: sub $0x28,%rsp
0x0000555555616754 <+4>: mov 0x20(%rdi),%al
0x0000555555616757 <+7>: cmp $0xd4,%al
0x0000555555616759 <+9>: setne %cl
0x000055555561675c <+12>: cmp $0x1d,%al
0x000055555561675e <+14>: setne %dl
0x0000555555616761 <+17>: and %dl,%cl
0x0000555555616763 <+19>: test $0x1,%cl
0x0000555555616766 <+22>: mov %rdi,0x10(%rsp)
0x000055555561676b <+27>: mov %al,0xf(%rsp)
0x000055555561676f <+31>: jne 0x55555561677b <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+43>
0x0000555555616771 <+33>: mov 0xf(%rsp),%al
0x0000555555616775 <+37>: cmp $0xd4,%al
0x0000555555616777 <+39>: je 0x555555616783 <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+51>
0x0000555555616779 <+41>: jmp 0x55555561677e <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+46>
0x000055555561677b <+43>: int3
=> 0x000055555561677c <+44>: jmp 0x555555616771 <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+33>
0x000055555561677e <+46>: add $0x28,%rsp
0x0000555555616782 <+50>: retq
0x0000555555616783 <+51>: mov 0x10(%rsp),%rdi
0x0000555555616788 <+56>: callq 0x5555556167d0 <librjs_runtime::heap::RootedPtr<T>.Drop::drop>
0x000055555561678d <+61>: jmp 0x55555561678f <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+63>
0x000055555561678f <+63>: mov 0x10(%rsp),%rdi
0x0000555555616794 <+68>: callq 0x555555616db0 <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528617h0ca5468f4cbeee43E>
0x0000555555616799 <+73>: jmp 0x55555561677e <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+46>
0x000055555561679b <+75>: mov %edx,%ecx
0x000055555561679d <+77>: mov %rax,0x18(%rsp)
0x00005555556167a2 <+82>: mov %ecx,0x20(%rsp)
0x00005555556167a6 <+86>: jmp 0x5555556167ba <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+106>
0x00005555556167a8 <+88>: mov 0x20(%rsp),%eax
0x00005555556167ac <+92>: mov 0x18(%rsp),%rdi
0x00005555556167b1 <+97>: mov %eax,0x8(%rsp)
0x00005555556167b5 <+101>: callq 0x555555564240 <_Unwind_Resume@plt>
0x00005555556167ba <+106>: mov 0x10(%rsp),%rdi
0x00005555556167bf <+111>: callq 0x555555616db0 <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528617h0ca5468f4cbeee43E>
0x00005555556167c4 <+116>: jmp 0x5555556167a8 <_ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E+88>
End of assembler dump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment