public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: santoshp <santosh.pradhan@gmail.com>
To: gdb@sourceware.org
Subject: Different addresses in disassembled output of same routine
Date: Thu, 22 Sep 2011 16:52:00 -0000	[thread overview]
Message-ID: <32503832.post@talk.nabble.com> (raw)


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.

                 reply	other threads:[~2011-09-22 16:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32503832.post@talk.nabble.com \
    --to=santosh.pradhan@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).