This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Different addresses in disassembled output of same routine


Hi All,
I am working on a project, where I got a SEGV crash in a routine
R_DMEM_free() while shutdown i.e. in static destructor. The stack trace
looks like:

Program terminated with signal 11, Segmentation fault.
#0  0x00002aaaaaeeded9 in ?? ()

(gdb) where
#0  0x00002aaaaaeeded9 in R_DMEM_free () from libccme_base.so
#1  0x00002aaaaaf09119 in R1_CIPH_CTX_free () from libccme_base.so
#2  0x00002aaaaaf02341 in R2_CIPH_CTX_free () from libccme_base.so
#3  0x00002aaaaaed6b72 in r_ck_cipher_free () from libccme_base.so
#4  0x00002aaaaaec6593 in r_crm_free () from libccme_base.so
#5  0x00002ae209f70319 in destroy_aes_ctx (ctx=0x2aaaab3eafe0) from
libsm_sms.so
#6  0x00002ae209f6f549 in sm_si_crypto_destroy (ctx=0x2aaaab3ec3f0) from
libsm_sms.so
#7  0x00002ae20a3d7b21 in CI_CryptoCtx_U::destroyContext
(this=0x2aaaab3ec3e0) libsm_clsapi.so
#8  0x00002ae20a3d837e in CI_CryptoCtx_U::~CI_CryptoCtx_U
(this=0x2aaaab3ebe20, __in_chrg=<value optimized out>) from libsm_clsapi.so
#9  0x00002ae20d298db8 in ~CI_CryptoPtr_U () from libsm_clsapi.so
#10 __tcf_1
#11 __cxa_finalize()
...

When I disassembled R_DMEM_free(), this is what I got:
(gdb) disassemble R_DMEM_free
Dump of assembler code for function R_DMEM_free:
   0x00002ae209fa48d0 <+0>:     test   %rdi,%rdi
   0x00002ae209fa48d3 <+3>:     je     0x2ae209fa48e0 <R_DMEM_free+16>
   0x00002ae209fa48d5 <+5>:     mov    0x8(%rsi),%rax
   0x00002ae209fa48d9 <+9>:     mov    0x28(%rax),%r11
   0x00002ae209fa48dd <+13>:    jmpq   *%r11
   0x00002ae209fa48e0 <+16>:    repz retq
End of assembler dump.

When I disassembled the crash address i.e. 0x00002aaaaaeeded9, this is what
I got:
(gdb) disassemble 0x00002aaaaaeeded9
Dump of assembler code for function R_DMEM_free:
   0x00002aaaaaeeded0 <+0>:     test   %rdi,%rdi
   0x00002aaaaaeeded3 <+3>:     je     0x2aaaaaeedee0 <R_DMEM_free+16>
   0x00002aaaaaeeded5 <+5>:     mov    0x8(%rsi),%rax
=> 0x00002aaaaaeeded9 <+9>:     mov    0x28(%rax),%r11
   0x00002aaaaaeededd <+13>:    jmpq   *%r11
   0x00002aaaaaeedee0 <+16>:    repz retq
End of assembler dump.

I don't understand how the same routine can show 2 different set of hex
addresses? Is it possible at all?

Thanks in advance for your help.

-Santosh
-- 
View this message in context: http://old.nabble.com/Different-addresses-in-disassembled-output-of-same-routine-tp32503832p32503832.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]